/* ── Google Font ────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Overlay ────────────────────────────────────────────────────────────────── */
#cpf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

/* ── Popup Card ─────────────────────────────────────────────────────────────── */
#cpf-popup {
    width: 460px;
    max-width: calc(100vw - 32px);
    background: #3b2f24;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 36px 32px 28px;
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    animation: cpf-slide-in 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #f0ece8;
}

@keyframes cpf-slide-in {
    from { transform: translateY(-24px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0)     scale(1);    opacity: 1; }
}

/* ── Close Button ───────────────────────────────────────────────────────────── */
#cpf-close {
    position: absolute;
    top: 14px;
    right: 18px;
    cursor: pointer;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    user-select: none;
}

#cpf-close:hover {
    color: #ffffff;
    transform: rotate(90deg);
}

/* ── Heading ────────────────────────────────────────────────────────────────── */
#cpf-popup h2 {
    margin-top: 0;
    margin-bottom: 22px;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    letter-spacing: -0.2px;
}

/* ── Inputs & Textarea ──────────────────────────────────────────────────────── */
#cpf-form input[type="text"],
#cpf-form input[type="email"],
#cpf-form textarea {
    width: 100%;
    margin-bottom: 12px;
    padding: 13px 16px;
    border: 1.5px solid #e8e0d8;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: #333;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#cpf-form textarea {
    resize: none;
    line-height: 1.5;
}

#cpf-form input[type="text"]::placeholder,
#cpf-form input[type="email"]::placeholder,
#cpf-form textarea::placeholder {
    color: #5b9bd5;
    font-size: 13.5px;
}

#cpf-form input[type="text"]:focus,
#cpf-form input[type="email"]:focus,
#cpf-form textarea:focus {
    border-color: #a07850;
    box-shadow: 0 0 0 3px rgba(160, 120, 80, 0.18);
    outline: none;
}

/* ── Captcha Row ────────────────────────────────────────────────────────────── */
.cpf-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cpf-captcha input[name="captcha"] {
    flex: 1;
    margin-bottom: 0 !important;
}

/* Visible captcha number */
.cpf-captcha-num {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    background: #fff;
    border: 1.5px solid #e8e0d8;
    border-radius: 8px;
    padding: 9px 16px;
    letter-spacing: 4px;
    min-width: 80px;
    text-align: center;
    user-select: none;
    font-family: 'Courier New', monospace;
}

/* Refresh button – orange circular arrow */
#refresh-captcha {
    background: transparent;
    border: none;
    color: #e07020;
    font-size: 24px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s, color 0.2s;
    border-radius: 50%;
}

#refresh-captcha:hover {
    transform: rotate(180deg);
    color: #c05a10;
}

/* ── Inline Message ─────────────────────────────────────────────────────────── */
#cpf-form-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
    text-align: center;
}

.cpf-msg-error {
    background: rgba(220, 60, 60, 0.15);
    color: #ff8585;
    border: 1px solid rgba(220, 60, 60, 0.3);
}

.cpf-msg-success {
    background: rgba(50, 200, 120, 0.12);
    color: #5eead4;
    border: 1px solid rgba(50, 200, 120, 0.25);
}

/* ── Submit Button ──────────────────────────────────────────────────────────── */
#cpf-form button[type='submit'] {
    width: auto;
    padding: 12px 36px;
    background: #f0ebe4;
    color: #2a1f14;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: block;
    margin: 4px auto 14px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#cpf-form button[type='submit']:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

#cpf-form button[type='submit']:active {
    transform: translateY(0);
}

#cpf-form button[type='submit']:disabled {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255,255,255,0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Consent Checkbox ───────────────────────────────────────────────────────── */
.cpf-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin-top: 6px;
}

.cpf-consent input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #e07020;
    cursor: pointer;
    border-radius: 3px;
}

.cpf-consent span {
    font-size: 11.5px;
    color: rgba(240, 236, 232, 0.75);
    line-height: 1.5;
}

/* ── Thank-You Screen ───────────────────────────────────────────────────────── */
#cpf-thankyou {
    text-align: center;
    padding: 28px 0 14px;
    animation: cpf-slide-in 0.4s ease;
}

.cpf-thankyou-icon {
    width: 68px;
    height: 68px;
    background: #e07020;
    color: #fff;
    font-size: 30px;
    line-height: 68px;
    border-radius: 50%;
    margin: 0 auto 20px;
    box-shadow: 0 8px 28px rgba(224, 112, 32, 0.45), 0 0 0 8px rgba(224, 112, 32, 0.12);
    animation: cpf-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes cpf-pop {
    from { transform: scale(0.4); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

#cpf-thankyou h3 {
    font-size: 22px;
    color: #ffffff;
    font-weight: 700;
    margin: 0 0 10px;
}

#cpf-thankyou p {
    font-size: 14px;
    color: rgba(240, 236, 232, 0.7);
    line-height: 1.7;
    margin: 0 0 26px;
}

#cpf-close-thankyou {
    padding: 12px 36px;
    background: #f0ebe4;
    color: #2a1f14;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}

#cpf-close-thankyou:hover {
    background: #ffffff;
    transform: translateY(-1px);
}