/* --- SLIDESHOW LAYOUT (Extracted from _slideshow-base.css) --- */

/* Full-screen slideshow overlay */
.slideshow-overlay.fs-mode {
    overflow: hidden !important; /* No scrollbars in FS mode */
}

.slideshow-overlay {
  position: fixed; 
  inset: 0; 
  z-index: 30000;
  background: var(--primary-color); /* Theme primary color background */
  display: flex; 
  flex-direction: column;
  justify-content: flex-start; 
  align-items: center;
  overflow: hidden; /* Prevent scrollbars from appearing on the first slideshow window */
  padding: 4vh 4vw; 
  /* Always blur everything behind the slideshow window (desktop & mobile) */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* NEW: Transparency toggle (outer background) */
:root[data-ss-transparency="true"] .slideshow-overlay {
  background-color: rgba(var(--primary-color-rgb), 0.2);
}

/* When off: opaque */
:root[data-ss-transparency="false"] .slideshow-overlay {
  background-color: var(--primary-color);
}

/* Header for close button and theme toggle */
.slideshow-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2vh 2vw;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    pointer-events: none; 
    z-index: 30001;
}

/* Hide the close icon in the slideshow's upper-right corner */
.slideshow-close-button {
    display: none !important;
}

.slideshow-close-button {
    font-size: 2rem;
    right: calc(2vw + 36px + 5px); 
}

/* Main Content Area */
.slideshow-description-container {
    width: 90%;
    max-width: 1560px;
    background-color: rgba(20, 20, 20, 0.7); /* Match modal background */
    backdrop-filter: blur(10px); /* Match modal blur */
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    padding: 30px; 
    margin-top: 10px; 
    padding-bottom: 120px; 
    color: #fff !important; 
    flex-shrink: 0;
    position: relative;
}

/* NEW: Transparency toggle (inner background window) */
:root[data-ss-transparency="true"] .slideshow-description-container {
    background-color: rgba(20, 20, 20, 0.2);
}

/* When off: opaque */
:root[data-ss-transparency="false"] .slideshow-description-container {
    background-color: rgba(20, 20, 20, 1);
}

/* Fullscreen Mode: Hide inner window chrome and other UI elements */
.slideshow-overlay.fs-mode .slideshow-description-container {
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Fullscreen Mode: Poster‑driven background that reflects current image */
.slideshow-overlay.fs-mode {
    /* Keep fullscreen layout/positioning from the base .slideshow-overlay,
       but move the poster-based background into a blurred ::before layer
       so we can animate its opacity separately. */
    position: fixed;
    inset: 0;
    overflow: hidden;
    /* Remove direct background image here; it will be provided by ::before */
    background: radial-gradient(circle at center, rgba(0,0,0,0.25), rgba(0,0,0,0.9));
}

/* Heavily blurred fullscreen poster background, delayed fade-in */
.slideshow-overlay.fs-mode::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at center, rgba(0,0,0,0.25), rgba(0,0,0,0.9)),
      var(--ss-bg-poster, none);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: blur(30px);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    /* Fade in after 1 second so the main image is visible first */
    animation: fsBgFadeIn 0.8s ease-out forwards;
    animation-delay: 1s;
}

/* Ensure inner content sits above the blurred background layer */
.slideshow-overlay.fs-mode .slideshow-description-container,
.slideshow-overlay.fs-mode .slideshow-controls-container,
.slideshow-overlay.fs-mode .slideshow-cast-area {
    position: relative;
    z-index: 1;
}

/* Keep chrome off on top of the fullscreen image */
.slideshow-overlay.fs-mode .slideshow-info-bar,
.slideshow-overlay.fs-mode .slideshow-header {
    display: none !important;
}

@media (min-width: 769px) {
  :root[data-bg-desktop-hidden="false"] .slideshow-overlay {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}

@media (max-width: 768px) {
    .slideshow-description-container {
        width: 100%;
        margin-top: 70px; 
        padding: 15px;
        padding-bottom: 0; 
    }
}