__DELETE_ME__

/* --- SLIDESHOW FULLSCREEN POSTER & POSTER LAYOUT --- */
/* tombstone: removed hundreds of duplicate .ss-resize-indicator rules that were accidentally duplicated during previous edits */

.ss-fullscreen-poster-overlay {
    position: fixed;
    inset: 0;
    z-index: 40000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.ss-fullscreen-poster-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(18px) brightness(0.6);
    transform: scale(1.1);
}

/* Fullscreen controls layout:
   - Top row: Prev / Pause / Next
   - Second row: Preview / Listen
*/
.ss-fs-controls-container {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 5;
    align-items: center;
    justify-content: center;
    width: 100%;
    pointer-events: none; /* buttons have pointer-events:auto */
}

.ss-fs-main-row,
.ss-fs-secondary-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* child buttons override this */
}

.ss-fs-main-row .slideshow-control-button,
.ss-fs-secondary-row .slideshow-control-button {
    pointer-events: auto;
}

/* Reuse base round button styles but ensure pointer events are on */
.ss-fs-controls-container .slideshow-control-button {
    pointer-events: auto;
    width: 65px;
    height: 65px;
    font-size: 1.5rem;
    background: rgba(var(--primary-color-rgb), 0.85); /* Slightly more transparent */
}

.ss-fs-controls-container .slideshow-control-button img,
.ss-fs-controls-container .slideshow-control-button svg {
    width: 60%;
    height: 60%;
    object-fit: contain;
    border-radius: 50%;
}

/* Close button (top right) */
.ss-fs-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 2px solid var(--primary-color);
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    line-height: 1;
    transition: transform 0.2s ease;
}
.ss-fs-close-button:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: #000;
}

/* Fullscreen poster image */
.ss-fullscreen-poster-img {
    position: relative;
    z-index: 1;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 28px rgba(0,0,0,0.8);
    animation: ssFsZoomSequence 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Fullscreen shrink indicator (bottom-left corner) */
.ss-fs-resize-indicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 6;
    opacity: 0.5;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* Zoom sequence: zoom out to zero, then back in */
@keyframes ssFsZoomSequence {
    0%   { transform: scale(1); opacity: 1; }
    49%  { transform: scale(0); opacity: 0; }
    50%  { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- MAIN POSTER (in-window) --- */

.slideshow-poster {
    float: right;
    width: 185px;
    height: 278px;
    border-radius: 8px;
    overflow: visible !important;
    cursor: default;
    box-shadow: none;
    border: 1px solid var(--primary-color);
    flex-shrink: 0;
    z-index: 1;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    transform: translateY(0);
    position: relative;
    background: transparent;
}

.slideshow-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: opacity 0.5s ease,
                transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: center center;
    border-radius: 8px;
}

/* Reflection under poster */
.slideshow-poster::after {
    content: "";
    position: absolute;
    top: 100%;
    margin-top: 1px;
    left: 0;
    width: 100%;
    padding-bottom: 10.5%;
    height: 0;
    z-index: -2;
    background-image: var(--ss-curr-poster);
    background-repeat: no-repeat;
    /* poster ratio 2:3 => background-size 100% x 150% */
    background-size: 100% calc(100% / 0.66666);
    background-position: 0% 93%;
    transform: scaleY(-1);
    transform-origin: top;
    mask-image: linear-gradient(
      to top,
      rgba(0,0,0,0.7) 0%,
      rgba(0,0,0,0.3) 50%,
      transparent 100%
    );
    -webkit-mask-image: linear-gradient(
      to top,
      rgba(0,0,0,0.7) 0%,
      rgba(0,0,0,0.3) 50%,
      transparent 100%
    );
    opacity: 0.7;
}

/* Runtime + rating cluster in the top-right of the main movie image (smallest view only) */
.slideshow-poster .ss-poster-stats {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 5;
}

/* Runtime row, positioned 20px to the right of image edge */
.slideshow-poster .ss-poster-runtime {
    position: absolute;
    top: 8px;
    left: calc(100% + 20px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-size: 0.85rem;
}

.slideshow-poster .ss-poster-runtime .clock-icon {
    margin-right: 10px;
}

.slideshow-poster .ss-poster-rating-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

/* Hide small-view stats when expanded */
.slideshow-poster.expanded .ss-poster-stats {
    display: none !important;
}

/* Preview & Listen buttons on poster */

@keyframes ssPreviewPopIn {
  0% { transform: scale(0.6); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes ssPreviewFloatVertical3px {
  0%   { transform: translateY(1.5px); }
  50%  { transform: translateY(-1.5px); }
  100% { transform: translateY(1.5px); }
}

/* Preview button (round) */
.slideshow-poster #ssPreviewButton {
    position: absolute !important;
    bottom: 185px; /* 15 + 170 */
    right: -35px;
    top: auto;
    left: auto;
    margin: 0;
    z-index: 20;
    width: 102px !important;
    height: 102px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    animation:
      ssPreviewPopIn 0.35s ease-out forwards,
      ssPreviewFloatVertical3px 4s ease-in-out 0.35s infinite;
}

/* Listen button (round) */
.slideshow-poster #ssSpeakerButton {
    position: absolute !important;
    bottom: 15px;
    right: -35px;
    top: auto;
    left: auto;
    margin: 0;
    z-index: 20;
    width: 102px !important;
    height: 102px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    animation:
      ssPreviewPopIn 0.35s ease-out forwards,
      ssPreviewFloatVertical3px 4s ease-in-out 0.35s infinite;
}

.slideshow-poster #ssSpeakerButton img,
.slideshow-poster #ssSpeakerButton svg {
    width: 60%;
    height: 60%;
    display: block;
}

/* Flat "auto audio" button under Listen */
.slideshow-poster #ssAutoAudioButton {
    position: absolute !important;
    bottom: -95px;
    right: -35px;
    top: auto;
    left: auto;
    margin: 0;
    z-index: 20;
    width: 102px !important;
    height: 102px !important;
    border-radius: 50%;
    background: rgba(var(--primary-color-rgb), 0.9);
    color: var(--text-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation:
      ssPreviewPopIn 0.35s ease-out forwards,
      ssPreviewFloatVertical3px 4s ease-in-out 0.55s infinite;
}

.slideshow-poster #ssAutoAudioButton svg {
    width: 60%;
    height: 60%;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.2;
}

/* Glow when auto audio mode is active */
.slideshow-poster #ssSpeakerButton.auto-mode,
.slideshow-poster #ssAutoAudioButton.auto-mode {
    box-shadow: 0 0 18px 4px rgba(var(--primary-color-rgb), 0.9);
}

