/**
 * TVD Driving Simulator - Mô Hình Đào Tạo Sa Hình 2D Tương Tác
 * CSS Stylesheet for Training Board & License Exam Procedure
 */

/* Modal Container & Wrapper */
.tvd-modal-training-box {
    max-width: 1280px !important;
    width: 96vw !important;
    max-height: 94vh !important;
    background: #0f172a !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
    border-radius: 16px !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.2) !important;
    overflow: hidden !important;
}

/* Banner Top Header */
.tvd-tb-banner-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f59e0b;
}

.tvd-tb-banner-title {
    font-size: 18px;
    font-weight: 900;
    color: #fef08a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.tvd-tb-btn-close {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.tvd-tb-btn-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.08);
}

/* Main Split Body: Left Procedure & Right Map */
.tvd-tb-body {
    display: grid;
    grid-template-columns: 360px 1fr;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

@media (max-width: 1024px) {
    .tvd-tb-body {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
}

/* Left Column: Quy Trình Sát Hạch Cấp GPLX */
.tvd-tb-procedure-col {
    background: #090e17;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 12px;
}

.tvd-tb-section-badge {
    background: #047857;
    color: #ffffff;
    font-weight: bold;
    font-size: 13px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    text-align: center;
    letter-spacing: 0.5px;
    border: 1px solid #10b981;
}

/* Flowchart Step Nodes */
.tvd-tb-flow-node {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 12px 14px;
    position: relative;
    transition: all 0.2s;
}

.tvd-tb-flow-node:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}

.tvd-tb-flow-title {
    font-size: 13px;
    font-weight: 800;
    color: #f8fafc;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tvd-tb-flow-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
}

.tvd-tb-badge-pass {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.tvd-tb-badge-fail {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.tvd-tb-flow-desc {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 5px;
    line-height: 1.4;
}

.tvd-tb-flow-arrow-down {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 18px;
    color: #3b82f6;
    font-size: 18px;
    font-weight: bold;
}

.tvd-tb-flow-fail-branch {
    background: rgba(239, 68, 68, 0.08);
    border: 1px dashed rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 11px;
    color: #fca5a5;
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.tvd-tb-flow-final {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border: 1px solid #10b981;
    text-align: center;
}

.tvd-tb-flow-final .tvd-tb-flow-title {
    justify-content: center;
    color: #fef08a;
    font-size: 14px;
}

/* Right Column: Interactive Sa Hinh Canvas & Controls */
.tvd-tb-map-col {
    display: flex;
    flex-direction: column;
    background: #0f172a;
    overflow: hidden;
    position: relative;
}

/* Map Top Toolbar */
.tvd-tb-toolbar {
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.tvd-tb-controls-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tvd-tb-btn-ctrl {
    background: #334155;
    border: 1px solid #475569;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s;
}

.tvd-tb-btn-ctrl:hover {
    background: #475569;
    border-color: #64748b;
}

.tvd-tb-btn-play {
    background: #059669;
    border-color: #10b981;
}

.tvd-tb-btn-play:hover {
    background: #10b981;
}

.tvd-tb-btn-pause {
    background: #d97706;
    border-color: #f59e0b;
}

.tvd-tb-btn-pause:hover {
    background: #f59e0b;
}

.tvd-tb-btn-replay {
    background: #2563eb;
    border-color: #3b82f6;
}

.tvd-tb-btn-replay:hover {
    background: #3b82f6;
}

/* Vehicle Class Selector Filter */
.tvd-tb-type-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tvd-tb-type-label {
    font-size: 11px;
    font-weight: bold;
    color: #94a3b8;
    text-transform: uppercase;
    margin-right: 4px;
}

.tvd-tb-type-btn {
    background: #1e293b;
    border: 1px solid #475569;
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.tvd-tb-type-btn.tvd-tb-type-active {
    background: #2563eb;
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.tvd-tb-type-btn.tvd-tb-type-c.tvd-tb-type-active {
    background: #dc2626;
    border-color: #f87171;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
}

/* Speed Selector */
.tvd-tb-speed-btn {
    background: #1e293b;
    border: 1px solid #475569;
    color: #94a3b8;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 5px;
    cursor: pointer;
}

.tvd-tb-speed-btn.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #38bdf8;
}

/* Canvas Viewport Area */
.tvd-tb-canvas-container {
    flex: 1;
    position: relative;
    background: #162a1b; /* Rich green lawn background */
    overflow: hidden;
    min-height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tvd-tb-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Floating Active Lesson Info Card */
.tvd-tb-lesson-card {
    position: absolute;
    bottom: 12px;
    left: 14px;
    right: 14px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.5);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    pointer-events: auto;
    transition: all 0.3s ease;
}

.tvd-tb-lesson-left {
    flex: 1;
}

.tvd-tb-lesson-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 3px;
}

.tvd-tb-lesson-order {
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
}

.tvd-tb-lesson-name {
    font-size: 13.5px;
    font-weight: 800;
    color: #f8fafc;
}

.tvd-tb-lesson-tip {
    font-size: 12px;
    color: #cbd5e1;
    line-height: 1.4;
}

.tvd-tb-lesson-tip strong {
    color: #fbbf24;
}

/* Fast Lesson Navigation Badges Bar */
.tvd-tb-lesson-strip {
    background: #090e17;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 12px;
    display: flex;
    overflow-x: auto;
    gap: 6px;
    align-items: center;
}

.tvd-tb-step-chip {
    background: #1e293b;
    border: 1px solid #334155;
    color: #94a3b8;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tvd-tb-step-chip:hover {
    background: #334155;
    color: #ffffff;
    border-color: #64748b;
}

.tvd-tb-step-chip.active {
    background: #2563eb;
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}
