/* ============================================
   ZseniBagoly Email Capture Popup
   Premium, brand-consistent design
   ============================================ */

/* Overlay */
.zb-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 95, 106, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    padding: 1rem;
}

.zb-popup-overlay.zb-popup-visible {
    opacity: 1;
    visibility: visible;
}

.zb-popup-overlay.zb-popup-hiding {
    opacity: 0;
    visibility: hidden;
}

/* Popup Card */
.zb-popup {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    box-shadow:
        0 32px 80px rgba(26, 95, 106, 0.25),
        0 12px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    transform: translateY(24px) scale(0.96);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.zb-popup-visible .zb-popup {
    transform: translateY(0) scale(1);
}

.zb-popup-hiding .zb-popup {
    transform: translateY(16px) scale(0.97);
}

/* Decorative top gradient bar */
.zb-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--teal-light) 0%,
        var(--mint) 25%,
        var(--peach) 50%,
        var(--pink) 75%,
        var(--lavender) 100%
    );
}

/* Close button */
.zb-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--cream-dark);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.zb-popup-close:hover {
    background: var(--teal-lightest);
    color: var(--teal-dark);
    transform: rotate(90deg);
}

/* Visual header */
.zb-popup-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.zb-popup-emoji {
    font-size: 3rem;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    animation: zbPopupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes zbPopupBounce {
    0% { transform: scale(0) rotate(-10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.zb-popup-tag {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 20px;
}

/* Title */
.zb-popup-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--teal-dark);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

/* Description */
.zb-popup-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

/* Form */
.zb-popup-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.zb-popup-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zb-popup-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    border: 2px solid var(--cream-dark);
    border-radius: 12px;
    background: var(--cream);
    color: var(--text);
    transition: all 0.2s ease;
    outline: none;
}

.zb-popup-input:focus {
    border-color: var(--teal-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(123, 204, 200, 0.15);
}

.zb-popup-input::placeholder {
    color: var(--text-light);
}

/* Submit button */
.zb-popup-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.zb-popup-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zb-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    filter: brightness(1.08);
}

.zb-popup-submit:hover::before {
    opacity: 1;
}

.zb-popup-submit:active {
    transform: translateY(0);
}

.zb-popup-submit-icon {
    transition: transform 0.2s ease;
}

.zb-popup-submit:hover .zb-popup-submit-icon {
    transform: translateX(3px);
}

/* GDPR checkbox */
.zb-popup-gdpr {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}

.zb-popup-gdpr input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 1px;
    accent-color: var(--teal-dark);
    flex-shrink: 0;
}

.zb-popup-gdpr a {
    color: var(--teal-dark);
    text-decoration: underline;
}

.zb-popup-gdpr a:hover {
    color: var(--teal-light);
}

/* Success state */
.zb-popup-success {
    padding: 1.5rem 0;
    animation: zbFadeIn 0.5s ease;
}

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

.zb-popup-success-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--mint-light);
    color: var(--teal-dark);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
}

.zb-popup-success h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--teal-dark);
    margin-bottom: 0.5rem;
}

.zb-popup-success p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Privacy note */
.zb-popup-privacy {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-top: 0.75rem;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 520px) {
    .zb-popup {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: 20px;
        max-width: 100%;
    }

    .zb-popup-title {
        font-size: 1.25rem;
    }

    .zb-popup-desc {
        font-size: 0.9rem;
    }

    .zb-popup-emoji {
        font-size: 2.5rem;
    }

    .zb-popup-submit {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
}
