/* IBODE Registration — Auth pages (TML forms) + Modal + Dashboard Banners */

/* ============= AUTH PAGES (Theme My Login) ============= */

/* Apply to all TML forms — pages WP custom AND virtual TML routes */
.tml {
    max-width: 480px;
    margin: 60px auto;
    padding: 40px 36px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.tml-alerts {
    margin-bottom: 16px;
}

.tml-alerts .tml-alert {
    padding: 12px 16px;
    border-radius: 6px;
    background: #fef7f7;
    color: #7a0e0e;
    border: 1px solid #f5d4d4;
    font-size: 14px;
}

.tml-field-wrap {
    margin-bottom: 18px;
}

.tml-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.tml-field {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #1a1a1a;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

.tml-field:focus {
    outline: none;
    border-color: #7a0e0e;
    box-shadow: 0 0 0 3px rgba(122, 14, 14, 0.12);
}

.tml-rememberme-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
}

.tml-rememberme-wrap .tml-label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

.tml-rememberme-wrap .tml-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #7a0e0e;
    cursor: pointer;
}

.tml-submit-wrap {
    margin-top: 24px;
    margin-bottom: 8px;
}

.tml-button {
    width: 100%;
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    background: #7a0e0e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.tml-button:hover {
    background: #5a0a0a;
}

.tml-button:active {
    transform: scale(0.99);
}

.tml-links {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #f0f0f0;
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}

.tml-links a {
    color: #7a0e0e;
    text-decoration: none;
    font-weight: 500;
}

.tml-links a:hover {
    text-decoration: underline;
}

/* Description / intro paragraph above the form */
.tml-action-register + p,
.entry-content > p:first-child {
    text-align: center;
    color: #5a5a5a;
    font-size: 15px;
    margin-bottom: 24px;
}

/* Nextend Social Login buttons (Google, Apple, MS) */
.nsl-container {
    margin: 0 auto 24px auto !important;
    max-width: 480px;
    /* Override Nextend's data-align="left" so the inline-grid button centers
       horizontally, matching the WC login form and the links beneath it. */
    text-align: center !important;
}

/* Center the inline-grid wrapper that holds the SSO buttons */
.nsl-container.nsl-container-block .nsl-container-buttons {
    display: inline-grid !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.nsl-container-block .nsl-button {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 12px !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

/* "ou" separator between SSO and form */
.nsl-container-buttons {
    margin-bottom: 16px !important;
}

.nsl-container-buttons + .tml,
.tml + .nsl-container {
    position: relative;
}

/* Mobile responsive */
@media (max-width: 540px) {
    .tml {
        margin: 24px 16px;
        padding: 28px 22px;
        border-radius: 8px;
    }
}

/* ============= MODAL (onboarding) ============= */

.ibode-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    /* Max 32-bit int — au-dessus de Tarteaucitron (2147483645) et tutor-dashboard-footer-mobile (9999999) */
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.ibode-modal-overlay.is-open {
    display: flex;
}

.ibode-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    padding: 32px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    font-family: -apple-system, "Plus Jakarta Sans", sans-serif;
}

.ibode-modal__step-indicator {
    font-size: 12px;
    font-weight: 600;
    color: #7a0e0e;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ibode-modal__title {
    font-size: 22px;
    font-weight: 700;
    margin: 4px 0 0;
    color: #1a1a1a;
}

.ibode-modal__subtitle {
    font-size: 14px;
    color: #5a5a5a;
    margin-top: 8px;
}

.ibode-modal__body {
    margin: 24px 0;
}

.ibode-modal__radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ibode-modal__radio-option,
.ibode-modal__checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
}

.ibode-modal__radio-option:hover,
.ibode-modal__checkbox-option:hover {
    border-color: #7a0e0e;
    background: #fef7f7;
}

.ibode-modal__radio-option:has(input:checked),
.ibode-modal__checkbox-option:has(input:checked) {
    border-color: #7a0e0e;
    background: #fef7f7;
    color: #7a0e0e;
    font-weight: 600;
}

.ibode-modal__checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

@media (max-width: 480px) {
    .ibode-modal__checkbox-grid {
        grid-template-columns: 1fr;
    }
}

.ibode-modal__footer {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.ibode-modal__btn {
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 15px;
}

.ibode-modal__btn--primary {
    background: #7a0e0e;
    color: white;
}

.ibode-modal__btn--primary:hover:not(:disabled) {
    background: #5a0a0a;
}

.ibode-modal__btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ibode-modal__btn--secondary {
    background: transparent;
    color: #5a5a5a;
}

.ibode-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.ibode-banner--upsell {
    background: linear-gradient(135deg, #7a0e0e 0%, #a01010 100%);
    color: white;
}

.ibode-banner--upsell a {
    color: white;
    font-weight: 700;
    text-decoration: underline;
}

.ibode-banner--profil {
    background: #fff8e6;
    color: #5a3a00;
    border: 1px solid #ffd966;
}

.ibode-banner__progress {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ibode-banner__progress-bar {
    flex: 1;
    max-width: 200px;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.ibode-banner__progress-fill {
    height: 100%;
    background: #7a0e0e;
    transition: width 0.3s ease;
}

.ibode-banner__close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    font-size: 18px;
    padding: 0 4px;
}

.ibode-banner__close:hover {
    opacity: 1;
}
