/**
 * Premium Dynamic Slider — frontend styles.
 *
 * Zero dependencies, theme-agnostic. All configurable values arrive as CSS
 * variables written by the per-slider <style> block in the renderer, with
 * safe fallbacks everywhere so a slider never breaks a theme.
 *
 * @package Premium_Dynamic_Slider
 */

/* ================================================================== base */

.pds-slider {
        --pds-height: 620px;
        --pds-duration: 700ms;
        --pds-autoplay: 5000ms;
        --pds-fh: 54px;
        --pds-fs: 24px;
        --pds-ft: 17px;
        --pds-justify: flex-start;
        --pds-valign: center;
        --pds-textalign: left;
        --pds-spacing: 24px;
        --pds-arrow-size: 48px;
        --pds-arrow-color: #ffffff;
        --pds-arrow-bg: rgba(15, 18, 32, 0.45);
        --pds-arrow-hover-color: #ffffff;
        --pds-arrow-hover-bg: #6c5ce7;
        --pds-dot-color: rgba(255, 255, 255, 0.5);
        --pds-dot-active: #ffffff;
        --pds-radius: 0px;
        --pds-boxed: 1200px;
        --pds-delay: 120ms;
        --pds-accent: #6c5ce7;
        --pds-accent-2: #8b5cf6;

        position: relative;
        height: var(--pds-height);
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        border-radius: var(--pds-radius);
        background: #101226;
        isolation: isolate;
        direction: ltr;
        font-family: inherit;
        line-height: 1.4;
        -webkit-tap-highlight-color: transparent;
}

.pds-slider *,
.pds-slider *::before,
.pds-slider *::after {
        box-sizing: border-box;
}

.pds-slider.pds-rtl {
        direction: rtl;
}

/* Boxed layout: constrained, centered frame. */
.pds-layout-boxed {
        width: min(100%, var(--pds-boxed));
        margin-left: auto;
        margin-right: auto;
}

/* Fullscreen layout: viewport height. */
.pds-layout-fullscreen {
        height: 100vh;
        height: 100dvh;
}

.pds-viewport {
        position: absolute;
        inset: 0;
        overflow: hidden;
        touch-action: pan-y; /* horizontal swipes belong to the slider, vertical page scroll stays native */
}

.pds-track {
        display: flex;
        flex-direction: row;
        height: 100%;
        will-change: transform;
        transition: transform var(--pds-duration) cubic-bezier(0.45, 0, 0.2, 1);
}

.pds-mode-track.pds-layout-vertical .pds-track {
        flex-direction: column;
}

/* Vertical layouts consume vertical gestures instead. */
.pds-layout-vertical .pds-viewport {
        touch-action: pan-x;
}

/* ------------------------------------------------------------- slides */

.pds-slide {
        position: relative;
        flex: 0 0 100%;
        min-width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 1;
}

/* Stack mode: layered slides, effect classes below animate them. */
.pds-mode-stack .pds-slide {
        position: absolute;
        inset: 0;
        flex: none;
        min-width: 0;
        opacity: 0;
        visibility: hidden;
        transition:
                opacity var(--pds-duration) ease,
                transform var(--pds-duration) cubic-bezier(0.45, 0, 0.2, 1),
                visibility 0s linear var(--pds-duration);
        z-index: 1;
}

.pds-mode-stack .pds-slide.pds-is-active {
        opacity: 1;
        visibility: visible;
        z-index: 2;
        transition-delay: 0s, 0s, 0s;
}

/* Track mode keeps slides visible; the engine moves the track. */
.pds-mode-track .pds-slide {
        opacity: 1;
        visibility: visible;
}

/* Centered carousel: peeked neighbours are de-emphasized. */
.pds-mode-track.pds-layout-centered .pds-slide {
        flex: 0 0 74%;
        min-width: 74%;
        transform: scale(0.92);
        opacity: 0.55;
        transition: transform var(--pds-duration) cubic-bezier(0.45, 0, 0.2, 1), opacity var(--pds-duration) ease;
        cursor: pointer;
        border-radius: var(--pds-radius);
        overflow: hidden;
        margin-right: 2%;
}

.pds-mode-track.pds-layout-centered .pds-slide.pds-is-active {
        transform: scale(1);
        opacity: 1;
        cursor: default;
}