/* Audio slideshow "large" mode */
.slideshow-poster #ssSpeakerButton.audio-slideshow-active {
    transform-origin: center center;
    background-color: rgba(var(--primary-color-rgb), 0.9) !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
    z-index: 100 !important;
    box-shadow: 0 0 30px rgba(var(--primary-color-rgb), 0.9) !important;
    animation: ssLargeFloat 5s ease-in-out infinite !important;
}

@keyframes ssLargeFloat {
    0%   { transform: scale(3) translateY(0); }
    50%  { transform: scale(3) translateY(-4px); }
    100% { transform: scale(3) translateY(0); }
}

/* Resize indicator (touch-to-expand cue) */
.ss-resize-indicator {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    z-index: 15;
    pointer-events: none; /* pointer goes to poster */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Enlarged cue when poster is expanded */
.slideshow-poster.expanded .ss-resize-indicator {
    transform: scale(1.35);
    background: rgba(var(--primary-color-rgb), 0.65);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile layout adjustments */
@media (min-width: 769px) {
    .slideshow-poster {
        margin: 60px auto 0 auto;
        float: none;
    }
}

@media (max-width: 768px) {
    .slideshow-poster {
        width: 150px;
        height: 225px;
        float: none;
        margin: 0 auto 15px auto;
        transform: translateX(-80px);
        border-radius: 5px;
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }

    .slideshow-poster img {
        border-radius: 5px;
        width: 100%;
        height: 100%;
    }

    .slideshow-poster #ssPreviewButton {
        width: 50px !important;
        height: 50px !important;
        bottom: 70px;
        right: -40px;
    }

    .slideshow-poster #ssSpeakerButton {
        width: 50px !important;
        height: 50px !important;
        bottom: 10px;
        right: -40px;
        position: absolute !important;
    }

    .slideshow-poster #ssAutoAudioButton {
        width: 50px !important;
        height: 50px !important;
        bottom: -50px;
        right: -40px;
        position: absolute !important;
    }

    .slideshow-poster.expanded {
        width: calc(100% - 30px) !important;
        height: auto !important;
        max-height: 80vh;
        margin: 0 15px 15px 15px;
        transform: translateX(0);
        border-radius: 15px;
    }

    .slideshow-poster.expanded img {
        border-radius: 15px;
    }

    .slideshow-poster.expanded #ssPreviewButton {
        right: 15px !important;
        bottom: 75px !important;
    }

    .slideshow-poster.expanded #ssSpeakerButton {
        right: 15px !important;
        bottom: 15px !important;
    }

    .slideshow-poster.expanded #ssAutoAudioButton {
        right: 15px !important;
        bottom: -45px !important;
    }
}