/* ══════════════════════════════════════════
   Elegant Popup — Frontend Styles
   ══════════════════════════════════════════ */

/* ——— Overlay ——— */
.ep-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ep-overlay-bg, rgba(0,0,0,0.6));
    padding: 20px;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    transition: opacity .35s cubic-bezier(.4,0,.2,1),
                visibility .35s cubic-bezier(.4,0,.2,1);
}
.ep-overlay.ep-active {
    opacity: 1;
    visibility: visible;
}

/* ——— Modal ——— */
.ep-modal {
    position: relative;
    width: var(--ep-w-desktop, 600px);
    max-width: 100%;
    max-height: 90vh;
    height: var(--ep-h-desktop, auto);
    background: var(--ep-bg, #ffffff);
    color: var(--ep-color, #111111);
    font-family: var(--ep-font, 'Titillium Web', sans-serif);
    border-radius: var(--ep-radius, 12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;

    box-shadow:
        0 24px 80px rgba(0,0,0,.18),
        0 8px 24px rgba(0,0,0,.10),
        0 1px 0 rgba(255,255,255,.06) inset;

    transform: translateY(24px) scale(.97);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1),
                opacity .3s ease;
    opacity: 0;
}
.ep-overlay.ep-active .ep-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ——— Close button ——— */
.ep-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.08);
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .15s;
    backdrop-filter: blur(4px);
}
.ep-close:hover {
    background: rgba(0,0,0,.18);
    transform: scale(1.1);
}

/* ——— Body ——— */
.ep-body {
    flex: 1;
    overflow-y: auto;
    padding: 36px 32px;
    scrollbar-width: thin;
}

/* ——— Text content ——— */
.ep-text-content {
    font-size: 16px;
    line-height: 1.7;
}
.ep-text-content h1,
.ep-text-content h2,
.ep-text-content h3 { font-weight: 700; margin-bottom: .5em; }
.ep-text-content p { margin: 0 0 1em; }
.ep-text-content a { color: inherit; text-decoration: underline; }

/* ——— Embed wrapper ——— */
.ep-embed-wrap { position: relative; width: 100%; }
.ep-embed-wrap iframe {
    width: 100%;
    border: none;
    border-radius: 6px;
    display: block;
}
/* 16:9 ratio helper if no height given */
.ep-embed-wrap.ep-ratio-16-9 {
    padding-top: 56.25%;
}
.ep-embed-wrap.ep-ratio-16-9 iframe {
    position: absolute;
    inset: 0;
    height: 100%;
}

/* ——— Progress bar ——— */
.ep-progress {
    height: 3px;
    background: rgba(0,0,0,.08);
    flex-shrink: 0;
}
.ep-progress-bar {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--ep-color, #111);
    transform-origin: left;
    transform: scaleX(1);
    transition: transform linear;
    opacity: .5;
}

/* ——— Mobile ——— */
@media (max-width: 640px) {
    .ep-modal {
        width: var(--ep-w-mobile, 95vw) !important;
        height: var(--ep-h-mobile, auto) !important;
        border-radius: calc(var(--ep-radius, 12px) * 0.8);
    }
    .ep-body {
        padding: 24px 20px;
    }
}

/* ——— Shortcode / trigger button ——— */
.ep-shortcode-btn {
    display: inline-block;
    padding: 12px 28px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.ep-shortcode-btn:hover {
    background: #333;
    transform: translateY(-1px);
}
.ep-shortcode-btn:active {
    transform: translateY(0);
}

/* ——— Elementor wrapper ——— */
.ep-elementor-wrap { line-height: 1; }
