/**
 * Gaya Kustom & Definisi Font IoskeleyMono
 * Author: AKZ Team
 */

@font-face {
    font-family: "IoskeleyMono";
    src: url("../fonts/WOFF2/IoskeleyMono-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IoskeleyMono";
    src: url("../fonts/WOFF2/IoskeleyMono-Italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "IoskeleyMono";
    src: url("../fonts/WOFF2/IoskeleyMono-Medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IoskeleyMono";
    src: url("../fonts/WOFF2/IoskeleyMono-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "IoskeleyMono";
    src: url("../fonts/WOFF2/IoskeleyMono-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --akz-font-mono: "IoskeleyMono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --tblr-font-monospace: var(--akz-font-mono);
}

/* Terapkan IoskeleyMono pada elemen teknis, tabel IP, badge ASN, kode, dan viewer JSON */
code,
pre,
kbd,
samp,
.font-mono,
.ip-mono,
.asn-badge,
.json-viewer {
    font-family: var(--akz-font-mono) !important;
    font-variant-ligatures: contextual;
}

/* Penataan sidebar vertikal AKZ */
.navbar-vertical .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-weight: 600;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, #206bc4 0%, #4299e1 100%);
    color: #ffffff;
    font-family: var(--akz-font-mono);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: -0.04em;
    flex-shrink: 0;
}

/* Bagian SPA (berpindah tanpa reload browser) */
.spa-section {
    display: none;
    animation: akzFadeIn 0.16s ease-out;
}

.spa-section.active {
    display: block;
}

@keyframes akzFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Viewer JSON dengan syntax highlighting ringan */
.json-viewer {
    background-color: #0f172a;
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    font-size: 0.8125rem;
    line-height: 1.55;
    max-height: 460px;
    overflow: auto;
    white-space: pre;
    margin: 0;
}

.json-key {
    color: #7dd3fc;
}

.json-string {
    color: #86efac;
}

.json-number {
    color: #fdba74;
}

.json-boolean {
    color: #f472b6;
    font-weight: 600;
}

.json-null {
    color: #94a3b8;
    font-style: italic;
}

/* Kartu skor risiko pada Playground */
.fraud-score-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--akz-font-mono);
    border: 4px solid var(--tblr-border-color);
    flex-shrink: 0;
}

.fraud-score-circle.risk-low {
    border-color: #2fb344;
    background-color: rgba(47, 179, 68, 0.08);
    color: #2fb344;
}

.fraud-score-circle.risk-medium {
    border-color: #f59f00;
    background-color: rgba(245, 159, 0, 0.1);
    color: #f59f00;
}

.fraud-score-circle.risk-high {
    border-color: #f76707;
    background-color: rgba(247, 103, 7, 0.1);
    color: #f76707;
}

.fraud-score-circle.risk-critical {
    border-color: #d63939;
    background-color: rgba(214, 57, 57, 0.12);
    color: #d63939;
}

.fraud-score-value {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1;
}

.fraud-score-max {
    font-size: 0.65rem;
    opacity: 0.75;
    margin-top: 2px;
}

/* Kontainer Toast Notifikasi di pojok kanan bawah */
.akz-toast-container {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1090;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 360px;
    pointer-events: none;
}

.akz-toast-container .toast {
    pointer-events: auto;
    min-width: 280px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.22);
    border-left-width: 4px;
}

/* Tombol Scroll-to-Top mengambang */
.akz-scroll-top {
    position: fixed;
    right: 1.25rem;
    bottom: 4.75rem;
    z-index: 1080;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.2);
}

.akz-scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Penyesuaian tabel responsif dan badge cepat */
.ip-sample-btn {
    font-family: var(--akz-font-mono);
    font-size: 0.75rem;
}

.table td,
.table th {
    vertical-align: middle;
}

.cursor-pointer {
    cursor: pointer;
}
