/**
 * Custom WordPress Login Page Styles
 * Matches the Zunix Writers Village theme design
 */

/* Import theme colors and fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    --zunix-primary: #2D5A87;
    --zunix-secondary: #F4A261;
    --zunix-accent: #E76F51;
    --zunix-dark: #264653;
    --zunix-light: #F1FAEE;
}

/* Body and background */
body.login {
    background: linear-gradient(135deg, var(--zunix-primary) 0%, var(--zunix-accent) 100%);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main login container */
#login {
    width: 400px;
    padding: 0;
    margin: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* Logo section */
.login h1 {
    text-align: center;
    padding: 40px 40px 20px;
    margin: 0;
    background: linear-gradient(135deg, var(--zunix-primary), var(--zunix-accent));
}

.login h1 a {
    background: none !important;
    width: auto !important;
    height: auto !important;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
}

/* Custom logo styling */
.login h1 a::before {
    content: '';
    display: block;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-bottom: 16px;
    background-image: url('../images/favicon.svg');
    background-size: 40px 40px;
    background-repeat: no-repeat;
    background-position: center;
    filter: brightness(0) invert(1);
}

.login h1 a::after {
    content: 'Zunix Writers Village';
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-top: 8px;
}

/* Form container */
.login form {
    margin: 0;
    padding: 40px;
    background: white;
    border: none;
    box-shadow: none;
}

/* Form title */
.login form .forgetmenot {
    margin-bottom: 20px;
}

/* Input fields */
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    background: #f9fafb;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
    outline: none;
    border-color: var(--zunix-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(45, 90, 135, 0.1);
}

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

/* Submit button */
.login .button-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--zunix-primary), var(--zunix-accent));
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-shadow: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.login .button-primary:hover,
.login .button-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #1e3a5f, #d63447);
}

/* Remember me checkbox */
.login .forgetmenot input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    accent-color: var(--zunix-primary);
}

/* Links */
.login #nav a,
.login #backtoblog a {
    color: var(--zunix-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: var(--zunix-accent);
}

/* Navigation and back to blog */
.login #nav,
.login #backtoblog {
    text-align: center;
    padding: 0 40px 30px;
    margin: 0;
    background: white;
}

.login #nav {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

/* Error messages */
.login .message,
.login #login_error {
    border-left: 4px solid var(--zunix-accent);
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    margin: 0 40px 20px;
    border-radius: 0 8px 8px 0;
}

.login .message {
    border-left-color: #10b981;
    background: #f0fdf4;
    color: #065f46;
}

/* Success messages */
.login .updated {
    border-left: 4px solid #10b981;
    background: #f0fdf4;
    color: #065f46;
    padding: 12px 16px;
    margin: 0 40px 20px;
    border-radius: 0 8px 8px 0;
}

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

.login .privacy-policy-page-link a {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
}

.login .privacy-policy-page-link a:hover {
    color: var(--zunix-primary);
}

/* Responsive design */
@media (max-width: 480px) {
    #login {
        width: 90%;
        margin: 20px auto;
    }
    
    .login h1,
    .login form,
    .login #nav,
    .login #backtoblog {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .login h1 a::before {
        width: 60px;
        height: 60px;
        background-size: 30px 30px;
    }
    
    .login h1 a::after {
        font-size: 16px;
    }
}

/* Loading state */
.login .button-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Focus styles for accessibility */
.login input:focus,
.login .button-primary:focus {
    outline: 2px solid var(--zunix-primary);
    outline-offset: 2px;
}

/* Hide WordPress logo */
.login h1 a {
    background-image: none !important;
}
