/* ====================================================================
   OCTOBER GALLERY - MARZIPANO GLASSMORPHISM THEME V2
   Ultra-aggressive overrides to eliminate ALL grey backgrounds
   ==================================================================== */

/* Configuration Variables */
:root {
    --glass-blur: 20px;
    --glass-bg-ultralight: rgba(255, 255, 255, 0.08);  /* Unused */
    --glass-bg-light: rgba(255, 255, 255, 0.15);       /* Control buttons */
    --glass-bg-medium: rgba(255, 255, 255, 0.25);      /* Title bar, scene menu */
    --glass-bg-dark: rgba(255, 255, 255, 0.35);        /* Unused */
    --glass-bg-heavy: rgba(255, 255, 255, 0.5);        /* Info hotspots (desktop & mobile), tooltips */
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    
    --text-primary: #4a4f51;
    --text-grey-dark: rgba(74, 79, 81, 0.95);
    --text-hover: #2a2f31;
    --text-white: rgba(255, 255, 255, 0.95);
    --text-white-hover: #ffffff;
    
    --accent-red: #E41E33;
    --accent-grey: #4a4f51;
    
    --font-primary: 'Open Sans Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Barlow Semi Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --border-radius: 12px;
    --border-radius-small: 8px;
}

/* ====================================================================
   TITLE BAR - White text for contrast
   ==================================================================== */
#titleBar .sceneName {
    background: var(--glass-bg-medium) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-small) !important;
    box-shadow: var(--glass-shadow) !important;
    color: var(--text-white) !important;
    font-family: var(--font-primary);
    font-weight: 300;
    letter-spacing: 0.04em;
    transition: all var(--transition-medium);
}

#titleBar .sceneName:hover {
    background: var(--glass-bg-dark) !important;
    color: var(--text-white-hover) !important;
}

/* ====================================================================
   CONTROL BUTTONS
   ==================================================================== */
#fullscreenToggle,
#autorotateToggle,
#sceneListToggle,
.viewControlButton {
    background: var(--glass-bg-light) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-small) !important;
    box-shadow: var(--glass-shadow) !important;
    transition: all var(--transition-fast);
}

#fullscreenToggle:hover,
#autorotateToggle:hover,
#sceneListToggle:hover,
.no-touch .viewControlButton:hover {
    background: var(--glass-bg-medium) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05);
}

#fullscreenToggle .icon,
#autorotateToggle .icon,
#sceneListToggle .icon,
.viewControlButton .icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ====================================================================
   SCENE LIST
   ==================================================================== */
#sceneList .scenes {
    background: var(--glass-bg-medium) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--glass-border) !important;
    border-top-right-radius: var(--border-radius) !important;
    border-bottom-right-radius: var(--border-radius) !important;
    box-shadow: var(--glass-shadow) !important;
}

#sceneList .scene {
    position: relative;
}

#sceneList .scene .text {
    color: var(--text-primary) !important;
    font-family: var(--font-primary);
    font-weight: 300;
    letter-spacing: 0.02em;
}

.no-touch #sceneList .scene:hover {
    background: var(--glass-bg-light) !important;
}

#sceneList .scene.current {
    background: var(--glass-bg-dark) !important;
}

#sceneList .scene.current .text {
    font-weight: 500;
}

#sceneList .scene.current::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--accent-red);
    border-radius: 0 2px 2px 0;
}

/* ====================================================================
   LINK HOTSPOT TOOLTIPS
   ==================================================================== */
.link-hotspot-tooltip {
    background: var(--glass-bg-dark) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: var(--border-radius-small) !important;
    box-shadow: var(--glass-shadow) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-secondary);
}

/* ====================================================================
   INFO HOTSPOT - ULTRA SPECIFIC OVERRIDES
   ==================================================================== */

/* CRITICAL: Strip ALL backgrounds first */
.info-hotspot,
.info-hotspot * {
    background: transparent !important;
    background-color: transparent !important;
}

.info-hotspot {
    position: relative !important;
}

.info-hotspot .info-hotspot-icon-wrapper {
    width: auto !important;
    height: auto !important;
}

