/**
 * Custom Login Page Styling
 * Modern, professional design for Planner App
 */

/* Body & Background */
body.login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Login Container */
#login {
    padding: 3% 0 0;
}

/* Logo */
.login h1 a {
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    font-size: 36px;
    font-weight: 700;
    color: white !important;
    text-indent: 0 !important;
    text-align: center;
    margin-bottom: 20px;
}

.login h1 a::before {
    content: "🎯 Planner App";
    display: block;
}

/* Login Form */
.login form {
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    border: none !important;
    padding: 35px;
    margin-top: 15px;
}

/* Form Labels */
.login label {
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Input Fields */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 15px;
    color: #1e293b;
    transition: all 0.3s ease;
    box-shadow: none !important;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    background: #ffffff;
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* Submit Button */
.login .button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
    transition: all 0.3s ease !important;
    height: auto !important;
    line-height: 1.5 !important;
    width: 100%;
    margin-top: 10px;
}

.login .button-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6b3f8f 100%) !important;
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5) !important;
    transform: translateY(-2px);
}

.login .button-primary:active {
    transform: translateY(0);
}

/* Remember Me Checkbox */
.login .forgetmenot {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.login input[type="checkbox"] {
    border-radius: 4px;
    border: 2px solid #e2e8f0;
    margin-right: 8px;
}

.login input[type="checkbox"]:checked {
    background: #667eea;
    border-color: #667eea;
}

/* Links Below Form */
#nav,
#backtoblog {
    text-align: center;
    margin-top: 20px;
}

#nav a,
#backtoblog a {
    color: white !important;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#nav a:hover,
#backtoblog a:hover {
    color: #f1f5f9 !important;
    text-decoration: underline;
}

/* Privacy Policy Link */
.privacy-policy-page-link {
    text-align: center;
    margin-top: 20px;
}

.privacy-policy-page-link a {
    color: white !important;
    font-size: 13px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Error Messages */
.login #login_error,
.login .message,
.login .success {
    border-left: 4px solid #dc2626;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login .message,
.login .success {
    border-left-color: #16a34a;
    background: #d1fae5;
    color: #065f46;
}

/* Remove WordPress Logo Link */
.login h1 a:hover,
.login h1 a:focus {
    color: white !important;
}

/* Language Switcher */
.login .language-switcher {
    text-align: center;
    margin-top: 20px;
}

.login .language-switcher label {
    color: white;
    font-weight: 500;
    margin-right: 8px;
}

.login .language-switcher select {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    padding: 6px 12px;
    font-size: 14px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    body.login {
        padding: 0 20px;
    }
    
    #login {
        padding: 5% 0 0;
        width: 100% !important;
    }
    
    .login form {
        padding: 30px 25px;
        margin-left: 0;
        margin-right: 0;
    }
    
    .login h1 a {
        font-size: 32px;
    }
}

/* Loading State */
.login .button-primary.loading {
    position: relative;
    pointer-events: none;
}

.login .button-primary.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Footer Note */
.login::after {
    content: "Secure Login • Your data is protected";
    display: block;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-top: 30px;
    padding-bottom: 20px;
}

/* Interim Login */
.interim-login #login {
    padding: 10% 0 0;
}

.interim-login.login h1 a {
    width: 100%;
    margin: 0 auto 20px;
}
