/* ==========================================================================
   EHF Smart Popups — Styles
   ========================================================================== */

/* ---------- Body scroll lock ---------- */
body.ehf-popup-open {
    overflow: hidden;
}

/* ---------- Overlay ---------- */
.ehf-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ehf-popup-overlay--blur {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.ehf-popup-overlay--visible {
    opacity: 1;
    pointer-events: all;
}

/* Slide-in-right overlay alignment */
.ehf-popup-overlay--slide_in_right {
    justify-content: flex-end;
}

/* ---------- Base Popup ---------- */
.ehf-popup {
    position: relative;
    background: #FFFFFF;
    max-width: 520px;
    width: 90vw;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
    overflow: hidden;
    z-index: 100000;
}

.ehf-popup-overlay--visible .ehf-popup {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Close Button ---------- */
.ehf-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 20px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.ehf-popup__close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* ---------- Image ---------- */
.ehf-popup__image {
    width: 100%;
    max-height: 280px;
    overflow: hidden;
}

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

/* ---------- Content ---------- */
.ehf-popup__content {
    padding: 32px;
}

/* ---------- Title ---------- */
.ehf-popup__title {
    font-family: Playfair Display, serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.25;
}

/* ---------- Body ---------- */
.ehf-popup__body {
    font-family: Work Sans, sans-serif;
    font-size: 15px;
    color: #666;
    line-height: 1.65;
    margin-bottom: 24px;
}

.ehf-popup__body p:last-child {
    margin: 0;
}

/* ---------- CTA Button ---------- */
.ehf-popup__cta,
.ehf-popup__cta:visited,
.ehf-popup__cta:focus {
    display: block;
    background: var(--ehf-text-color, #4A4A4A);
    color: #FFFFFF;
    font-family: var(--ehf-font-family, Work Sans, sans-serif);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 16px 36px;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    text-decoration: none !important;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.ehf-popup__cta:hover {
    background: var(--ehf-black, #000000);
    transform: none;
    text-decoration: none !important;
    color: #FFFFFF;
}

/* ==========================================================================
   Style Variants
   ========================================================================== */

/* ---------- Centered (default) ---------- */
.ehf-popup--centered {
    border-radius: 0;
}

/* ---------- Bottom Sheet ---------- */
.ehf-popup--bottom_sheet {
    border-radius: 0;
}

/* ---------- Slide-in Right ---------- */
.ehf-popup--slide_in_right {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateX(100%) translateY(-50%);
    max-width: 400px;
    width: 90vw;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    border-radius: 0;
}

.ehf-popup-overlay--visible .ehf-popup--slide_in_right {
    transform: translateX(0) translateY(-50%);
}

/* ==========================================================================
   Mobile Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .ehf-popup {
        max-width: 95vw;
    }

    .ehf-popup__image {
        max-height: 200px;
    }

    .ehf-popup__content {
        padding: 24px;
    }

    .ehf-popup__title {
        font-size: 22px;
    }

    .ehf-popup__cta {
        padding: 12px 28px;
    }

    /* Bottom sheet mobile behaviour */
    .ehf-popup--bottom_sheet {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
        transform: translateY(100%);
        max-height: 85vh;
        overflow-y: auto;
    }

    .ehf-popup-overlay--visible .ehf-popup--bottom_sheet {
        transform: translateY(0);
    }

    /* Slide-in right on mobile */
    .ehf-popup--slide_in_right {
        max-width: 95vw;
    }
}
