.bg-linear-gradiant {
  background: linear-gradient(115.43deg, #F0FFF4 0.45%, #C6F6D5 100%) !important;
}

/* Container untuk memusatkan loader di seluruh layar dan mencegah interaksi */
#global-loader {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1); /* Latar belakang semi-transparan lebih ringan */
    
    /* Efek Blur pada latar belakang */
    backdrop-filter: blur(5px); /* Menambahkan efek blur (sesuaikan 5px sesuai keinginan) */
    -webkit-backdrop-filter: blur(5px); /* Kompatibilitas untuk browser tertentu */
    
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 9999; /* Memastikan overlay di atas segalanya */
    
    /* Pastikan kursor tidak berubah menjadi pointer saat di atas overlay */
    cursor: default; 
}

/* Gaya untuk loader itu sendiri (Spinner) */
.modern-loader {
    border: 8px solid rgba(76, 175, 80, 0.2); /* Hijau transparan untuk dasar */
    border-top: 8px solid #483C32; /* Warna hijau modern solid */
    border-radius: 50%; 
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite; 
}

/* Animasi keyframes untuk putaran */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.shadow-2 {
  /* x-offset y-offset blur color */
  box-shadow: 0px 0px 7px 2px #ccc;
}

#table-data thead th,
#table-data tbody td,
.dataTables_wrapper,
.dataTables_wrapper label,
.dataTables_wrapper input,
.dataTables_wrapper select,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .paginate_button {
    font-size: 12px;
}

#table-data tbody td {
    font-size: 13px !important;
    vertical-align: top !important;
    /*max-width: 250px;              /* atur sesuai kebutuhan */
    /*white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: help;*/
}

.d-none {
    display: none;
}

ul.fs-13,
ul.fs-13 a {
    font-size: 13px;
}

li.fs-14,
li.fs-14 a {
    font-size: 14px;
}
/* ====================================================================== */
/* TEMA HIJAU-KEBIRUAN (override Bootstrap CSS variables)                 */
/* Mengganti primary, info, success, warning, danger ke palette teal/cyan  */
/* ====================================================================== */
:root {
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-info: #06b6d4;
    --bs-info-rgb: 6, 182, 212;
    --bs-success: #10b981;
    --bs-success-rgb: 16, 185, 129;
    --bs-warning: #14b8a6;
    --bs-warning-rgb: 20, 184, 166;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
}

/* Override background gradient body class yang dulu dipakai (lokal) */
.bg-linear-gradiant {
    background: linear-gradient(115.43deg, #F0FFF4 0.45%, #C6F6D5 100%) !important;
}

/* Footer copyright yang sticky bottom */
.footer {
    padding: 12px 0;
    background: #fff;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 13px;
    text-align: center;
    margin-top: auto;
}

/* ====================================================================== */
/* Override Bootstrap 5.3 theme color tokens (lebih spesifik dari :root) */
/* Pakai selector yang sama dengan Bootstrap: [data-bs-theme=light]        */
/* ====================================================================== */
[data-bs-theme=light] {
    --bs-primary: #0d9488;
    --bs-primary-rgb: 13, 148, 136;
    --bs-info: #06b6d4;
    --bs-info-rgb: 6, 182, 212;
    --bs-success: #10b981;
    --bs-success-rgb: 16, 185, 129;
    --bs-warning: #14b8a6;
    --bs-warning-rgb: 20, 184, 166;
    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
}

/* Terapkan juga override untuk komponen style.css bawaan yang hard-code warna orange */
/* Cari class yang memuat gradient orange di style.css dan ganti ke teal */
.btn-warning {
    --bs-btn-bg: #14b8a6;
    --bs-btn-border-color: #14b8a6;
    --bs-btn-hover-bg: #0d9488;
    --bs-btn-hover-border-color: #0d9488;
    --bs-btn-active-bg: #0f766e;
    --bs-btn-active-border-color: #0f766e;
}

.bg-warning {
    background-color: #14b8a6 !important;
}

.text-warning {
    color: #14b8a6 !important;
}

/* ====================================================================== */
/* Camera preview floating — responsive                                   */
/* Default (desktop/tablet): pojok kanan-bawah, 180x135                    */
/* Mobile (<= 576px): pojok kanan-atas kecil + tombol hide/show            */
/* ====================================================================== */
#camera-preview {
    position: fixed;
    bottom: 90px; /* di atas tombol navigasi (yang biasanya fixed bottom) */
    right: 20px;
    width: 180px;
    height: 135px;
    border: 2px solid #fff;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1030; /* di bawah modal Bootstrap (1055), di atas konten (default) */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    background: #000;
    display: none;
}
#camera-preview #cameraVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
#camera-preview #camera-status {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 10px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 2px 6px;
    border-radius: 4px;
}
#camera-preview #camera-toggle {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 2px 6px;
    font-size: 11px;
    opacity: 0.85;
}
#camera-preview.is-collapsed {
    width: 42px;
    height: 42px;
    bottom: auto;
    top: 80px;
    right: 12px;
    border-radius: 50%;
    cursor: pointer;
}
#camera-preview.is-collapsed #cameraVideo,
#camera-preview.is-collapsed #camera-status,
#camera-preview.is-collapsed #camera-toggle {
    display: none;
}
#camera-preview.is-collapsed::before {
    content: "📷";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

