/**
 * Novay AI — 86-inch Holobox Presentation System
 * شركة الأدلاء لخدمة ضيوف الرحمن والمساهمين — المساعدة الذكية نوف (Adilla Holobox)
 * 
 * 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
 */

@font-face {
    font-family: 'FF Family shamel';
    font-weight: 400;
    src: url('../assets/fonts/ArbFONTS-FFShamelFamily-SansOneBook.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'FF Family shamel bold';
    font-weight: 700;
    src: url('../assets/fonts/ArbFONTS-FFShamelFamily-SansOneBook.ttf') format('truetype');
    font-display: swap;
}

:root {
    /* Official Adilla Brand Identity Tokens */
    --color-adilla-purple: #220B61;
    --color-adilla-midnight: #160840;
    --color-adilla-purple-light: #381699;
    --color-adilla-gold: #C9A275;
    --color-adilla-gold-light: #E2B774;
    --color-adilla-gold-dark: #B38747;

    /* Holobox Depth Tokens */
    --holo-bg-dark: #160840;
    --holo-purple-dark: #160840;
    --holo-purple: #220B61;
    --holo-purple-bright: #381699;
    --holo-lavender: #C9A275;
    --holo-neon-lime: #E2B774;
    --holo-emerald: #10B981;
    --holo-rose: #FF4D6D;
    --holo-cyan: #C9A275;

    /* Studio variant palette matching measured Nouf assets */
    --studio-bg-top: #D8DDE4;
    --studio-bg-mid: #E4E7EE;
    --studio-bg-bottom: #DDE1E7;
    
    --text-pure: #FFFFFF;
    --text-muted: rgba(255, 255, 255, 0.85);
    --text-dim: rgba(201, 162, 117, 0.7);

    --font-adilla: 'FF Family shamel', 'Tajawal', system-ui, -apple-system, sans-serif;
    --font-tajawal: 'Tajawal', 'FF Family shamel', 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 Background */
.holobox-stage[data-variant="studio"] {
    background: linear-gradient(180deg, var(--studio-bg-top) 0%, var(--studio-bg-mid) 12%, var(--studio-bg-mid) 85%, var(--studio-bg-bottom) 100%) !important;
    background-color: var(--studio-bg-mid) !important;
    color: #120429;
}

.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;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* Seamless edge feathering: dissolves 9:16 frame edges into stage background on desktop screens */
.holobox-stage[data-variant="studio"] .hologram-figure,
.holobox-stage[data-variant="studio"] .hologram-video {
    -webkit-mask-image: 
        linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 1.5%, rgba(0, 0, 0, 0.8) 4%, black 7%, black 93%, rgba(0, 0, 0, 0.8) 96%, rgba(0, 0, 0, 0.2) 98.5%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 1%, black 3.5%, black 97.5%, rgba(0, 0, 0, 0.5) 99%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: 
        linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.2) 1.5%, rgba(0, 0, 0, 0.8) 4%, black 7%, black 93%, rgba(0, 0, 0, 0.8) 96%, rgba(0, 0, 0, 0.2) 98.5%, transparent 100%),
        linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 1%, black 3.5%, black 97.5%, rgba(0, 0, 0, 0.5) 99%, transparent 100%);
    mask-composite: intersect;
}

/* 2. PURE WHITE VARIANT */
.holobox-stage[data-variant="white"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #120429;
}

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

.holobox-stage[data-variant="white"] .character-anchor,
.holobox-stage[data-variant="white"] .hologram-figure,
.holobox-stage[data-variant="white"] .hologram-video,
.holobox-stage[data-variant="white"].is-speaking .hologram-figure,
.holobox-stage[data-variant="white"].is-speaking .hologram-video,
.holobox-stage[data-variant="white"].is-listening .hologram-figure,
.holobox-stage[data-variant="white"].is-listening .hologram-video {
    box-shadow: none !important;
    filter: contrast(106%) brightness(105%) !important;
    mix-blend-mode: multiply !important;
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* 3. CYBERBOX 3D VARIANT */
.holobox-stage[data-variant="cyberbox"] {
    background: radial-gradient(circle at 50% 40%, #1A0538 0%, #070114 75%, #030008 100%);
}

/* ========================================================
   HOLOGRAPHIC AMBIENT GLOWS (CYBERBOX)
======================================================= */
.ambient-holo-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(140px);
    z-index: 1;
    opacity: 0.45;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.glow-purple {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(122, 0, 255, 0.5) 0%, transparent 70%);
    top: 5%;
    right: -150px;
}

.glow-cyan {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.25) 0%, transparent 70%);
    bottom: 10%;
    left: -150px;
}

/* ========================================================
   CENTRAL HOLOGRAM CHARACTER DISPLAY
======================================================== */
.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;
}

