/* Authentication CSS for HRConnect-Tubigon */

/* Auth page specific styles */
.auth-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Background slideshow layout for auth pages */
.auth-slideshow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    background: #0b1020;
}

.auth-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: authFade 21s infinite;
    /* 3 slides * 7s each */
}

.auth-slide:nth-child(1) {
    animation-delay: 0s;
}

.auth-slide:nth-child(2) {
    animation-delay: 7s;
}

.auth-slide:nth-child(3) {
    animation-delay: 14s;
}

@keyframes authFade {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    6% {
        opacity: 1;
    }

    27% {
        opacity: 1;
        transform: scale(1.05);
    }

    33% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.auth-video-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.8) 100%);
}

/* Form input focus states */
.auth-form input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* Loading states for auth buttons */
.auth-btn-loading {
    position: relative;
    color: transparent;
}

.auth-btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error message animations */
.auth-error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Success message animations */
.auth-success {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for auth pages */
@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        margin: 1rem 0;
        padding: 1.5rem;
    }
}

/* Password strength indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #ef4444;
    width: 25%;
}

.password-strength.fair {
    background-color: #f59e0b;
    width: 50%;
}

.password-strength.good {
    background-color: #10b981;
    width: 75%;
}

.password-strength.strong {
    background-color: #059669;
    width: 100%;
}

/* Remember me checkbox styling */
.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    accent-color: #3b82f6;
}

/* Forgot password link styling */
.forgot-password {
    color: #2563eb !important;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
    text-underline-offset: 2px;
}

.forgot-password:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
    text-decoration-color: #1d4ed8;
}

.auth-glass-card .forgot-password {
    color: #2563eb !important;
}

.auth-glass-card .forgot-password:hover {
    color: #1d4ed8 !important;
}

/* Divider styling */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e5e7eb;
}

.auth-divider span {
    background-color: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Logo and branding */
.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.auth-logo-text {
    font-size: 1.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.auth-logo-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

/* Footer styling */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Form validation styles */
.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-group.error input {
    border-color: #ff6565;
    box-shadow: 0 0 0 3px rgba(233, 116, 116, 0.15);
}

.auth-form .form-group.error .error-message {
    color: #e97474;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.auth-form .form-group.success input {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Accessibility improvements */
.auth-form label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Button states */
.auth-form button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-form button[type="submit"]:hover {
    background-color: #2563eb;
}

.auth-form button[type="submit"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form button[type="submit"]:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Loading spinner for buttons */
.auth-form button[type="submit"].loading {
    position: relative;
    color: transparent;
}

.auth-form button[type="submit"].loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Subtle card elevation */
.auth-card {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Glassmorphism card for auth */
.auth-glass-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(200, 200, 200, 0.8) !important;
}

.auth-glass-card h2,
.auth-glass-card h3,
.auth-glass-card label,
.auth-glass-card p {
    color: #111827 !important;
}

.auth-glass-card .text-gray-500 {
    color: #6b7280 !important;
}

/* Ensure error messages stay red and visible inside glass card */
.auth-glass-card .text-red-500,
.auth-glass-card .text-red-600,
.auth-glass-card .text-red-700 {
    color: #ff6565 !important;
}

.auth-glass-card input {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}

.auth-glass-card input::placeholder {
    color: #9ca3af !important;
}

.auth-glass-card .text-gray-600,
.auth-glass-card .text-gray-700,
.auth-glass-card .text-gray-900 {
    color: #374151 !important;
}

/* Border colors for glass card */
.auth-glass-card .border-gray-200 {
    border-color: #e5e7eb !important;
}

/* Force blue for 'Contact your administrator' link inside glass card */
.auth-glass-card .contact-admin-link {
    color: #2563eb !important;
}

.auth-glass-card .contact-admin-link:hover {
    color: #2563eb !important;
    text-decoration: underline;
    text-decoration-color: #2563eb;
}

/* Force blue for 'Sign in' link on register page as requested */
.auth-glass-card .sign-in-link {
    color: #2563eb !important;
}

.auth-glass-card .sign-in-link:hover {
    color: #2563eb !important;
    text-decoration: underline;
    text-decoration-color: #2563eb;
}

.auth-glass-card .border-gray-300 {
    border-color: #d1d5db !important;
}

.auth-glass-card .error-message {
    color: #ef4444 !important;
}

.auth-glass-card button#sign-in-button {
    background: #3b82f6 !important;
    color: #ffffff !important;
}

.auth-glass-card button#sign-in-button:hover {
    background: #2563eb !important;
}

.auth-glass-card button#showDevelopersBtn {
    color: #374151 !important;
}

.auth-glass-card button#showDevelopersBtn:hover {
    color: #111827 !important;
}

/* Transparent background for password eye toggle */
[data-password-toggle] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

[data-password-toggle]:hover,
[data-password-toggle]:focus {
    background: transparent !important;
    box-shadow: none !important;
}

/* Eye icon color globally: black */
[data-password-toggle],
[data-password-toggle] i {
    color: #111827 !important;
    /* black-ish */
}

[data-password-toggle]:hover,
[data-password-toggle]:focus {
    color: #111827 !important;
}

/* Ensure Lucide SVG inherits/uses black stroke */
[data-password-toggle] svg,
.auth-glass-card [data-password-toggle] svg {
    stroke: #111827 !important;
    color: #111827 !important;
}

[data-password-toggle]:hover svg,
[data-password-toggle]:focus svg {
    stroke: #111827 !important;
}

/* Ensure eye icon is black on glass background as well */
.auth-glass-card [data-password-toggle] {
    color: #111827 !important;
}

.auth-glass-card [data-password-toggle]:hover,
.auth-glass-card [data-password-toggle]:focus {
    color: #111827 !important;
}

/* "Send to another email" button should be BLUE */
.send-another-email-btn,
button[onclick="location.reload()"],
.text-center button[onclick="location.reload()"],
.auth-glass-card button[onclick="location.reload()"],
.auth-glass-card .send-another-email-btn {
    color: #2563eb !important;
    background: transparent !important;
    border: none !important;
    text-decoration: none !important;
}

.send-another-email-btn:hover,
button[onclick="location.reload()"]:hover,
.text-center button[onclick="location.reload()"]:hover,
.auth-glass-card button[onclick="location.reload()"]:hover,
.auth-glass-card .send-another-email-btn:hover {
    color: #3b82f6 !important;
    text-decoration: underline !important;
}

/* Developer modal hover effects */
.group:hover .group-hover\:text-blue-600 {
    color: #2563eb !important;
}

/* Specific targeting for developer names and titles in modal */
#developerModal .group:hover p.text-gray-900,
#developerModal .group:hover p.text-gray-600 {
    color: #2563eb !important;
}