/**
 * Popup Newsletter — styles.
 *
 * Scoped to .pf-popup-* classes.
 * Designed for easy extension: swap colours / sizing without restructuring.
 */


/* ── Overlay ──────────────────────────────────────────────────────────────── */

.pf-popup-overlay {
    /* Always flex so transitions can fire — hidden via opacity + visibility. */
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pf-popup-overlay.pf-popup--visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* ── Container ────────────────────────────────────────────────────────────── */

.pf-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 6px;
    width: 100%;
    max-width: 480px;
    padding: 40px 36px 36px;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.22);

    /* Entrance animation: slide up + scale in. */
    transform: translateY(14px) scale(0.97);
    transition: transform 0.25s ease;
}

.pf-popup-overlay.pf-popup--visible .pf-popup-container {
    transform: translateY(0) scale(1);
}


/* ── Close button ─────────────────────────────────────────────────────────── */

.pf-popup-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #888;
    padding: 4px 6px;
    transition: color 0.15s ease;
}

.pf-popup-close:hover {
    color: #111;
}


/* ── Body ─────────────────────────────────────────────────────────────────── */

.pf-popup-title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
}

.pf-popup-description {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}


/* ── Form ─────────────────────────────────────────────────────────────────── */

.pf-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Honeypot — visually hidden, inaccessible to real users */
.pf-popup-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

.pf-popup-field {
    display: flex;
    flex-direction: column;
}

.pf-popup-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.15s ease;
}

.pf-popup-input:focus {
    border-color: #2271b1;
}

.pf-popup-submit {
    width: 100%;
    padding: 11px 20px;
    background: #2271b1;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.pf-popup-submit:hover {
    background: #135e96;
}

.pf-popup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ── Message ──────────────────────────────────────────────────────────────── */

.pf-popup-message {
    font-size: 13px;
    line-height: 1.5;
    min-height: 0;
}

.pf-popup-message--success {
    color: #1a7a3a;
}

.pf-popup-message--error {
    color: #b32d2e;
}


/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 520px) {
    .pf-popup-container {
        max-width: 90%;
        padding: 32px 20px 24px;
        /* Allow scrolling if content exceeds viewport height on small screens. */
        max-height: 90vh;
        overflow-y: auto;
    }

    .pf-popup-title {
        font-size: 19px;
    }

    .pf-popup-submit {
        width: 100%;   /* already 100% globally; explicit here for clarity */
    }
}
