/* Custom styles for admin panel */

/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f9fafb;
}

/* Form elements */
input[type="email"],
input[type="password"] {
    transition: all 0.2s ease-in-out;
}

input[type="email"]:focus,
input[type="password"]:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    border-color: #4f46e5;
}

/* Buttons */
button[type="submit"] {
    transition: all 0.2s ease-in-out;
}

button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Error messages */
.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Language selector */
.language-selector {
    z-index: 50;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .login-container {
        padding: 1rem;
    }
    
    .language-selector {
        top: 1rem;
        right: 1rem;
    }
}

/* Fix for gray menu on tablets after click */
/* Disable default tap highlight */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Fix active states for sidebar menu items - more specific selectors */
nav a:active,
nav button:active {
    background-color: inherit !important;
    color: inherit !important;
}

/* Specific fix for sidebar links with active state */
nav a.text-white.bg-gray-600:active,
nav a.text-white.bg-gray-700:active,
nav a[class*="bg-gray-600"][class*="text-white"]:active,
nav a[class*="bg-gray-700"][class*="text-white"]:active {
    background-color: rgb(75 85 99) !important; /* gray-600 */
    color: rgb(255 255 255) !important;
}

/* Dark mode active states */
.dark nav a.text-white.bg-gray-700:active,
.dark nav a[class*="bg-gray-700"][class*="text-white"]:active {
    background-color: rgb(55 65 81) !important; /* gray-700 */
    color: rgb(255 255 255) !important;
}

/* Mobile and tablet specific fixes */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - prevent gray flash on tap */
    nav a,
    nav button {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Maintain hover states on touch */
    nav a:hover,
    nav button:hover {
        background-color: inherit;
    }
    
    /* Fix active state for sidebar menu - preserve colors */
    nav a:active {
        opacity: 1 !important;
    }
    
    /* Preserve active menu item colors on touch devices */
    nav a.text-white.bg-gray-600:active,
    nav a.text-white.bg-gray-700:active,
    nav a[class*="bg-gray-600"][class*="text-white"]:active,
    nav a[class*="bg-gray-700"][class*="text-white"]:active {
        background-color: rgb(75 85 99) !important;
        color: rgb(255 255 255) !important;
        opacity: 1 !important;
    }
    
    .dark nav a.text-white.bg-gray-700:active,
    .dark nav a[class*="bg-gray-700"][class*="text-white"]:active {
        background-color: rgb(55 65 81) !important;
        color: rgb(255 255 255) !important;
        opacity: 1 !important;
    }
    
    /* Fix for non-active menu items on touch */
    nav a.text-gray-300:active,
    nav a[class*="text-gray-300"]:active {
        background-color: rgb(55 65 81) !important; /* gray-700 */
        color: rgb(209 213 219) !important; /* gray-300 */
        opacity: 1 !important;
    }
}