.hologram-figure,
.hologram-video {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    transform-origin: bottom center;
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    filter: none !important;
}

/* ========================================================
   ENLARGED & BIDI-SAFE HOLOBOX SITE FOOTER
======================================================== */
.site-holobox-footer {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: min(94vw, 780px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.6rem 0.95rem;
    border-radius: 22px;
    background: rgba(14, 5, 32, 0.84);
    border: 1px solid rgba(198, 169, 254, 0.25);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 25px rgba(122, 0, 255, 0.18);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.site-holobox-footer:hover {
    transform: translateX(-50%) translateY(-2px);
    border-color: rgba(198, 169, 254, 0.45);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 32px rgba(155, 48, 255, 0.25);
}

/* BiDi Isolation: Left-to-Right Powered Badge */
.site-holobox-footer .footer-powered {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    direction: ltr !important;
}

.site-holobox-footer .powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 1.25rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(198, 169, 254, 0.22);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    cursor: default;
}

.site-holobox-footer .powered-spark {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--holo-neon-lime);
    box-shadow: 0 0 10px var(--holo-neon-lime);
    flex-shrink: 0;
    animation: spark-pulse 2.2s ease-in-out infinite;
}

@keyframes spark-pulse {
    0%, 100% {
        transform: scale(0.9);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 14px var(--holo-neon-lime);
    }
}

.site-holobox-footer .powered-text {
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.03em;
}

.site-holobox-footer .powered-brand {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, #c6a9fe, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* BiDi Isolation: Right-to-Left Arabic Metadata */
.site-holobox-footer .footer-meta {
    width: 100%;
    direction: rtl !important;
    text-align: center;
}

.site-holobox-footer .footer-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.6;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.site-holobox-footer .footer-divider {
    display: inline-block;
    margin: 0 0.35rem;
    color: rgba(198, 169, 254, 0.4);
    font-weight: 400;
}

.site-holobox-footer .footer-novay-highlight {
    display: inline-flex;
    align-items: center;
    background: #5b21b6;
    color: #ffffff;
    padding: 0.15rem 0.65rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    border: 1px solid rgba(198, 169, 254, 0.35);
    box-shadow: 0 2px 8px rgba(91, 33, 182, 0.4);
    cursor: default;
}

@media (max-width: 640px) {
    .site-holobox-footer {
        bottom: 0.85rem;
        width: 95vw;
        padding: 0.75rem 1rem 0.7rem;
        gap: 0.45rem;
        border-radius: 16px;
    }
    .site-holobox-footer .powered-badge {
        padding: 0.35rem 0.95rem;
        gap: 0.45rem;
    }
    .site-holobox-footer .powered-text {
        font-size: 0.82rem;
    }
    .site-holobox-footer .powered-brand {
        font-size: 0.92rem;
    }
    .site-holobox-footer .footer-text {
        font-size: 0.76rem;
        gap: 0.25rem;
    }
    .site-holobox-footer .footer-divider {
        margin: 0 0.2rem;
    }
    .site-holobox-footer .footer-novay-highlight {
        font-size: 0.75rem;
        padding: 0.1rem 0.45rem;
    }
}

/* ========================================================
   ELEVENLABS CONCEALMENT VAULT
======================================================== */
.elevenlabs-shadow-vault {
    position: fixed !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(100%) !important;
    z-index: -9999 !important;
}

.elevenlabs-shadow-vault elevenlabs-convai {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ========================================================
   4K DISPLAY SCALING (86-INCH VIEWPORT: 2160x3840)
======================================================== */
@media (min-width: 1400px) and (min-height: 2000px) {
    .site-holobox-footer {
        bottom: 2.8rem;
        width: min(88vw, 1100px);
        padding: 1.5rem 2.5rem 1.4rem;
        border-radius: 32px;
        gap: 1.1rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(122, 0, 255, 0.25);
    }
    
    .site-holobox-footer .powered-badge {
        padding: 0.75rem 1.8rem;
        gap: 0.85rem;
        border-radius: 60px;
    }
    
    .site-holobox-footer .powered-spark {
        width: 12px;
        height: 12px;
        box-shadow: 0 0 16px var(--holo-neon-lime);
    }
    
    .site-holobox-footer .powered-text {
        font-size: 1.35rem;
    }
    
    .site-holobox-footer .powered-brand {
        font-size: 1.55rem;
    }
    
    .site-holobox-footer .footer-text {
        font-size: 1.35rem;
        gap: 0.6rem;
    }
    
    .site-holobox-footer .footer-divider {
        margin: 0 0.6rem;
    }
    
    .site-holobox-footer .footer-novay-highlight {
        padding: 0.25rem 0.95rem;
        font-size: 1.3rem;
        border-radius: 8px;
    }
}
