/* -------------------------------------------------------------
 * VN Driving Simulation - Custom Exam Plugin Styles (Scale 10)
 * ------------------------------------------------------------- */

.vds-exam-wrapper {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    color: #1e293b;
    margin: 20px 0;
}

/* TOP TOOLBAR */
.vds-top-bar {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.vds-brand-title {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* DYNAMIC ANSWER OPTIONS SELECTOR (2, 3, 4 CHOICE BUTTONS) */
.vds-options-selector-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

.vds-selector-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #e2e8f0;
}

.vds-opt-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vds-opt-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.vds-opt-btn.active {
    background: #ffffff;
    color: #1e3a8a;
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* SETS SELECTOR BAR */
.vds-sets-bar {
    background: #ffffff;
    padding: 12px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.vds-sets-label {
    font-weight: 700;
    color: #475569;
    font-size: 0.95rem;
}

.vds-sets-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.vds-set-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vds-set-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.vds-set-btn.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.vds-btn-mode-mock {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vds-btn-mode-mock:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109, 40, 217, 0.35);
}

/* MAIN GRID LAYOUT */
.vds-main-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 992px) {
    .vds-main-grid {
        grid-template-columns: 1fr;
    }
}

/* VIDEO CARD */
.vds-video-card {
    background: #0f172a;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.vds-video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.vds-video-container iframe,
.vds-video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vds-video-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 600;
}

.vds-timeline-bar {
    height: 8px;
    background: #1e293b;
    position: relative;
}

.vds-progress-fill {
    height: 100%;
    width: 0%;
    background: #3b82f6;
    transition: width 0.1s linear;
}

/* QUIZ SECTION (4 SUB-QUESTIONS BOXES) */
.vds-quiz-section {
    margin-top: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
}

.vds-quiz-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.vds-quiz-section-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #0f172a;
}

.vds-q-badge {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.vds-quiz-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .vds-quiz-grid {
        grid-template-columns: 1fr;
    }
}

.vds-quiz-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    transition: border-color 0.2s ease;
}

.vds-quiz-box:hover {
    border-color: #94a3b8;
}

.vds-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.vds-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vds-opt-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #334155;
    transition: all 0.2s ease;
}

.vds-opt-card:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.vds-opt-card.selected {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
    font-weight: 600;
}

.vds-opt-card input[type="radio"] {
    margin-top: 2px;
    cursor: pointer;
}

/* NAVIGATION CONTROLS BOTTOM BAR */
.vds-nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.vds-btn {
    padding: 10px 20px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.vds-btn-prev, .vds-btn-next {
    background: #e2e8f0;
    color: #334155;
}

.vds-btn-prev:hover, .vds-btn-next:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.vds-btn-submit {
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.vds-btn-submit:hover {
    background: #dc2626;
}

/* FLOATING MOBILE NAVIGATION TRIANGLE ARROWS (◀ AND ▶ MATCHING ARCHIVE MOPHONG-ONTAP) */
.vds-mobile-nav-arrow {
    display: none !important;
}

@media (max-width: 768px) {
    .vds-mobile-nav-arrow {
        position: fixed !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 46px !important;
        height: 46px !important;
        border-radius: 50% !important;
        background: #2563eb !important;
        color: #ffffff !important;
        border: 2px solid #ffffff !important;
        font-size: 1.25rem !important;
        font-weight: bold !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 99999 !important;
        box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45) !important;
        cursor: pointer !important;
        user-select: none !important;
        transition: transform 0.15s ease, background 0.15s ease !important;
    }

    .vds-mobile-nav-arrow:active {
        transform: translateY(-50%) scale(0.9) !important;
        background: #1d4ed8 !important;
    }

    .vds-mobile-nav-arrow.vds-arrow-left {
        left: 10px !important;
    }

    .vds-mobile-nav-arrow.vds-arrow-right {
        right: 10px !important;
    }

    .vds-nav-controls .vds-btn-prev,
    .vds-nav-controls .vds-btn-next {
        display: none !important;
    }

    .vds-nav-controls .vds-btn-submit {
        width: 100% !important;
        font-size: 1.05rem !important;
        padding: 12px !important;
    }

    /* RESPONSIVE EXAM RESULT VIEW ON MOBILE */
    #vds-exam-result-view {
        padding: 12px !important;
    }

    .vds-res-top-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        text-align: center !important;
    }

    .vds-res-top-grid > div {
        border-right: none !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-right: 0 !important;
        padding-bottom: 12px !important;
    }

    .vds-res-top-grid > div:last-child {
        border-bottom: none !important;
        padding-bottom: 0 !important;
    }

    .vds-res-main-split {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .vds-res-q-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .vds-res-footer {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .vds-res-footer > div {
        justify-content: center !important;
        width: 100% !important;
    }

    .vds-res-footer input {
        flex: 1 !important;
        width: 100% !important;
    }
}

/* RIGHT SIDEBAR */
.vds-timer-card {
    background: #0f172a;
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    margin-bottom: 20px;
}

.vds-timer-label {
    font-size: 0.8rem;
    color: #94a3b8;
    letter-spacing: 1px;
    font-weight: 700;
}

.vds-timer-clock {
    font-size: 2.5rem;
    font-weight: 900;
    color: #38bdf8;
    font-family: monospace;
    margin-top: 5px;
}

.vds-questions-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
}

.vds-questions-card h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #1e293b;
}

.vds-q-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.vds-q-node {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.vds-q-node:hover {
    background: #e2e8f0;
}

.vds-q-node.active {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.vds-q-node.answered {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.vds-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.vds-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vds-legend-item i {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

.vds-legend-item i.bg-gray { background: #f1f5f9; border: 1px solid #cbd5e1; }
.vds-legend-item i.bg-blue { background: #dbeafe; border: 1px solid #93c5fd; }

/* MODAL OVERLAY */
.vds-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vds-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 850px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.vds-modal-header {
    background: #1e293b;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vds-modal-header h2 {
    margin: 0;
    font-size: 1.15rem;
}

.vds-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.vds-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.vds-result-banner {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.vds-result-banner.pass {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.vds-result-banner.fail {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.vds-badge-status {
    display: inline-block;
    padding: 6px 20px;
    font-weight: 900;
    font-size: 1.2rem;
    border-radius: 30px;
    margin-bottom: 10px;
}

.pass .vds-badge-status { background: #10b981; color: white; }
.fail .vds-badge-status { background: #ef4444; color: white; }

.vds-score-big {
    font-size: 3rem;
    font-weight: 900;
}

.vds-table-responsive {
    overflow-x: auto;
}

.vds-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.vds-result-table th, .vds-result-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.vds-result-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
}

.vds-modal-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: right;
}

.vds-btn-restart {
    background: #2563eb;
    color: white;
}
