/* ============================================
   Consultation Modal — reusable component
   Extracted from landing.css for cross-section use
   (Academy, Blog, Guides, etc.)
   ============================================ */

.auth-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}
.auth-modal.active {
    display: flex;
}
.auth-modal__backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}
.auth-modal__content {
    position: relative;
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.auth-modal__close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.auth-modal__close:hover { color: #333; }

.auth-modal__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin: 0 0 0.5rem;
    color: var(--text-dark);
}
.auth-modal__subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}
.auth-modal__buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}
.auth-modal__btn {
    flex: 1;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.auth-modal__btn--outline {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: white;
}
.auth-modal__btn--outline:hover {
    background: var(--primary);
    color: white;
}
.auth-modal__btn--primary {
    border: 2px solid var(--primary);
    background: var(--primary);
    color: white;
}
.auth-modal__btn--primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.auth-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.auth-modal__input,
.auth-modal__select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: var(--font-body);
    background: white;
    box-sizing: border-box;
}
.auth-modal__input:focus,
.auth-modal__select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(219,68,103,0.1);
}
.auth-modal__label {
    font-size: 0.95rem;
    color: #333;
    margin: 0.5rem 0 0.25rem;
}
.auth-modal__content > .auth-modal__select {
    margin-bottom: 1rem;
}
.auth-modal__submit {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}
.auth-modal__submit:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}
.auth-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.auth-modal__warning {
    color: #c0392b;
    font-size: 0.95rem;
    line-height: 1.6;
}
.auth-modal__warning a {
    color: #2980b9;
    text-decoration: underline;
}
.auth-modal__legal {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
    line-height: 1.4;
}
.auth-modal__legal a {
    color: var(--primary);
}
.auth-modal__success {
    text-align: center;
    padding: 1rem 0;
}
.auth-modal__success-icon {
    width: 56px; height: 56px;
    background: #27ae60;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 1rem;
}

/* Desktop: center modal with fade-in */
@media (min-width: 641px) {
    .auth-modal__content {
        animation: modalFadeIn 0.25s ease-out;
    }
    @keyframes modalFadeIn {
        from { opacity: 0; transform: translateY(-20px) scale(0.97); }
        to { opacity: 1; transform: translateY(0) scale(1); }
    }
}

@media (max-width: 768px) {
    .auth-modal__buttons { flex-direction: column; }
}

/* Mobile: bottom sheet */
@media (max-width: 640px) {
    .auth-modal {
        align-items: flex-end;
    }

    .auth-modal__backdrop {
        background: rgba(0,0,0,0.4);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    .auth-modal__content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 20px 20px 0 0;
        padding: 12px 24px 32px;
        padding-bottom: max(32px, env(safe-area-inset-bottom));
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        animation: sheetSlideUp 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    }

    @keyframes sheetSlideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    /* Drag handle */
    .auth-modal__content::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 0 auto 16px;
    }

    .auth-modal__close {
        top: 8px;
        right: 14px;
        font-size: 24px;
    }

    .auth-modal__title {
        font-size: 1.125rem;
        margin-bottom: 0.25rem;
    }

    .auth-modal__subtitle {
        font-size: 0.8125rem;
        margin-bottom: 1rem;
    }

    /* Hide decorative icon on mobile to save space */
    .auth-modal__content [style*="width:52px"][style*="border-radius:14px"],
    .auth-modal__content [style*="width:56px"][style*="border-radius"] {
        display: none;
    }

    .auth-modal__form {
        gap: 0.75rem;
    }

    .auth-modal__input,
    .auth-modal__select {
        padding: 14px 16px;
        font-size: 16px; /* prevents iOS zoom */
        border-radius: 10px;
    }

    .auth-modal__submit {
        padding: 16px;
        font-size: 1rem;
        border-radius: 12px;
    }

    .auth-modal__legal {
        margin-top: 0.75rem;
        font-size: 0.6875rem;
    }
}
