/**
 * Pretpot – Text Split Animation with Carousel
 * File: assets/css/text-split-animation-with-carousel.css
 */

/* ── Widget shell ─────────────────────────────────────────────────────────── */
.pptsa-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    /* padding falls back to Elementor section padding */
}

/* Flexbox container compatibility: make the widget fill its parent */
.e-con .pptsa-widget,
.e-container .pptsa-widget {
    width: 100%;
}

/* ── Text ─────────────────────────────────────────────────────────────────── */
.pptsa-text {
    position: relative;
    z-index: 10;
    text-align: center;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    /* font-size is driven entirely by JS – no CSS value here */
    margin: 0;
    padding: 0;
}

/* ── Media wrapper ────────────────────────────────────────────────────────── */
.pptsa-media-wrapper {
    position: relative;
    z-index: 5;
    overflow: hidden;
    flex-shrink: 0;
    /* width / height animated by JS */
    width: 0;
    height: 2px;
}

.pptsa-media-inner {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}

/* ── Carousel slides ──────────────────────────────────────────────────────── */
.pptsa-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.pptsa-slide.pptsa-slide-active {
    opacity: 1;
}

.pptsa-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Single image / video ─────────────────────────────────────────────────── */
.pptsa-media-inner > img,
.pptsa-media-inner > video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Description panel ────────────────────────────────────────────────────── */
.pptsa-description {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 640px;        /* overridden by Elementor style controls */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin-top: 0;
    transition:
        max-height 0.5s ease,
        opacity    0.45s ease,
        margin-top 0.45s ease;
}

.pptsa-description.pptsa-visible {
    max-height: 400px;
    opacity: 1;
    margin-top: 32px;        /* overridden by Elementor style control */
    pointer-events: all;
}

.pptsa-desc-text {
    font-size: 14px;
    line-height: 1.7;
    font-weight: 300;
    letter-spacing: 0.02em;
}

/* ── Description button ───────────────────────────────────────────────────── */
.pptsa-desc-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 28px;
    border: 1px solid currentColor;
    background: transparent;
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    border-style: solid;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

/* ── Typing cursor ────────────────────────────────────────────────────────── */
@keyframes pptsa-blink {
    0%,  100% { opacity: 1; }
    50%        { opacity: 0; }
}

.pptsa-desc-text.pptsa-cursor::after {
    content: '|';
    animation: pptsa-blink 1s step-end infinite;
    margin-left: 1px;
}

/* ── Slide / fade effects (JS adds inline transition; these are base states) ── */
.pptsa-desc-text.pptsa-fx-slide {
    transform: translateY(18px);
}

.pptsa-desc-text.pptsa-fx-fade {
    opacity: 0;
}

/* ── Elementor editor: show a placeholder height so widget is visible ─────── */
.elementor-editor-active .pptsa-media-wrapper {
    min-height: 8px;
    background: rgba(255,255,255,0.08);
    outline: 2px dashed rgba(255,255,255,0.25);
}