/* Login Page Specific Styles */

/* Ensure consistent styling with Tailwind CSS */
.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.15s ease-in-out;
}

/* Focus states for accessibility */
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Dark mode form controls */
.dark .form-control {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

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

/* Button loading state */
.btn-loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Message styles */
.message {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.message-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.message-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.dark .message-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.25);
}

.dark .message-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.25);
}

.dark .message-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.25);
}

/* Field error styling */
.field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.dark .field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Custom checkbox styling */
input[type="checkbox"] {
    accent-color: #667eea;
}

/* Smooth transitions */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Password visibility toggle styling */
#toggle-password {
    transition: color 0.15s ease;
}

#toggle-password:hover {
    color: #667eea;
}

.dark #toggle-password:hover {
    color: #667eea;
}

/* Loading spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal backdrop */
.modal-backdrop {
    backdrop-filter: blur(4px);
    background-color: rgba(0, 0, 0, 0.5);
}

/* Responsive design adjustments */
@media (max-width: 640px) {
    .form-control,
    button[type="submit"] {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 48px; /* Touch-friendly height */
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .form-control {
        border-width: 2px;
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom focus indicators for better accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Ensure proper color contrast in dark mode */
.dark {
    color-scheme: dark;
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-gradient-to-br,
    #theme-toggle {
        display: none !important;
    }
}

/* Security indicator styles */
.security-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #10b981;
}

.security-indicator svg {
    width: 1rem;
    height: 1rem;
}

.dark .security-indicator {
    color: #10b981;
}

/* Animation for form validation */
.shake {
    animation: shake 0.5s ease-in-out;
}

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

/* Ensure mobile-friendly touch targets */
@media (hover: none) and (pointer: coarse) {
    button,
    input,
    .clickable {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Password strength indicator (future enhancement placeholder) */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #ef4444;
}

.password-strength.medium {
    background-color: #f59e0b;
}

.password-strength.strong {
    background-color: #10b981;
}