/* ============================================================== media */

.pds-slide-media {
        position: absolute;
        inset: 0;
        overflow: hidden;
        z-index: 1;
}

.pds-slide-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        user-select: none;
        -webkit-user-drag: none;
}

.pds-media-empty {
        background: linear-gradient(135deg, #2b3157, #6c5ce7);
}

.pds-media-video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        background: #000;
}

/* Image hover effects. */
.pds-hover-zoom .pds-slide-media img,
.pds-hover-zoom .pds-split-media img {
        transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.pds-hover-zoom .pds-slide:hover .pds-slide-media img,
.pds-hover-zoom .pds-slide:hover .pds-split-media img {
        transform: scale(1.045);
}

.pds-hover-grayscale .pds-slide-media img {
        transition: filter 0.6s ease;
        filter: grayscale(0.85);
}

.pds-hover-grayscale .pds-slide:hover .pds-slide-media img {
        filter: grayscale(0);
}

.pds-hover-shine .pds-slide-media::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
        transform: translateX(-120%);
        transition: transform 1.1s ease;
        pointer-events: none;
}

.pds-hover-shine .pds-slide:hover .pds-slide-media::after {
        transform: translateX(120%);
}

/* ============================================================ overlay */

.pds-overlay {
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 2;
}

/* ============================================================ content */

.pds-content {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        justify-content: var(--pds-valign, center);
        align-items: var(--pds-justify, flex-start);
        text-align: var(--pds-textalign, left);
        padding: calc(var(--pds-spacing) * 1.5) calc(var(--pds-spacing) * 2.5);
        color: var(--pds-slide-text, #ffffff);
        z-index: 3;
}

.pds-content-empty {
        display: none;
}

/* Per-slide 9-grid position overrides. */
.pds-pos-left-top { justify-content: flex-start; align-items: flex-start; }
.pds-pos-left-center { justify-content: center; align-items: flex-start; }
.pds-pos-left-bottom { justify-content: flex-end; align-items: flex-start; }
.pds-pos-center-top { justify-content: flex-start; align-items: center; }
.pds-pos-center-center { justify-content: center; align-items: center; }
.pds-pos-center-bottom { justify-content: flex-end; align-items: center; }
.pds-pos-right-top { justify-content: flex-start; align-items: flex-end; }
.pds-pos-right-center { justify-content: center; align-items: flex-end; }
.pds-pos-right-bottom { justify-content: flex-end; align-items: flex-end; }

.pds-align-left { text-align: left; }
.pds-align-center { text-align: center; }
.pds-align-right { text-align: right; }

.pds-title {
        margin: 0 0 0.35em;
        padding: 0;
        font-size: var(--pds-fh, 54px);
        font-weight: 700;
        line-height: 1.12;
        letter-spacing: -0.015em;
        text-wrap: balance;
        text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
        max-width: 22ch;
}

.pds-subtitle {
        margin: 0 0 0.7em;
        padding: 0;
        font-size: var(--pds-fs, 24px);
        font-weight: 500;
        line-height: 1.35;
        opacity: 0.94;
        text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
        max-width: 46ch;
}

.pds-description {
        margin: 0 0 1.4em;
        font-size: var(--pds-ft, 17px);
        line-height: 1.68;
        opacity: 0.88;
        max-width: 62ch;
        text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.pds-description p { margin: 0 0 0.6em; }
.pds-description p:last-child { margin-bottom: 0; }

.pds-custom-html { margin-top: 1em; font-size: var(--pds-ft, 17px); }
.pds-custom-html::after { content: ""; display: block; clear: both; }

/* ============================================================== buttons */

.pds-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 0.2em;
}

.pds-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 13px 30px;
        border-radius: 9px;
        font-size: 15px;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none !important;
        cursor: pointer;
        border: 1.5px solid transparent;
        transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
        backdrop-filter: blur(2px);
}

.pds-btn:hover { transform: translateY(-2px); }
.pds-btn:active { transform: translateY(0); }

.pds-btn-primary,
.pds-btn-pill {
        background: linear-gradient(135deg, var(--pds-accent), var(--pds-accent-2));
        color: #ffffff;
        box-shadow: 0 8px 22px rgba(108, 92, 231, 0.4);
}

