/**
 * Novay AI — 86-inch Holobox Presentation System for The Clinics (ذا كلينكس)
 * الرياض — المملكة العربية السعودية
 * 
 * Optimized for:
 * - 86" Vertical Hologram Box (2160x3840 4K UHD Portrait / 9:16 Aspect Ratio)
 * - Touch screen kiosks (PCAP / IR Multi-touch)
 * - Zero chrome clutter, pure holographic presence
 * - The Clinics Brand Palette: Signature Navy (#004B87 / #0F3460), Medical Cyan (#00C6FF / #4A90E2), Pure White (#FFFFFF)
 */

:root {
    --holo-bg-dark: #050d1a;
    --clinics-navy: #004B87;
    --clinics-navy-deep: #0A2540;
    --clinics-navy-glow: rgba(0, 75, 135, 0.5);
    --clinics-cyan: #00C6FF;
    --clinics-blue-soft: #4A90E2;
    --clinics-cyan-glow: rgba(0, 198, 255, 0.45);
    
    --holo-emerald: #10B981;
    --holo-emerald-glow: rgba(16, 185, 129, 0.5);
    --holo-amber: #F59E0B;

    /* Measured Studio Background Palette for seamless edge blending */
    --studio-bg-top: #E6F0FA;
    --studio-bg-mid: #F4F8FD;
    --studio-bg-bottom: #DCE8F5;
    
    --text-pure: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.85);
    --text-dark: #0A2540;
    --text-dim: rgba(255, 255, 255, 0.65);

    --font-tajawal: 'Tajawal', system-ui, -apple-system, sans-serif;
}

/* ========================================================
   GLOBAL KIOSK RESET (NO SCROLL, NO SELECTION)
======================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    background-color: var(--holo-bg-dark);
    color: var(--text-pure);
    font-family: var(--font-tajawal);
    direction: rtl;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

/* ========================================================
   HOLOBOX ROOT STAGE CONTAINER
======================================================== */
.holobox-stage {
    position: relative;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    overflow: hidden;
    background-color: var(--holo-bg-dark);
    transition: background-color 0.5s ease;
}

/* ========================================================
   THEME VARIANTS (STUDIO, WHITE, CYBERBOX)
======================================================== */

/* 1. STUDIO VARIANT: Seamless Edge Blending into Clinic Background */
.holobox-stage[data-variant="studio"] {
    background: radial-gradient(circle at 50% 35%, var(--studio-bg-mid) 0%, var(--studio-bg-top) 70%, #A9C2D9 100%) !important;
    background-color: var(--studio-bg-mid) !important;
    color: var(--text-dark);
}

.holobox-stage[data-variant="studio"] .ambient-holo-glow {
    display: none !important;
}

.holobox-stage[data-variant="studio"] .character-anchor,
.holobox-stage[data-variant="studio"] .hologram-figure,
.holobox-stage[data-variant="studio"] .hologram-video,
.holobox-stage[data-variant="studio"].is-speaking .hologram-figure,
.holobox-stage[data-variant="studio"].is-speaking .hologram-video,
.holobox-stage[data-variant="studio"].is-listening .hologram-figure,
.holobox-stage[data-variant="studio"].is-listening .hologram-video {
    box-shadow: none !important;
    filter: none !important;
    -webkit-filter: none !important;
}

/* 2. PURE WHITE VARIANT: Clean High-Key Luxury Clinic */
.holobox-stage[data-variant="white"] {
    background: #FFFFFF !important;
    color: var(--text-dark);
}

.holobox-stage[data-variant="white"] .ambient-holo-glow {
    display: none !important;
}

/* 3. CYBERBOX 3D VARIANT: Deep Holographic Depth & Cyan Glows */
.holobox-stage[data-variant="cyberbox"] {
    background: radial-gradient(circle at 50% 40%, #0d233a 0%, #06111e 65%, #02070c 100%);
}

.holobox-stage[data-variant="cyberbox"] .glow-navy {
    background: radial-gradient(circle, rgba(0, 75, 135, 0.4) 0%, transparent 70%);
}

.holobox-stage[data-variant="cyberbox"] .glow-cyan {
    background: radial-gradient(circle, rgba(0, 198, 255, 0.35) 0%, transparent 70%);
}

/* ========================================================
   AMBIENT DEPTH GLOWS
======================================================== */
.ambient-holo-glow {
    position: absolute;
    width: 70vw;
    height: 70vw;
    max-width: 900px;
    max-height: 900px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    filter: blur(100px);
    opacity: 0.55;
    transition: opacity 0.5s ease;
}

.glow-navy {
    top: 15%;
    right: 15%;
    background: radial-gradient(circle, rgba(0, 75, 135, 0.35) 0%, transparent 70%);
}

.glow-cyan {
    top: 25%;
    left: 15%;
    background: radial-gradient(circle, rgba(0, 198, 255, 0.25) 0%, transparent 70%);
}

/* ========================================================
   VIEWPORT & FIGURE PRESENTATION (9:16 Portrait Bounding Box)
======================================================== */
.hologram-stage-viewport {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
    pointer-events: none;
}

.character-anchor {
    position: relative;
    width: min(100vw, calc(100vh * (9 / 16)));
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0;
    pointer-events: none;
}

.hologram-figure,
.hologram-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    z-index: 15;
    transition: opacity 0.25s ease-in-out;
}

.hologram-video {
    z-index: 16;
}

/* ========================================================
   KIOSK MODE LOCK
======================================================== */
body.kiosk-locked {
    cursor: none !important;
}

