/* Main Login Container */
body.login {
    background-color: #000000;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    color: #e0e0e0;
}

/* Logo Styling */
.login h1 a {
    background-image: none, url('../images/ai-films-logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    height: 100px;
    margin: 0 auto 25px;
    padding: 0;
}

/* Login Form */
#login {
    width: 100%;
    max-width: 440px;
    margin: 100px auto 0;
    padding: 0 20px;
    box-sizing: border-box;
}

.login form {
    background: #0d0d0d;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    padding: 30px 24px 30px;
    margin: 0;
    width: 100%;
    border: 1px solid #3a3a3a;
    box-sizing: border-box;
}

/* Remember Me Checkbox - Hidden */
.forgetmenot {
    display: none !important;
}

/* Input Fields */
.login form .input, 
.login input[type="text"], 
.login input[type="password"] {
    background: #1f1f1f;
    border: 1px solid #3a3a3a;
    color: #e0e0e0;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login form .input:focus, 
.login input[type="text"]:focus, 
.login input[type="password"]:focus {
    border-color: #6a9ee6;
    box-shadow: 0 0 0 2px rgba(106, 158, 230, 0.3);
    outline: none;
}

/* Labels */
.login label {
    color: #b3b3b3;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* Buttons */
.wp-core-ui .button-primary {
    background: #6a9ee6;
    border: none;
    border-radius: 4px;
    box-shadow: none;
    color: #fff;
    text-shadow: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    height: auto;
    padding: 12px 24px;
    transition: all 0.2s ease;
    width: 100%;
}

.wp-core-ui .button-primary:hover, 
.wp-core-ui .button-primary:focus {
    background: #5a8ed6;
    box-shadow: none;
    transform: translateY(-1px);
}

/* Password Toggle */
.login form .user-pass-wrap {
    position: relative;
}

.login form .user-pass-wrap .dashicons-visibility,
.login form .user-pass-wrap .dashicons-hidden {
    display: none !important;
}

.login form .password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    margin: -8px 0 0 !important;  /* Added negative top margin */
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.login form .password-toggle:hover {
    opacity: 1;
}

.login form .password-toggle:focus {
    outline: none;
    box-shadow: none;
}

/* Style the Lucide icons */
.login form .password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    transition: color 0.2s ease;
    cursor: pointer;
}

.login form .password-toggle:hover {
    color: #6a9ee6;
}

/* Ensure proper sizing of SVG icons */
.login form .password-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Hide/show icons based on password visibility */
.login form .password-toggle .eye-off-icon {
    display: none;
}

.login form .show-password .password-toggle .eye-icon {
    display: none;
}

.login form .show-password .password-toggle .eye-off-icon {
    display: block;
}

/* Button Styles */
.wp-core-ui .button,
.wp-core-ui .button-secondary,
.wp-core-ui .button:focus,
.wp-core-ui .button-secondary:focus,
.wp-core-ui .button:hover,
.wp-core-ui .button-secondary:hover {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

#wp-submit {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Messages and Errors */
.login .message,
.login #login_error {
    border-left: 4px solid #6a9ee6;
    background: rgba(13, 13, 13, 0.95);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto 20px;
    max-width: 400px;
    width: 90%;
    box-sizing: border-box;
    padding: 16px 24px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.login #login_error {
    border-left-color: #ff6b6b;
    background: rgba(13, 13, 13, 0.98);
}

.login .message {
    border-left-color: #6a9ee6;
}

.login .message a {
    color: #6a9ee6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login .message a:hover {
    color: #8bb9ff;
    text-decoration: underline;
}

/* Hide Language Switcher */
#language-switcher {
    display: none !important;
}

/* Hide Back to Blog Link */
.login #backtoblog {
    display: none;
}

/* Center Lost Password Link */
.login #nav {
    text-align: center;
    margin: 20px 0 0;
    padding: 0;
}

.login #nav a {
    color: #b3b3b3;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login #nav a:hover {
    color: #6a9ee6;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    #login {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .login form {
        padding: 20px 16px;
        margin: 0;
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.login form {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #6a9ee6;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove WordPress.org Link */
.login #wp-otp-error, 
.login #login_error + p, 
.login .message + p, 
.login .success + p {
    display: none;
}
