/* ─── Modal Base ─────────────────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-box {
    background: #fff;
    border-radius: 20px;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 480px;
    width: 100%;
    position: relative;
    box-shadow: 0 25px 60px rgba(26, 26, 46, 0.18), 0 0 0 1px rgba(183, 110, 121, 0.08);
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}
@keyframes modalSlideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Close Button ───────────────────────────────────────────────────────── */
.modal-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #b76e79;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.modal-close:hover {
    color: #1a1a2e;
    background: #faf8f7;
}

/* ─── Modal Typography ───────────────────────────────────────────────────── */
.modal-emoji {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1;
}

.modal-box h2 {
    margin: 0 0 0.4rem;
    font-family: 'Sora', sans-serif;
    font-size: 1.55rem;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: -0.01em;
}

.modal-box p.modal-sub {
    color: #8b6f7a;
    font-size: 0.92rem;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

/* ─── Auth Tabs ──────────────────────────────────────────────────────────── */
.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.75rem;
    background: #F5F1EF;
    border-radius: 10px;
    padding: 4px;
}
.auth-tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    background: transparent;
    font-family: 'Sora', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #8b6f7a;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.auth-tab.active {
    background: #fff;
    color: #1a1a2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.auth-tab:hover:not(.active) {
    color: #b76e79;
}

/* ─── Form Fields ────────────────────────────────────────────────────────── */
.contact-form-grid {
    display: grid;
    gap: 0.9rem;
    text-align: left;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: 0.01em;
}
.form-group input,
.form-group select,
.form-group textarea {
    border: 1.5px solid #e8c4b8;
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    font-family: inherit;
    color: #1a1a2e;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #faf8f7;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b76e79;
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.1);
    background: #fff;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #c4a0a8;
}
.form-group textarea {
    resize: vertical;
    min-height: 90px;
}
.form-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
}

/* ─── Submit Button ──────────────────────────────────────────────────────── */
.btn-form-submit {
    background: linear-gradient(135deg, #b76e79, #a67c8a);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(183, 110, 121, 0.25);
    letter-spacing: 0.01em;
}
.btn-form-submit:hover {
    background: linear-gradient(135deg, #a65d68, #956b7a);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(183, 110, 121, 0.35);
}
.btn-form-submit:active {
    transform: translateY(0);
}
.btn-form-submit:disabled {
    background: #e8c4b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ─── Status Messages ────────────────────────────────────────────────────── */
.form-status {
    font-size: 0.88rem;
    min-height: 1.2em;
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 500;
}
.form-status.success { color: #0d9488; }
.form-status.error   { color: #b76e79; }

/* ─── Lead / Entry Modal ─────────────────────────────────────────────────── */
#lead-modal .modal-box {
    background: linear-gradient(145deg, #faf8f7 0%, #fff 100%);
    border: 1px solid rgba(232, 196, 184, 0.3);
    padding: 2.5rem 2.5rem 2rem;
}
#lead-modal h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #b76e79, #a67c8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}
#lead-modal .modal-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    font-size: 0.88rem;
    color: #555;
    text-align: left;
}
#lead-modal .modal-perks li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
#lead-modal .modal-perks li::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b76e79, #a67c8a);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}
#lead-modal .modal-skip {
    text-align: center;
    margin-top: 1rem;
}
#lead-modal .modal-skip button {
    background: none;
    border: none;
    color: #b0a0a5;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0.5rem 1rem;
}
#lead-modal .modal-skip button:hover {
    color: #b76e79;
}

/* ─── Auth Modal Specifics ───────────────────────────────────────────────── */
#auth-modal .modal-box {
    max-width: 440px;
    padding: 2.25rem 2.25rem 1.75rem;
}

/* ─── Contact Modal Specifics ────────────────────────────────────────────── */
#contact-modal .modal-box {
    max-width: 520px;
}

/* ─── Contact Section Buttons ────────────────────────────────────────────── */
.contact-section .contact-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

/* ─── Paywall Toast ──────────────────────────────────────────────────────── */
/* These are created dynamically in JS — keep consistent with site theme */

/* ─── Auth Switch Link ────────────────────────────────────────────────────── */
.auth-switch {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #8b6f7a;
}
.auth-switch .link-btn {
    background: none;
    border: none;
    color: #b76e79;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.auth-switch .link-btn:hover {
    color: #1a1a2e;
}

/* ─── Auth Tab Content ───────────────────────────────────────────────────── */
.auth-tab-content {
    text-align: center;
}
.auth-tab-content .contact-form-grid {
    text-align: left;
}

/* ─── Centering Fixes ────────────────────────────────────────────────────── */
.modal-box .modal-emoji,
.modal-box h2,
.modal-box .modal-sub {
    text-align: center;
    width: 100%;
}

.modal-box .btn-form-submit {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.modal-box .form-status {
    text-align: center;
}

/* ─── Required Asterisk ──────────────────────────────────────────────────── */
.form-group label span {
    color: #b76e79 !important;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .modal-box {
        padding: 2rem 1.5rem 1.5rem;
        border-radius: 16px;
        margin: 0.5rem;
    }
    .form-two-col {
        grid-template-columns: 1fr;
    }
    .modal-box h2 {
        font-size: 1.35rem;
    }
    .auth-tabs {
        margin-bottom: 1.25rem;
    }
    #lead-modal .modal-box {
        padding: 2rem 1.5rem 1.5rem;
    }
}

@media (max-width: 380px) {
    .modal-box {
        padding: 1.5rem 1.25rem 1.25rem;
    }
}
