/**
 * Reusable Authentication Form Styles
 *
 * Modern, responsive design with focus on:
 * - Clean, minimalist aesthetic
 * - Mobile-first responsive design
 * - Accessibility (focus states, contrast)
 * - Smooth animations
 */

.auth-form-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form-title {
    margin: 0 0 30px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0;
}

.auth-form-input {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.auth-form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form-input::placeholder {
    color: #a0aec0;
}

.auth-form-error {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #c53030;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.auth-form-button {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    font-family: inherit;
}

.auth-form-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-form-button:active {
    transform: translateY(0);
}

.auth-form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Passkey button styles */
.auth-form-button-passkey {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-form-button-passkey:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.auth-form-button-passkey svg {
    flex-shrink: 0;
}

/* Divider between password and passkey */
.auth-form-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 12px 0;
}

.auth-form-divider::before,
.auth-form-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-form-divider span {
    padding: 0 16px;
    color: #a0aec0;
    font-size: 14px;
    font-weight: 500;
}

.auth-form-toggle {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #718096;
}

.auth-form-toggle a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.auth-form-toggle a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .auth-form-card {
        padding: 30px 24px;
    }

    .auth-form-title {
        font-size: 24px;
    }

    .auth-form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .auth-form-card {
        background: #2d3748;
        color: #e2e8f0;
    }

    .auth-form-title {
        color: #f7fafc;
    }

    .auth-form-label {
        color: #cbd5e0;
    }

    .auth-form-input {
        background: #4a5568;
        border-color: #4a5568;
        color: #f7fafc;
    }

    .auth-form-input::placeholder {
        color: #a0aec0;
    }

    .auth-form-input:focus {
        border-color: #667eea;
        background: #4a5568;
    }

    .auth-form-toggle {
        color: #cbd5e0;
    }

    .auth-form-divider::before,
    .auth-form-divider::after {
        border-bottom-color: #4a5568;
    }

    .auth-form-divider span {
        color: #a0aec0;
    }
}