.info-hotspot .info-hotspot-header,
.info-hotspot .info-hotspot-header *,
.info-hotspot .info-hotspot-icon-wrapper,
.info-hotspot .info-hotspot-title-wrapper,
.info-hotspot .info-hotspot-title,
.info-hotspot .info-hotspot-close-wrapper,
.info-hotspot .info-hotspot-text,
.info-hotspot .info-hotspot-text *,
.desktop .info-hotspot.visible,
.desktop .info-hotspot.visible *,
.desktop .info-hotspot.visible .info-hotspot-header,
.desktop .info-hotspot.visible .info-hotspot-header *,
.desktop .info-hotspot.visible .info-hotspot-text,
.desktop .info-hotspot.visible .info-hotspot-text *,
.desktop.no-touch .info-hotspot .info-hotspot-header:hover,
.desktop.no-touch .info-hotspot .info-hotspot-header:hover *,
.desktop.no-touch .info-hotspot.visible .info-hotspot-header:hover,
.desktop.no-touch .info-hotspot.visible .info-hotspot-header:hover *,
.mobile .info-hotspot .info-hotspot-header,
.mobile .info-hotspot .info-hotspot-header * {
    background: transparent !important;
    background-color: transparent !important;
}

/* Now apply MORE OPAQUE GLASS to header and text containers ONLY */
.info-hotspot .info-hotspot-header,
.mobile .info-hotspot .info-hotspot-header {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 2;
    overflow: visible !important;
    border-radius: 50% !important;
    width: 42px !important;
    height: 42px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

.desktop .info-hotspot.visible .info-hotspot-header,
.desktop.no-touch .info-hotspot.visible .info-hotspot-header:hover {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    padding: 18px 15px !important;
    min-height: auto !important;
    height: auto !important;
    min-width: 300px !important;
    width: auto !important;
    white-space: normal !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    position: relative !important;
    z-index: 2;
    border-radius: var(--border-radius-small) var(--border-radius-small) 0 0 !important;
    display: block !important;
    text-align: left !important;
    justify-content: flex-start !important;
}

.desktop .info-hotspot.visible .info-hotspot-header > * {
    text-align: left !important;
    display: block !important;
}

.desktop .info-hotspot.visible .info-hotspot-icon-wrapper {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.info-hotspot .info-hotspot-text,
.desktop .info-hotspot.visible .info-hotspot-text {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-top: none !important;
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    font-family: 'Century Gothic', 'AppleGothic', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    padding: 15px 40px 15px 15px !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1;
    margin-top: 0 !important;
}

/* Info hotspot icons */
.info-hotspot .info-hotspot-icon {
    opacity: 1;
    max-width: 24px !important;
    max-height: 24px !important;
    vertical-align: middle;
}

.desktop .info-hotspot.visible .info-hotspot-icon {
    vertical-align: middle;
    max-width: 28px !important;
    max-height: 28px !important;
}

.info-hotspot .info-hotspot-icon-wrapper {
    position: static !important;
    width: auto !important;
    height: auto !important;
    max-width: 32px !important;
    max-height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Info hotspot title */
.info-hotspot .info-hotspot-title-wrapper {
    display: none !important;
}

.desktop .info-hotspot.visible .info-hotspot-title-wrapper {
    display: block !important;
    -webkit-line-clamp: unset !important;
    -webkit-box-orient: unset !important;
    overflow: visible !important;
    white-space: normal !important;
    height: auto !important;
    max-height: none !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    width: 100% !important;
    float: none !important;
    position: static !important;
    left: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    flex-direction: row !important;
}

.info-hotspot .info-hotspot-title {
    color: var(--text-primary) !important;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    display: block !important;
}

.desktop .info-hotspot.visible .info-hotspot-title {
    white-space: normal !important;
    overflow: visible !important;
    word-wrap: break-word !important;
    text-align: left !important;
    margin: 0 !important;
    padding: 0 !important;
    text-indent: 0 !important;
    display: block !important;
}

/* Close button - START STATE RED, HOVER STATE WHITE */
.info-hotspot .info-hotspot-close-wrapper {
    display: none !important;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper {
    display: flex !important;
    background: var(--accent-red) !important;
    background-color: var(--accent-red) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    position: absolute !important;
    top: 8px !important;
    right: -44px !important;
    width: 32px !important;
    height: 32px !important;
    z-index: 3 !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all var(--transition-fast) !important;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.1) !important;
}

.info-hotspot .info-hotspot-close-icon {
    filter: brightness(0) invert(1);
    opacity: 1;
    width: 14px !important;
    height: 14px !important;
    transition: filter var(--transition-fast) !important;
}

.desktop .info-hotspot.visible .info-hotspot-close-wrapper:hover .info-hotspot-close-icon {
    filter: brightness(0) saturate(100%) invert(25%) sepia(90%) saturate(3000%) hue-rotate(345deg) brightness(95%) contrast(90%);
}

/* Kill ALL pseudo elements that might create grey */
.info-hotspot .info-hotspot-header::before,
.info-hotspot .info-hotspot-header::after,
.info-hotspot .info-hotspot-text::before,
.info-hotspot .info-hotspot-text::after {
    display: none !important;
    background: transparent !important;
    background-color: transparent !important;
}

/* ====================================================================
   INFO HOTSPOT MODAL (Mobile)
   ==================================================================== */

.info-hotspot-modal {
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

/* Strip all backgrounds */
.info-hotspot-modal,
.info-hotspot-modal *,
.info-hotspot-modal .info-hotspot-header,
.info-hotspot-modal .info-hotspot-header *,
.info-hotspot-modal .info-hotspot-text,
.info-hotspot-modal .info-hotspot-text *,
.info-hotspot-modal.visible,
.info-hotspot-modal.visible *,
.info-hotspot-modal.visible .info-hotspot-header,
.info-hotspot-modal.visible .info-hotspot-header *,
.info-hotspot-modal.visible .info-hotspot-text,
.info-hotspot-modal.visible .info-hotspot-text * {
    background: transparent !important;
    background-color: transparent !important;
}

/* Apply MORE OPAQUE glass to mobile containers with grey text */
.info-hotspot-modal .info-hotspot-header,
.info-hotspot-modal.visible .info-hotspot-header {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

.info-hotspot-modal .info-hotspot-text,
.info-hotspot-modal.visible .info-hotspot-text {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.6;
}

.info-hotspot-modal .info-hotspot-icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.info-hotspot-modal .info-hotspot-title {
    color: var(--text-primary) !important;
    font-family: var(--font-primary);
    font-weight: 400;
}

.info-hotspot-modal .info-hotspot-close-wrapper {
    background: rgba(255, 255, 255, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.5) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: var(--border-radius-small) !important;
}

.info-hotspot-modal .info-hotspot-close-wrapper:hover {
    background: var(--accent-red) !important;
    background-color: var(--accent-red) !important;
}

.info-hotspot-modal .info-hotspot-close-icon {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Kill pseudo elements */
.info-hotspot-modal .info-hotspot-header::before,
.info-hotspot-modal .info-hotspot-header::after,
.info-hotspot-modal .info-hotspot-text::before,
.info-hotspot-modal .info-hotspot-text::after {
    display: none !important;
    background: transparent !important;
}

/* ====================================================================
   SCROLLBARS
   ==================================================================== */
#sceneList::-webkit-scrollbar,
.info-hotspot .info-hotspot-text::-webkit-scrollbar,
.info-hotspot-modal .info-hotspot-text::-webkit-scrollbar {
    width: 8px;
}

#sceneList::-webkit-scrollbar-track,
.info-hotspot .info-hotspot-text::-webkit-scrollbar-track,
.info-hotspot-modal .info-hotspot-text::-webkit-scrollbar-track {
    background: rgba(74, 79, 81, 0.15);
    border-radius: 4px;
}

#sceneList::-webkit-scrollbar-thumb,
.info-hotspot .info-hotspot-text::-webkit-scrollbar-thumb,
.info-hotspot-modal .info-hotspot-text::-webkit-scrollbar-thumb {
    background: rgba(74, 79, 81, 0.4);
    border-radius: 4px;
}

/* ====================================================================
   ANIMATIONS
   ==================================================================== */
@keyframes slideInFromLeft {
    from {
        opacity: 0.7;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

#sceneList.enabled {
    animation: slideInFromLeft var(--transition-slow) ease-out;
}

/* ====================================================================
   MOBILE OPTIMIZATIONS
   ==================================================================== */
@media (max-width: 600px) {
    :root {
        --glass-blur: 15px;
        --border-radius: 10px;
        --border-radius-small: 6px;
    }
    
    #titleBar .sceneName {
        font-size: 14px;
    }
}

/* ====================================================================
   ACCESSIBILITY
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    :root {
        --glass-bg-light: rgba(255, 255, 255, 0.3);
        --glass-bg-medium: rgba(255, 255, 255, 0.5);
        --text-primary: #000000;
    }
}