/* WildwoodComponents.Razor - Authentication Component Styles
 *
 * Authentication-specific layout, transitions, and behavioral styles.
 * Base card/alert/spinner styles are in wildwood-razor-themes.css.
 * App-specific theme overrides go in the consuming app's override CSS.
 */

/* ========================================
   AUTH COMPONENT CONTAINER
   ======================================== */

.ww-auth-component {
    max-width: 480px;
    margin: 0 auto;
}

/* ========================================
   VIEW TRANSITIONS
   ======================================== */

.ww-auth-view {
    animation: ww-auth-fade-in 0.25s ease-in-out;
}

@keyframes ww-auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   BUTTON SPINNER STATE
   ======================================== */

.ww-btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* When spinner is visible, button is disabled-looking */
button:disabled .ww-btn-text {
    display: none;
}

button:disabled .ww-btn-spinner {
    display: inline-flex;
}

/* ========================================
   FORM ENHANCEMENTS
   ======================================== */

.ww-auth-component .form-label {
    font-weight: 500;
    color: var(--ww-text-primary);
}

.ww-auth-component .form-check-label {
    color: var(--ww-text-secondary);
}

/* Password field with visibility toggle (future) */
.ww-password-wrapper {
    position: relative;
}

.ww-password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--ww-text-muted);
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.ww-password-toggle:hover {
    color: var(--ww-text-primary);
}

/* ========================================
   2FA CODE INPUT
   ======================================== */

#ww-2fa-code {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 0.5rem;
    font-family: monospace;
}

/* ========================================
   SOCIAL/EXTERNAL PROVIDER BUTTONS
   ======================================== */

.ww-auth-component .btn-outline-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* ========================================
   MESSAGE AREA
   ======================================== */

#ww-auth-message.ww-alert-danger {
    background-color: var(--ww-danger-bg, rgba(220, 53, 69, 0.15));
    border: 1px solid var(--ww-danger);
    color: var(--ww-danger-text, #842029);
}

#ww-auth-message.ww-alert-success {
    background-color: var(--ww-success-bg, rgba(40, 167, 69, 0.15));
    border: 1px solid var(--ww-success);
    color: var(--ww-success-text, #0f5132);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 576px) {
    .ww-auth-component {
        max-width: 100%;
    }

    .ww-card-body {
        padding: 1rem;
    }

    #ww-2fa-code {
        font-size: 1.25rem;
        letter-spacing: 0.35rem;
    }
}
