/* ============================================================
   CF7 Homepage Popup — styles
   Scoped entirely to #cf7-popup-overlay and #cf7-popup-box
   so nothing bleeds onto other pages or forms.
   ============================================================ */

/* ---------- Overlay (full-screen blur backdrop) ---------- */
#cf7-popup-overlay {
    display: none;                  /* hidden until JS shows it */
    position: fixed;
    inset: 0;                       /* top/right/bottom/left: 0 */
    z-index: 99999;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    /* Safety: never intercept clicks when invisible */
    pointer-events: none;
}

#cf7-popup-overlay.cf7-popup-visible {
    display: flex;
    opacity: 1;
    pointer-events: auto;           /* re-enable clicks only when open */
}

/* ---------- White popup box ---------- */
#cf7-popup-box {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 48px 44px 40px;
    width: 100%;
    max-width: 480px;
    margin: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    /* slide-up entrance */
    transform: translateY(24px);
    transition: transform 0.35s ease;
}

#cf7-popup-overlay.cf7-popup-visible #cf7-popup-box {
    transform: translateY(0);
}

/* ---------- Close button (×) ---------- */
#cf7-popup-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #f472b6;       /* pink, matching the design */
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}
#cf7-popup-close:hover {
    color: #e91e8c;
}

/* ---------- Title ---------- */
#cf7-popup-box h2#cf7-popup-title {
    margin: 0 0 32px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

/* ---------- CF7 field overrides (scoped) ---------- */
#cf7-popup-box .wpcf7-form p {
    margin-bottom: 20px;
}

#cf7-popup-box .wpcf7-form input[type="text"],
#cf7-popup-box .wpcf7-form input[type="email"],
#cf7-popup-box .wpcf7-form input[type="password"],
#cf7-popup-box .wpcf7-form input[type="tel"],
#cf7-popup-box .wpcf7-form textarea {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid #d1d5db;
    border-radius: 0;
    padding: 10px 0;
    font-size: 0.95rem;
    color: #374151;
    background: transparent;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#cf7-popup-box .wpcf7-form input[type="text"]:focus,
#cf7-popup-box .wpcf7-form input[type="email"]:focus,
#cf7-popup-box .wpcf7-form input[type="password"]:focus,
#cf7-popup-box .wpcf7-form input[type="tel"]:focus,
#cf7-popup-box .wpcf7-form textarea:focus {
    border-bottom-color: #e91e8c;
}

/* Placeholder colour */
#cf7-popup-box .wpcf7-form input::placeholder,
#cf7-popup-box .wpcf7-form textarea::placeholder {
    color: #9ca3af;
}

/* ---------- Submit button ---------- */
#cf7-popup-box .wpcf7-form input[type="submit"],
#cf7-popup-box .wpcf7-form .wpcf7-submit {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 16px;
    background: #e91e8c;
    color: #ffffff;
    border: none;
    border-radius: 50px;     /* pill shape */
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(233, 30, 140, 0.35);
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

#cf7-popup-box .wpcf7-form input[type="submit"]:hover,
#cf7-popup-box .wpcf7-form .wpcf7-submit:hover {
    background: #c2185b;
    box-shadow: 0 6px 24px rgba(233, 30, 140, 0.45);
    transform: translateY(-1px);
}

/* ---------- CF7 validation messages ---------- */
#cf7-popup-box .wpcf7-not-valid-tip {
    color: #e91e8c;
    font-size: 0.78rem;
    margin-top: 4px;
}

#cf7-popup-box .wpcf7-response-output {
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #d1d5db;
    color: #374151;
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
    #cf7-popup-box {
        padding: 36px 24px 28px;
    }
}
