/* Enhanced Responsive Styles for Auth Pages */

/* Base responsive breakpoints */
@media (max-width: 480px) {
    .auth-container {
        padding: 0.5rem;
    }
    
    .auth-card {
        margin: 0.5rem;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    
    .branding-side {
        padding: 1.5rem 1rem;
        min-height: 200px;
    }
    
    .branding-side h1 {
        font-size: 1.5rem !important;
    }
    
    .branding-side p {
        font-size: 0.875rem !important;
    }
    
    .feature-list {
        margin-top: 1rem !important;
    }
    
    .feature-item {
        font-size: 0.8rem !important;
    }
    
    .form-side {
        padding: 1.5rem 1rem;
    }
    
    .form-control {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .auth-card {
        margin: 1rem;
    }
    
    .branding-side, .form-side {
        padding: 2rem 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Desktop improvements */
@media (min-width: 1024px) {
    .auth-card {
        max-width: 1100px;
    }
    
    .branding-side {
        padding: 4rem 3rem;
    }
    
    .form-side {
        padding: 4rem 3rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo {
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .auth-card {
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
    }
    
    .auth-card {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .form-label {
        color: #1f2937 !important;
    }
    
    .form-control {
        background: #374151;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .form-control:focus {
        border-color: #3b82f6;
        background: #4b5563;
    }
    
    .text-muted {
        color: #1f2937 !important;
    }
    
    /* Dark mode password toggle */
    #toggle-password {
        color: #9ca3af !important;
    }
    
    #toggle-password:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #3b82f6 !important;
    }
}

/* Focus improvements for accessibility */
.form-control:focus,
.btn:focus,
input[type="checkbox"]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading animation improvements */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    border-color: transparent;
    border-top-color: currentColor;
    border-width: 2px;
}

/* Smooth transitions */
.form-control,
.btn,
.alert {
    transition: all 0.2s ease-in-out;
}

/* Password toggle button styles */
#toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
}

#toggle-password:hover {
    background: rgba(0, 0, 0, 0.05) !important;
}

#toggle-password:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background: rgba(0, 0, 0, 0.05) !important;
}

#toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

#eye-icon {
    transition: all 0.2s ease-in-out;
}

/* Custom tooltip styling */
#toggle-password[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 120%;
    right: 0;
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease-out forwards;
}

#toggle-password[title]:hover::before {
    content: '';
    position: absolute;
    bottom: 110%;
    right: 0.5rem;
    border: 4px solid transparent;
    border-top-color: #1f2937;
    z-index: 1000;
}

@keyframes tooltipFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(5px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

/* Touch targets for mobile */
@media (max-width: 768px) {
    .btn,
    .form-control,
    input[type="checkbox"],
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    .checkbox-container label {
        padding: 0.5rem;
    }
    
    /* Enhanced password toggle for mobile */
    #toggle-password {
        min-width: 48px;
        min-height: 48px;
        right: 0.5rem !important;
    }
    
    #eye-icon {
        font-size: 20px !important;
    }
    
    /* Adjust password input padding on mobile */
    #password-field {
        padding-right: 3.5rem !important;
    }
    
    /* Disable tooltips on touch devices */
    #toggle-password[title]:hover::after,
    #toggle-password[title]:hover::before {
        display: none;
    }
}

/* Print styles */
@media print {
    .auth-container {
        background: white !important;
    }
    
    .branding-side {
        background: white !important;
        color: black !important;
    }
    
    .feature-icon {
        background: #e5e7eb !important;
    }
} 