.pds-btn-primary:hover,
.pds-btn-pill:hover {
        box-shadow: 0 12px 28px rgba(108, 92, 231, 0.5);
        color: #ffffff;
}

.pds-btn-secondary {
        background: rgba(255, 255, 255, 0.06);
        border-color: currentColor;
        color: inherit;
}

.pds-btn-secondary:hover {
        background: rgba(255, 255, 255, 0.14);
        color: inherit;
}

.pds-btn-ghost {
        background: transparent;
        color: inherit;
        text-decoration: underline !important;
        text-underline-offset: 4px;
        text-decoration-thickness: 1.5px;
}

.pds-btn-ghost:hover { opacity: 0.85; color: inherit; }

.pds-btn-pill { border-radius: 999px; }

/* ================================================== text entrance anims */

.pds-anim {
        opacity: 0;
}

.pds-tanim-none .pds-anim { opacity: 1; }

@keyframes pdsFadeUp {
        from { opacity: 0; transform: translateY(26px); }
        to { opacity: 1; transform: translateY(0); }
}

@keyframes pdsFadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
}

@keyframes pdsSlideLeft {
        from { opacity: 0; transform: translateX(-46px); }
        to { opacity: 1; transform: translateX(0); }
}

@keyframes pdsSlideRight {
        from { opacity: 0; transform: translateX(46px); }
        to { opacity: 1; transform: translateX(0); }
}

@keyframes pdsZoomIn {
        from { opacity: 0; transform: scale(0.86); }
        to { opacity: 1; transform: scale(1); }
}

