/**
 * TCF Canada — Authentification hybride
 */

.tcf-auth {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    min-height: 420px;
}

.tcf-auth__card {
    width: 100%;
    background: var(--tcf-bg);
    border-radius: var(--tcf-radius-lg);
    box-shadow: var(--tcf-shadow-card);
    border: 1px solid var(--tcf-border);
    overflow: hidden;
}

.tcf-auth__header {
    padding: 2rem 1.5rem 1.25rem;
    text-align: center;
    background: var(--tcf-gradient-header);
    color: #fff;
}

.tcf-auth__title {
    margin: 0 0 0.375rem;
    font-size: clamp(1.375rem, 3vw, 1.5rem);
    font-weight: 800;
}

.tcf-auth__subtitle {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.92;
    line-height: 1.5;
}

.tcf-auth__notice {
    margin: 1rem 1.5rem 0;
    padding: 0.75rem 1rem;
    border-radius: var(--tcf-radius-sm);
    font-size: 0.875rem;
    line-height: 1.5;
}

.tcf-auth__notice--error {
    background: var(--tcf-danger-bg);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.tcf-auth__notice--success {
    background: var(--tcf-success-bg);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tcf-auth__google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.25rem 1.5rem 0;
    padding: 0.75rem 1rem;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius-sm);
    background: var(--tcf-bg);
    color: var(--tcf-dark);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s var(--tcf-transition);
    font-family: inherit;
}

.tcf-auth__google-btn:hover {
    background: var(--tcf-bg-alt);
    border-color: #cbd5e1;
    box-shadow: var(--tcf-shadow);
    transform: translateY(-1px);
}

.tcf-auth__divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 1.5rem;
    color: var(--tcf-text-light);
    font-size: 0.8125rem;
}

.tcf-auth__divider::before,
.tcf-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tcf-border);
}

.tcf-auth__divider span {
    padding: 0 0.75rem;
}

.tcf-auth__tabs {
    display: flex;
    margin: 0 1.5rem;
    border-bottom: 1px solid var(--tcf-border);
}

.tcf-auth__tab {
    flex: 1;
    padding: 0.875rem;
    border: none;
    background: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tcf-text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.25s var(--tcf-transition);
}

.tcf-auth__tab--active {
    color: var(--tcf-primary);
    border-bottom-color: var(--tcf-primary);
}

.tcf-auth__form {
    padding: 1.25rem 1.5rem 1.75rem;
}

.tcf-auth__field {
    margin-bottom: 1rem;
}

.tcf-auth__field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tcf-text);
    margin-bottom: 0.375rem;
}

.tcf-auth__field input {
    width: 100%;
    padding: 0.6875rem 0.875rem;
    border: 1px solid var(--tcf-border);
    border-radius: var(--tcf-radius-sm);
    font-size: 0.9375rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.25s, box-shadow 0.25s;
    background: var(--tcf-bg-alt);
}

.tcf-auth__field input:focus {
    outline: none;
    border-color: var(--tcf-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: var(--tcf-bg);
}

.tcf-auth__field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tcf-auth__checkbox {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--tcf-text-light);
    cursor: pointer;
}

.tcf-auth__link {
    font-size: 0.8125rem;
    color: var(--tcf-primary);
    text-decoration: none;
    font-weight: 500;
}

.tcf-auth__link:hover {
    text-decoration: underline;
}

.tcf-auth__submit {
    width: 100%;
    padding: 0.8125rem 1rem;
    background: var(--tcf-gradient);
    color: #fff;
    border: none;
    border-radius: var(--tcf-radius-sm);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.25s var(--tcf-transition), box-shadow 0.25s;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.tcf-auth__submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.tcf-auth__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tcf-auth__spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tcf-auth-spin 0.7s linear infinite;
}

@keyframes tcf-auth-spin {
    to { transform: rotate(360deg); }
}

.tcf-auth--logged-in {
    padding: 2rem;
    text-align: center;
}

@media (max-width: 480px) {
    .tcf-auth {
        padding: 1rem 0;
        min-height: auto;
    }

    .tcf-auth__card {
        border-radius: var(--tcf-radius);
    }

    .tcf-auth__header {
        padding: 1.5rem 1.25rem 1rem;
    }

    .tcf-auth__form {
        padding: 1rem 1.25rem 1.5rem;
    }

    .tcf-auth__google-btn {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }

    .tcf-auth__tabs {
        margin: 0 1.25rem;
    }

    .tcf-auth__divider {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
    }
}
