/* Login Page Specific Styles */

/* Top Navigation */
.top-navigation {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

/* Override language switcher positioning for login page */
.language-switcher {
    position: static !important;
    top: auto !important;
    right: auto !important;
}

/* Main login container */
.login-main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    padding: 40px 0;
}

.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 50px 40px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* Back link - styling handled by top-navigation container */

.back-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    color: #ffffff;
}

/* Logo */
.login-logo {
    margin-bottom: 20px;
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* Title */
.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Form */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    color: #ffffff;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    outline: none;
    border-color: #0078d4;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.3);
}

.form-group input:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

/* Login Button */
.login-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #0078d4, #005a9e);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.login-submit-btn:hover {
    background: linear-gradient(135deg, #106ebe, #005a9e);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 120, 212, 0.4);
}

.login-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 120, 212, 0.4);
}

.login-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: none;
}

.login-submit-btn.loading .btn-text {
    display: none;
}

.login-submit-btn.loading .btn-loader {
    display: inline;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    padding: 12px 16px;
    color: #ffffff;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 15px;
    backdrop-filter: blur(10px);
}

/* Login Info */
.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-info p {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.contact-link {
    color: #0078d4;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-main {
        padding: 20px;
        min-height: calc(100vh - 80px);
    }
    
    .login-container {
        padding: 40px 30px;
        margin: 0 15px;
    }
    
    .top-navigation {
        top: 15px;
        left: 15px;
        right: 15px;
    }
    
    .login-title {
        font-size: 1.7rem;
        margin-bottom: 30px;
    }
    
    .logo-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 25px;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .logo-image {
        width: 80px;
        height: 80px;
    }
    
    .form-group input {
        padding: 12px 15px;
    }
    
    .login-submit-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

/* Focus styles for accessibility */
.login-submit-btn:focus,
.form-group input:focus,
.back-link a:focus,
.contact-link:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Animation for form appearance */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container {
    animation: slideInUp 0.6s ease-out;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loader::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

/* Form validation states */
.form-group input.invalid {
    border-color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.form-group input.valid {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

/* Auto-fill styles - Override browser defaults */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    /* Override background - keep white/transparent */
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.9) inset !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    /* Override text color to black for better readability */
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
    /* Transition for smooth change */
    transition: all 0.3s ease !important;
}

/* Autofill placeholder styling */
.form-group input:-webkit-autofill::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
}

/* Focus state for autofilled inputs */
.form-group input:-webkit-autofill:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #0078d4 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset, 0 0 0 3px rgba(0, 120, 212, 0.3) !important;
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
}

/* Firefox autofill override */
.form-group input:-moz-autofill {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #000000 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

/* Additional autofill states */
.form-group input:autofill {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Force remove yellow background on all browsers */
.form-group input:-internal-autofill-selected {
    background-color: rgba(255, 255, 255, 0.9) !important;
    background-image: none !important;
    color: #000000 !important;
}