/* ==============================================================================
   VirtualCompanion — VR Mode Slide Deck Stylesheet
   Precision 16:9 Presentation Frame with Standardized Bottom Navigation Bar
   Optimized for PowerPoint Slide Graphic Imports & AnatoCore Formative Questions
   ============================================================================== */

:root {
    --vr-bg: #000000;
    --vr-canvas-bg: #030712;
    --vr-bar-bg: #070b14;
    --vr-bar-border: #1a2234;
    --vr-primary: #862633;
    --vr-primary-hover: #a83344;
    --vr-accent: #ffc72c;
    --vr-text: #f8fafc;
    --vr-text-muted: #94a3b8;
    --vr-success: #10b981;
    --vr-danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html:has(body.vr-deck-body),
html.vr-deck-html {
    background-color: #000000 !important;
    background: #000000 !important;
    color-scheme: dark;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.vr-deck-body {
    background-color: #000000 !important;
    background: #000000 !important;
    color: var(--vr-text);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    user-select: none;
}

/* ==============================================================================
   16:9 PRESENTATION CANVAS VIEWPORT (Never Cuts Off in ANY Window Aspect Ratio)
   ============================================================================== */

.vr-presentation-viewport {
    /* Adaptive calculation: fills the maximum 16:9 space possible without ever cutting off edges */
    width: min(100vw, calc(100vh * (16 / 9)));
    height: min(100vh, calc(100vw * (9 / 16)));
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    margin: auto;
    background: #000000;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
}

/* Full-bleed Content Stage (Spans entire 16:9 canvas) */
.vr-slide-content-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==============================================================================
   SLIDE TYPE 1: POWERPOINT SLIDE GRAPHIC (PNG)
   ============================================================================== */

.vr-pptx-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.vr-pptx-img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* 16:9 image fills 16:9 canvas 100% pixel-to-pixel with zero side bars */
    display: block;
    background: #000000;
}

.vr-pptx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 40px 120px 40px;
    height: 100%;
    color: #64748b;
}

/* ==============================================================================
   SLIDE TYPE 2: ANATOCORE FORMATIVE QUESTIONS
   ============================================================================== */

/* Split 2-Column Layout (Left 50% Image, Right 50% Question & Choices) */
.vr-q-split-stage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    width: 100%;
    height: 100%;
    padding: 28px 40px clamp(80px, 11%, 120px) 40px;
    align-items: center;
    box-sizing: border-box;
}

.vr-q-split-media {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    max-height: 480px;
    background: #000000;
    border: 2px solid #1e293b;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.vr-q-split-media img {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

.vr-q-split-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.vr-q-prompt {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.45;
    color: #ffffff;
    margin-bottom: 20px;
}

/* Centered Layout (MCQ with NO Image) */
.vr-q-center-stage {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 1100px;
    width: 100%;
    padding: 32px 48px clamp(80px, 11%, 120px) 48px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
}

.vr-q-center-stage .vr-q-prompt {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.4;
    color: #ffffff;
    margin-bottom: 28px;
}

.vr-q-center-stage .vr-q-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: 100%;
}

/* Question Options Buttons */
.vr-q-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vr-opt-btn {
    min-height: 64px;
    background: #111a2e;
    border: 2px solid #24324f;
    border-radius: 12px;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 1.18rem;
    font-weight: 600;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    width: 100%;
}

.vr-opt-btn:hover:not(:disabled) {
    background: #1e293b;
    border-color: var(--vr-accent);
    transform: scale(1.015);
}

.vr-opt-btn.correct {
    background: rgba(16, 185, 129, 0.25) !important;
    border-color: #10b981 !important;
    color: #a7f3d0 !important;
}

.vr-opt-btn.incorrect {
    background: rgba(239, 68, 68, 0.25) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
}

.vr-opt-key {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #030712;
    border: 1px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--vr-accent);
    flex-shrink: 0;
}