@keyframes pdsBlurIn {
        from { opacity: 0; filter: blur(14px); transform: translateY(10px); }
        to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.pds-tanim-fadeup .pds-slide.pds-is-active .pds-anim { animation: pdsFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pds-tanim-fadein .pds-slide.pds-is-active .pds-anim { animation: pdsFadeIn 0.9s ease both; }
.pds-tanim-slideleft .pds-slide.pds-is-active .pds-anim { animation: pdsSlideLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pds-tanim-slideright .pds-slide.pds-is-active .pds-anim { animation: pdsSlideRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pds-tanim-zoomin .pds-slide.pds-is-active .pds-anim { animation: pdsZoomIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) both; }
.pds-tanim-blur .pds-slide.pds-is-active .pds-anim { animation: pdsBlurIn 0.95s ease both; }

.pds-rtl .pds-tanim-slideleft .pds-slide.pds-is-active .pds-anim { animation-name: pdsSlideRight; }
.pds-rtl .pds-tanim-slideright .pds-slide.pds-is-active .pds-anim { animation-name: pdsSlideLeft; }

/* ================================================ image entrance anims */

@keyframes pdsImgZoomIn {
        from { transform: scale(1.14); }
        to { transform: scale(1); }
}

@keyframes pdsImgZoomOut {
        from { transform: scale(1); }
        to { transform: scale(1.1); }
}

@keyframes pdsKenBurns {
        from { transform: scale(1) translate(0, 0); }
        to { transform: scale(1.14) translate(-1.6%, -1%); }
}

@keyframes pdsPanLeft {
        from { transform: scale(1.14) translateX(3.5%); }
        to { transform: scale(1.14) translateX(-3.5%); }
}

@keyframes pdsPanRight {
        from { transform: scale(1.14) translateX(-3.5%); }
        to { transform: scale(1.14) translateX(3.5%); }
}

.pds-ianim-zoomin .pds-slide.pds-is-active .pds-slide-media img { animation: pdsImgZoomIn calc(var(--pds-autoplay) + var(--pds-duration)) ease-out both; }
.pds-ianim-zoomout .pds-slide.pds-is-active .pds-slide-media img { animation: pdsImgZoomOut calc(var(--pds-autoplay) + var(--pds-duration)) ease-out both; }
.pds-ianim-kenburns .pds-slide.pds-is-active .pds-slide-media img { animation: pdsKenBurns calc(var(--pds-autoplay) + var(--pds-duration)) ease-out both; }
.pds-ianim-panleft .pds-slide.pds-is-active .pds-slide-media img { animation: pdsPanLeft calc(var(--pds-autoplay) + var(--pds-duration)) linear both; }
.pds-ianim-panright .pds-slide.pds-is-active .pds-slide-media img { animation: pdsPanRight calc(var(--pds-autoplay) + var(--pds-duration)) linear both; }

/* ======================================================= transitions */

/* Zoom in: outgoing slides stay enlarged. */
.pds-mode-stack.pds-transition-zoomin .pds-slide { transform: scale(1.12); }
.pds-mode-stack.pds-transition-zoomin .pds-slide.pds-is-active { transform: scale(1); }

/* Zoom out: incoming grows from smaller. */
.pds-mode-stack.pds-transition-zoomout .pds-slide { transform: scale(0.9); }
.pds-mode-stack.pds-transition-zoomout .pds-slide.pds-is-active { transform: scale(1); }

/* Flip: rotate around X with perspective. */
.pds-mode-stack.pds-transition-flip .pds-viewport { perspective: 1600px; }
.pds-mode-stack.pds-transition-flip .pds-slide { transform: rotateX(-88deg); transform-origin: center bottom; backface-visibility: hidden; }
.pds-mode-stack.pds-transition-flip .pds-slide.pds-is-active { transform: rotateX(0); }

/* Creative: circle clip reveal. */
@keyframes pdsCreativeIn {
        from { clip-path: circle(0% at 50% 50%); opacity: 0.6; }
        to { clip-path: circle(142% at 50% 50%); opacity: 1; }
}

.pds-mode-stack.pds-transition-creative .pds-slide { clip-path: circle(142% at 50% 50%); }
.pds-mode-stack.pds-transition-creative .pds-slide.pds-is-active { animation: pdsCreativeIn var(--pds-duration) cubic-bezier(0.3, 0, 0.2, 1) both; }

/* Parallax: media drifts while content settles. */
@keyframes pdsParallaxMedia {
        from { transform: scale(1.16) translateX(4%); }
        to { transform: scale(1.05) translateX(0); }
}

.pds-mode-stack.pds-transition-parallax .pds-slide.pds-is-active .pds-slide-media { animation: pdsParallaxMedia calc(var(--pds-duration) * 1.35) cubic-bezier(0.22, 1, 0.36, 1) both; }

/* 3D cube: half-cube rotation illusion. */
.pds-mode-stack.pds-transition-cube3d .pds-viewport { perspective: 1400px; }
.pds-mode-stack.pds-transition-cube3d .pds-slide {
        transform: rotateY(92deg) translateZ(30%);
        transform-origin: left center;
        opacity: 0.85;
        backface-visibility: hidden;
}

.pds-mode-stack.pds-transition-cube3d .pds-slide.pds-is-active {
        transform: rotateY(0) translateZ(0);
        opacity: 1;
}

.pds-mode-stack.pds-transition-cube3d.pds-rtl .pds-slide { transform-origin: right center; transform: rotateY(-92deg) translateZ(30%); }
.pds-mode-stack.pds-transition-cube3d.pds-rtl .pds-slide.pds-is-active { transform: rotateY(0) translateZ(0); }

/* ================================================== split layout */

.pds-layout-split .pds-viewport { position: absolute; inset: 0; }
.pds-layout-split .pds-track { display: contents; }

.pds-layout-split .pds-slide {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        grid-template-rows: 100%;
}

.pds-mode-stack.pds-layout-split .pds-slide {
        position: absolute;
        inset: 0;
}

.pds-split-media {
        position: relative;
        overflow: hidden;
        height: 100%;
}

.pds-split-media img,
.pds-split-media video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
}

.pds-split-content {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: clamp(28px, 5vw, 72px);
        background: #ffffff;
        color: var(--pds-slide-text, #1e1e2f);
        z-index: 2;
        overflow: hidden auto;
}

.pds-split-content .pds-title,
.pds-split-content .pds-subtitle,
.pds-split-content .pds-description {
        color: var(--pds-slide-text, #1e1e2f);
        text-shadow: none;
}

.pds-split-content .pds-title { font-size: calc(var(--pds-fh) * 0.72); }
.pds-split-content .pds-btn-primary,
.pds-split-content .pds-btn-pill { color: #ffffff; }

@media (max-width: 900px) {
        .pds-layout-split .pds-slide {
                grid-template-columns: 1fr;
                grid-template-rows: 55% 45%;
        }
}

/* ====================================================== navigation */

/* Arrows */
.pds-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 6;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--pds-arrow-size);
        height: var(--pds-arrow-size);
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--pds-arrow-bg);
        color: var(--pds-arrow-color);
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        backdrop-filter: blur(6px);
}

.pds-arrow:hover {
        background: var(--pds-arrow-hover-bg);
        color: var(--pds-arrow-hover-color);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.pds-arrow:focus-visible {
        outline: 2px solid #ffffff;
        outline-offset: 3px;
}

.pds-arrow-prev { left: 22px; }
.pds-arrow-next { right: 22px; }
.pds-rtl .pds-arrow-prev { left: auto; right: 22px; }
.pds-rtl .pds-arrow-next { right: auto; left: 22px; }

/* Arrow positions */
.pds-arrowpos-sides-bottom .pds-arrow { top: auto; bottom: 28px; transform: none; }
.pds-arrowpos-sides-bottom.pds-dotpos-bottom-center .pds-dots { bottom: 40px; }
.pds-arrowpos-top-left .pds-arrow,
.pds-arrowpos-top-right .pds-arrow { top: 22px; transform: none; }
.pds-arrowpos-top-left .pds-arrow-prev { left: 22px; }
.pds-arrowpos-top-left .pds-arrow-next { left: calc(22px + var(--pds-arrow-size) + 10px); right: auto; }
.pds-arrowpos-top-right .pds-arrow-next { right: 22px; }
.pds-arrowpos-top-right .pds-arrow-prev { right: calc(22px + var(--pds-arrow-size) + 10px); left: auto; }
.pds-arrowpos-top-left.pds-rtl .pds-arrow-next { left: 22px; }
.pds-arrowpos-top-left.pds-rtl .pds-arrow-prev { left: calc(22px + var(--pds-arrow-size) + 10px); }
.pds-arrowpos-top-right.pds-rtl .pds-arrow-prev { right: 22px; }
.pds-arrowpos-top-right.pds-rtl .pds-arrow-next { right: calc(22px + var(--pds-arrow-size) + 10px); }

/* Arrow styles */
.pds-arrow-square { border-radius: 12px; }
.pds-arrow-sharp { border-radius: 0; }
.pds-arrow-minimal { background: transparent; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); }
.pds-arrow-minimal:hover { background: rgba(255, 255, 255, 0.16); }
.pds-arrow-glass { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); backdrop-filter: blur(10px); }
.pds-arrow-glass:hover { background: rgba(255, 255, 255, 0.24); }

/* Dots */
.pds-dots {
        position: absolute;
        z-index: 6;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0;
        margin: 0;
        list-style: none;
}

.pds-dotpos-bottom-center .pds-dots { bottom: 22px; left: 50%; transform: translateX(-50%); }
.pds-dotpos-bottom-left .pds-dots { bottom: 22px; left: 26px; }
.pds-dotpos-bottom-right .pds-dots { bottom: 22px; right: 26px; }
.pds-dotpos-top-center .pds-dots { top: 22px; left: 50%; transform: translateX(-50%); }
.pds-dotpos-top-left .pds-dots { top: 22px; left: 26px; }
.pds-dotpos-top-right .pds-dots { top: 22px; right: 26px; }
.pds-dotpos-side-right .pds-dots { right: 22px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 12px; }
.pds-rtl.pds-dotpos-side-right .pds-dots { right: auto; left: 22px; }

.pds-dot {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 10px;
        height: 10px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: var(--pds-dot-color);
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease, width 0.25s ease;
}

.pds-dot:hover { transform: scale(1.25); }
.pds-dot:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.pds-dot.pds-is-active { background: var(--pds-dot-active); transform: scale(1.15); }

.pds-dot-bars { width: 26px; height: 4px; border-radius: 2px; }
.pds-dot-bars.pds-is-active { width: 40px; transform: none; }

.pds-dot-pill { width: 18px; height: 6px; border-radius: 3px; }
.pds-dot-pill.pds-is-active { width: 34px; transform: none; }

/* Number pagination: dots become numeric chips. */
.pds-dot-numbers,
.pds-dots:has(.pds-dot:not(:empty)) .pds-dot {
        width: auto;
        height: auto;
        min-width: 30px;
        padding: 5px 9px;
        border-radius: 7px;
        background: rgba(16, 18, 32, 0.4);
        color: #ffffff;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        backdrop-filter: blur(4px);
}

.pds-dots:has(.pds-dot:not(:empty)) .pds-dot.pds-is-active {
        background: var(--pds-accent);
        transform: none;
}

/* Progress bar */
.pds-progress {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 4px;
        background: rgba(255, 255, 255, 0.16);
        z-index: 6;
}

.pds-progress-bar {
        display: block;
        height: 100%;
        width: 0;
        background: linear-gradient(90deg, var(--pds-accent), var(--pds-dot-active, #fff));
}

/* Counter (number pagination readout) */
.pds-counter {
        position: absolute;
        right: 26px;
        bottom: 22px;
        z-index: 6;
        display: inline-flex;
        align-items: baseline;
        gap: 5px;
        padding: 6px 12px;
        border-radius: 999px;
        background: rgba(16, 18, 32, 0.42);
        color: #ffffff;
        font-size: 12.5px;
        font-weight: 600;
        backdrop-filter: blur(6px);
}

.pds-counter-sep { opacity: 0.6; }
.pds-counter-total { opacity: 0.75; }

/* Play / pause */
.pds-playpause {
        position: absolute;
        right: 26px;
        bottom: 58px;
        z-index: 6;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        background: rgba(16, 18, 32, 0.42);
        color: #ffffff;
        cursor: pointer;
        backdrop-filter: blur(6px);
        transition: background 0.2s ease;
}

.pds-playpause:hover { background: rgba(16, 18, 32, 0.65); }
.pds-playpause .pds-icon-play { display: none; }
.pds-playpause[data-state="paused"] .pds-icon-play { display: block; }
.pds-playpause[data-state="paused"] .pds-icon-pause { display: none; }
.pds-playpause:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

/* ================================================= thumbnail nav layouts */

.pds-thumbs {
        position: absolute;
        left: 50%;
        bottom: 18px;
        transform: translateX(-50%);
        z-index: 6;
        display: flex;
        gap: 10px;
        max-width: 92%;
        overflow-x: auto;
        padding: 4px;
        scrollbar-width: none;
}

.pds-thumbs::-webkit-scrollbar { display: none; }

.pds-thumb {
        flex: 0 0 auto;
        width: 96px;
        height: 60px;
        border: 2px solid transparent;
        border-radius: 9px;
        background: #223 center/cover no-repeat;
        opacity: 0.6;
        cursor: pointer;
        padding: 0;
        transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.pds-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.pds-thumb:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.pds-thumb.pds-is-active { border-color: #ffffff; opacity: 1; }

.pds-layout-thumbnails .pds-dots { bottom: 96px; }
.pds-layout-thumbnails .pds-content { padding-bottom: calc(var(--pds-spacing) * 1.5 + 84px); }

/* Gallery: image-first, content hidden by default. */
.pds-layout-gallery .pds-content { display: none; }
.pds-layout-gallery .pds-thumbs { bottom: 14px; gap: 8px; }
.pds-layout-gallery .pds-thumb { width: 76px; height: 48px; border-radius: 7px; }

/* ===================================================== before / after */

.pds-ba {
        position: absolute;
        inset: 0;
        --pds-ba-pos: 50%;
}

.pds-ba-frame {
        position: absolute;
        inset: 0;
        overflow: hidden;
}

.pds-ba-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        user-select: none;
        -webkit-user-drag: none;
}

.pds-ba-before-wrap {
        position: absolute;
        inset: 0;
        overflow: hidden;
        clip-path: inset(0 calc(100% - var(--pds-ba-pos)) 0 0);
}

.pds-ba[data-orientation="vertical"] .pds-ba-before-wrap {
        clip-path: inset(0 0 calc(100% - var(--pds-ba-pos)) 0);
}

.pds-ba-divider {
        position: absolute;
        top: 0;
        bottom: 0;
        left: var(--pds-ba-pos);
        width: 3px;
        margin-left: -1.5px;
        background: #ffffff;
        box-shadow: 0 0 18px rgba(0, 0, 0, 0.45);
        z-index: 2;
        pointer-events: none;
}

.pds-ba[data-orientation="vertical"] .pds-ba-divider {
        left: 0;
        right: 0;
        top: var(--pds-ba-pos);
        bottom: auto;
        width: 100%;
        height: 3px;
        margin: -1.5px 0 0;
}

.pds-ba-handle {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #ffffff;
        color: #1e1e2f;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.pds-ba[data-orientation="vertical"] .pds-ba-handle { transform: translate(-50%, -50%) rotate(90deg); }

.pds-ba-label {
        position: absolute;
        z-index: 3;
        padding: 5px 12px;
        border-radius: 999px;
        background: rgba(16, 18, 32, 0.55);
        color: #ffffff;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.4px;
        backdrop-filter: blur(4px);
        pointer-events: none;
}

.pds-ba-label-before { left: 16px; top: 16px; }
.pds-ba-label-after { right: 16px; top: 16px; }
.pds-ba[data-orientation="vertical"] .pds-ba-label-after { right: 16px; top: auto; bottom: 16px; }

.pds-ba-range {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        opacity: 0;
        cursor: ew-resize;
        z-index: 4;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
}

.pds-ba[data-orientation="vertical"] .pds-ba-range { cursor: ns-resize; }

.pds-ba-range::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 44px;
        height: 44px;
}

.pds-ba-range:focus-visible + .pds-ba-divider .pds-ba-handle,
.pds-ba:focus-within .pds-ba-handle {
        outline: 3px solid var(--pds-accent);
        outline-offset: 3px;
}

/* ========================================================== presets */

.pds-preset-midnight { --pds-accent: #8b5cf6; --pds-accent-2: #6d28d9; }
.pds-preset-ivory { --pds-accent: #1e1e2f; --pds-accent-2: #3f3f56; }
.pds-preset-sunset { --pds-accent: #f97316; --pds-accent-2: #ef4444; }
.pds-preset-forest { --pds-accent: #059669; --pds-accent-2: #34d399; }
.pds-preset-royal { --pds-accent: #7c3aed; --pds-accent-2: #a78bfa; }

/* =========================================================== helpers */

.pds-slide-link {
        position: absolute;
        inset: 0;
        z-index: 4;
        overflow: hidden;
        text-indent: -9999px;
}

.pds-slide-link:focus-visible {
        outline: 3px solid var(--pds-accent);
        outline-offset: -3px;
        text-indent: 0;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
}

/* Keep interactive elements above the whole-slide link. */
.pds-content .pds-btn,
.pds-content a,
.pds-content button { position: relative; z-index: 5; }

.pds-admin-hint {
        padding: 10px 14px;
        border: 1px dashed #c3c4c7;
        border-radius: 6px;
        background: #fff;
        color: #50575e;
}

/* Breakpoint visibility helpers injected by the renderer hide elements. */

/* ============================================================= a11y */

.pds-slider:focus-visible {
        outline: 3px solid var(--pds-accent);
        outline-offset: 2px;
}

.pds-slider .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
}

@media (prefers-reduced-motion: reduce) {
        .pds-slider *,
        .pds-slider *::before,
        .pds-slider *::after {
                animation-duration: 0.001s !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.001s !important;
        }

        .pds-slider .pds-anim { opacity: 1; }
        .pds-ianim-kenburns .pds-slide.pds-is-active .pds-slide-media img,
        .pds-ianim-panleft .pds-slide.pds-is-active .pds-slide-media img,
        .pds-ianim-panright .pds-slide.pds-is-active .pds-slide-media img { animation: none !important; }
}

/* ============================================================ mobile */

@media (max-width: 767px) {
        .pds-arrow { width: calc(var(--pds-arrow-size) * 0.82); height: calc(var(--pds-arrow-size) * 0.82); }
        .pds-arrow-prev { left: 12px; }
        .pds-arrow-next { right: 12px; }
        .pds-content { padding: var(--pds-spacing) calc(var(--pds-spacing) * 1.4); }
        .pds-title { text-shadow: 0 1px 14px rgba(0, 0, 0, 0.4); }
        .pds-thumbs { bottom: 12px; }
        .pds-thumb { width: 68px; height: 44px; }
        .pds-layout-thumbnails .pds-dots { bottom: 72px; }
        .pds-layout-thumbnails .pds-content { padding-bottom: calc(var(--pds-spacing) + 60px); }
        .pds-counter { right: 16px; bottom: 16px; }
        .pds-playpause { right: 16px; bottom: 52px; }
        .pds-dotpos-bottom-left .pds-dots { left: 16px; }
        .pds-dotpos-bottom-right .pds-dots { right: 16px; }
}