@media (max-width: 576px) {
    /* Mobile: pojok kanan-atas, kecil, di bawah header */
    #camera-preview {
        bottom: auto;
        top: 70px;
        right: 12px;
        width: 110px;
        height: 80px;
        border-width: 1px;
    }
    #camera-preview.is-collapsed {
        top: 70px;
        right: 12px;
        width: 36px;
        height: 36px;
    }
    #camera-preview.is-collapsed::before {
        font-size: 14px;
    }
}

/* ====================================================================== */
/* GRID SOAL — Daftar soal dengan sistem warna                            */
/* Sidebar desktop (lg+) + floating button + offcanvas mobile (≤lg)      */
/* ====================================================================== */
.soal-grid-card {
    /* Override default sticky-top offset supaya tidak tertutup header */
    top: 80px !important;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.soal-grid-card .card-body {
    /* Bungkus pill dengan flex-wrap supaya responsive terhadap jumlah soal */
    padding: 12px;
}
.soal-grid-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.soal-pill {
    width: 50px;                /* ukuran besar (desktop) */
    height: 50px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;        /* belum dijawab = abu-abu terang */
    color: #6c757d;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}
.soal-pill:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.soal-pill:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
}
.soal-pill-answered {
    background: var(--bs-success, #10b981);   /* hijau: sudah dijawab */
    color: #fff;
    border-color: var(--bs-success, #10b981);
}
.soal-pill-active {
    background: var(--bs-warning, #14b8a6);   /* teal-amber: aktif (konsisten tema) */
    color: #fff;
    border-color: var(--bs-warning, #14b8a6);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.45);
    transform: scale(1.08);
}
/* Soal aktif + sudah dijawab: 'active' lebih dominan */
.soal-pill-active.soal-pill-answered {
    background: var(--bs-warning, #14b8a6);
    border-color: var(--bs-warning, #14b8a6);
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.legend-dot.bg-light {
    background: #f8f9fa !important;
    border: 1px solid #dee2e6;
}

/* Floating button grid soal — pojok kiri bawah pada viewport mobile/tablet */
#grid-toggle-mobile {
    position: fixed;
    bottom: 90px;
    left: 12px;
    z-index: 1030;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: none;  /* default hidden, ditimpa di breakpoint mobile */
}
#grid-toggle-mobile .si {
    font-size: 22px;
}
#offcanvasGrid .offcanvas-body {
    padding: 16px;
}

/* Tablet (md) dan mobile (sm): tampilkan floating button, sembunyikan sidebar */
@media (max-width: 991.98px) {
    #grid-toggle-mobile {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .soal-pill {
        /* ukuran besar mobile (sedikit lebih kecil dari desktop, tetap besar) */
        width: 44px;
        height: 44px;
        font-size: 15px;
    }
}
@media (max-width: 576px) {
    #grid-toggle-mobile {
        bottom: 80px;
        left: 8px;
        width: 50px;
        height: 50px;
    }
}

/* ====================================================================== */
/* OPSI CARD — Supaya seluruh area card bisa diklik, bukan cuma radio    */
/* ====================================================================== */
.opsi-card {
    transition: all 0.15s ease;
    border: 1px solid #dee2e6;
    cursor: pointer;
    user-select: none;
}
.opsi-card:hover {
    border-color: var(--bs-primary, #0d9488);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.18);
    transform: translateY(-1px);
}
.opsi-card:active {
    transform: translateY(0);
}
.opsi-card-checked {
    background-color: rgba(13, 148, 136, 0.08);
    border-color: var(--bs-primary, #0d9488);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.opsi-card-checked .card-subtitle {
    color: var(--bs-primary, #0d9488) !important;
}
/* Sembunyikan radio button visual tapi tetap ada untuk form semantics + a11y */
.opsi-card .opsi-radio {
    /* Tetap terlihat tapi compact; cursor pointer diwarisi dari card */
    flex-shrink: 0;
}
