/* Login Page Styles for MAGA AV System */

/* Login Card Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-card {
    animation: slideIn 0.4s ease-out;
}

/* Form Transitions */
#loginForm,
#forgotPasswordForm,
#successSection {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#loginForm.hidden,
#forgotPasswordForm.hidden,
#successSection.hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    position: absolute;
}

/* Input Focus Effects */
.input-group {
    position: relative;
}

.input-group input:focus {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Button Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

/* Checkbox Custom Style */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(15, 23, 42, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

input[type="checkbox"]:checked {
    background-color: #0ea5e9;
    border-color: #0ea5e9;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

/* Password Toggle Button */
.password-toggle {
    transition: transform 0.2s ease;
}

.password-toggle:hover {
    transform: scale(1.1);
}

.password-toggle:active {
    transform: scale(0.95);
}

/* Verification Code Input */
#verificationCode {
    letter-spacing: 0.5em;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Background Glow Effects */
.glow-effect {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    animation: pulse 4s ease-in-out infinite;
}

/* Error Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* Success Check Animation */
@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.success-icon {
    animation: scaleIn 0.3s ease-out;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .glass-panel {
        padding: 1.5rem;
    }
    
    #loginCard {
        margin: 0.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.125rem;
    }
    
    .material-symbols-outlined {
        font-size: 18px;
    }
    
    input {
        font-size: 14px;
    }
    
    button {
        font-size: 14px;
    }
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    margin-top: 0.5rem;
}

.password-strength-bar {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-strength-bar.weak {
    width: 33%;
    background-color: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background-color: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background-color: #10b981;
}

/* Link Hover Effects */
a, button[type="button"] {
    transition: all 0.2s ease;
}

/* Form Field Spacing */
.form-field {
    margin-bottom: 1.25rem;
}

.form-field:last-of-type {
    margin-bottom: 0;
}

/* Button Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

/* Loading Spinner */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 100;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast.info {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

/* Input Placeholder Styling */
input::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

/* Focus Ring for Accessibility */
input:focus-visible,
button:focus-visible {
    outline: 2px solid #38bdf8;
    outline-offset: 2px;
}

/* Disabled Button State */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: rgba(14, 165, 233, 0.3);
    color: white;
}
