/**
 * Custom WordPress Login Page Styles
 * GravityRanger branded login page
 */

/* Base styles */
body.login {
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Login form container */
#login {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Logo */
#login h1,
.login h1 {
    text-align: center;
    margin-bottom: 30px;
}

#login h1 a,
.login h1 a {
    margin: 0 auto;
    display: block;
    text-decoration: none;
}

/* Logo: no custom logo fallback - site name as text */
body.login.has-no-logo #login h1 a,
body.login.has-no-logo .login h1 a {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #333 !important;
    background: none !important;
    background-image: none !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    text-indent: 0 !important;
    overflow: visible !important;
}

/* Logo hover - when no custom logo (text fallback) */
body.login.has-no-logo #login h1 a:hover,
body.login.has-no-logo .login h1 a:hover {
    color: #F5DF61 !important;
}

/* Form styling */
#loginform,
#registerform,
#lostpasswordform {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

#loginform p,
#registerform p,
#lostpasswordform p {
    margin-bottom: 20px;
}

/* Input fields */
#loginform input[type="text"],
#loginform input[type="password"],
#registerform input[type="text"],
#registerform input[type="email"],
#registerform input[type="password"],
#lostpasswordform input[type="text"],
#lostpasswordform input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

#loginform input[type="text"]:focus,
#loginform input[type="password"]:focus,
#registerform input[type="text"]:focus,
#registerform input[type="email"]:focus,
#registerform input[type="password"]:focus,
#lostpasswordform input[type="text"]:focus,
#lostpasswordform input[type="email"]:focus {
    border-color: #F5DF61;
    outline: none;
    box-shadow: 0 0 0 3px rgba(245, 223, 97, 0.2);
}

/* Labels */
#loginform label,
#registerform label,
#lostpasswordform label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* Submit button */
#loginform .button-primary,
#registerform .button-primary,
#lostpasswordform .button-primary,
.wp-core-ui .button-primary {
    width: 100%;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    background: #F5DF61;
    border: none;
    border-radius: 8px;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

#loginform .button-primary:hover,
#registerform .button-primary:hover,
#lostpasswordform .button-primary:hover,
.wp-core-ui .button-primary:hover {
    background-color: #e6d050;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#loginform .button-primary:active,
#registerform .button-primary:active,
#lostpasswordform .button-primary:active,
.wp-core-ui .button-primary:active {
    transform: translateY(0);
    background-color: #d4c045;
}

/* Remember me checkbox - Hidden */
#loginform .forgetmenot {
    display: none !important;
}

/* Links */
#loginform p.submit,
#registerform p.submit,
#lostpasswordform p.submit {
    margin-top: 20px;
    margin-bottom: 0;
}

#nav,
#backtoblog {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px !important;
    padding-bottom: 0;
    border-top: 1px solid #e0e0e0;
    margin-bottom: 0;
}

#nav a,
#backtoblog a {
    color: #231900;
    text-decoration: none;
    font-size: 14px;
    transition: background-size 0.2s;
    display: inline-block;
    padding: 2px 4px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.5) 33%, transparent 33%);
    background-size: 0% 100%;
}

#nav a:hover,
#backtoblog a:hover {
    background-size: 100% 100%;
    color: #231900;
}


/* Signup link */
.login-signup-link {
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.login-signup-link a {
    color: #231900;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    padding: 2px 4px;
    transition: background-size 0.2s;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.5) 33%, transparent 33%);
    background-size: 0% 100%;
}

.login-signup-link a:hover,
.login-signup-link a:focus {
    background-size: 100% 100%;
    color: #231900;
}

.login-signup-link a:hover {
    color: #000000;
    text-decoration: underline;
}

/* Messages and errors */
.login .message,
.login #login_error {
    border-left: 4px solid #F5DF61;
    background: rgba(245, 223, 97, 0.1);
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: none;
}

.login #login_error {
    border-left-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

/* Password strength indicator */
.pw-weak {
    border-color: #ffc107 !important;
}

.pw-medium {
    border-color: #ff9800 !important;
}

.pw-strong {
    border-color: #28a745 !important;
}

/* Language switcher */
#language-switcher {
    text-align: center;
    margin-top: 20px;
}

/* Responsive */
@media screen and (max-width: 480px) {
    #login {
        padding: 30px 20px;
        margin: 0;
        border-radius: 0;
    }

    #login h1 a,
    .login h1 a {
        font-size: 24px;
    }
}

/* Loading state */
.login .button-primary.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

/* Additional polish */
.login form .input,
.login input[type="text"],
.login input[type="password"] {
    font-family: inherit;
}

.login .button {
    font-family: inherit;
}

/* Hide WordPress.org link */
.login #backtoblog {
    display: none;
}