/* Rationale Feedback */
.vr-slide-rationale {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.5;
    display: none;
}

.vr-slide-rationale.show-correct {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 2px solid #10b981;
    color: #e2e8f0;
}

.vr-slide-rationale.show-incorrect {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 2px solid #ef4444;
    color: #e2e8f0;
}

/* In-Stage Continue & Skip Action Buttons for VR Headset Laser Reticle */
.vr-continue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #10b981;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    padding: 12px 26px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    transition: all 0.2s ease;
    user-select: none;
    text-decoration: none;
}

.vr-continue-btn:hover {
    background: #059669;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

.vr-continue-btn:active {
    transform: translateY(0) scale(0.99);
}

.vr-continue-btn.secondary {
    background: rgba(51, 65, 85, 0.85);
    border: 1px solid #475569;
    color: #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.vr-continue-btn.secondary:hover {
    background: #334155;
    border-color: #94a3b8;
    color: #ffffff;
}

/* HotSpot Target Stage */
.vr-q-hotspot-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    padding: 18px 24px clamp(80px, 11%, 120px) 24px;
    box-sizing: border-box;
}

.vr-hotspot-canvas-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 440px;
    border: 2px solid #1e293b;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    cursor: crosshair;
}

.vr-hotspot-canvas-wrap img {
    display: block;
    max-height: 440px;
    max-width: 100%;
    user-select: none;
    cursor: crosshair;
}

/* ==============================================================================
   STANDARDIZED BOTTOM NAVIGATION BAR (Exact Match to PowerPoint Mockup)
   ============================================================================== */

.vr-slide-footer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: clamp(64px, 9.259%, 100px); /* Exactly 100px on 1080p, perfectly overlays reserved bottom 100px */
    background: var(--vr-bar-bg);
    border-top: 2px solid var(--vr-bar-border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
    gap: 16px;
    box-sizing: border-box;
}

/* Navigation Buttons */
.vr-nav-btn {
    min-height: 56px;
    min-width: 140px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 28px;
    border-radius: 12px;
    font-size: 1.18rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    user-select: none;
}

.vr-btn-prev {
    background: #151f32;
    border: 1px solid #334155;
    color: #ffffff;
}

.vr-btn-prev:hover:not(:disabled) {
    background: #1e293b;
    border-color: #64748b;
    transform: scale(1.02);
}

.vr-btn-prev:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.vr-btn-next {
    background: var(--vr-primary);
    border: 1px solid var(--vr-primary-hover);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(134, 38, 51, 0.45);
}

.vr-btn-next:hover:not(:disabled) {
    background: var(--vr-primary-hover);
    transform: scale(1.02);
}

/* Gated NEXT button on unattempted questions */
.vr-btn-next.gated {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    filter: grayscale(0.5);
}

.vr-btn-next.unlocked {
    opacity: 1 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    filter: none !important;
}

/* Center Group: Taxonomy, Counter & Dots, Corporate Logo */
.vr-footer-taxonomy {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.04em;
    min-width: 180px;
    text-align: left;
}

.vr-deck-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 1;
}

.vr-deck-counter {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.vr-deck-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.vr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #334155;
    transition: all 0.2s ease;
}

.vr-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

.vr-dot.answered {
    background: #10b981;
}

.vr-footer-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 180px;
    height: 48px;
}

.vr-corp-logo-img {
    height: 44px;
    max-width: 140px;
    object-fit: contain;
}

/* Station Summary Layout */
.vr-summary-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 32px clamp(80px, 11%, 120px) 32px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.vr-summary-box {
    background: #0f172a;
    border: 2px solid #1e293b;
    border-radius: 16px;
    padding: 24px 36px;
    max-width: 680px;
    margin: 16px auto;
}

/* Fullscreen and Tool Utility Buttons */
.vr-icon-btn {
    background: transparent;
    border: none;
    color: var(--vr-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    user-select: none;
}

.vr-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}
