/* ============================================================
   EBC LOGIN STYLE
   Restyles wp-login.php to match the EBC dark/glass aesthetic.
   Keeps the standard WP login fields intact.
   ============================================================ */

/* ----- Page background: vertical fade from very dark top to lighter bottom ----- */
html {
    background: linear-gradient(180deg, #050810 0%, #0d1420 35%, #1a2332 70%, #243348 100%) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
}

body.login {
    background: transparent !important;
    color: #e8ecf1;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* ----- Hide the default WP logo wherever it appears ----- */
.login h1,
.login h1 a,
#login h1,
#login h1 a {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    background-image: none !important;
    overflow: hidden !important;
    text-indent: -9999px;
}

/* ----- The login card -----
   Scoped to the actual login forms (not the language switcher form). */
#loginform,
#registerform,
#lostpasswordform,
#resetpassform {
    background: rgba(20, 30, 45, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 80px 40px 32px 40px;
    margin-top: 20px;
    position: relative;
    overflow: visible;
}

/* ----- Logo at top of card (replaces the default WP logo) -----
   Scoped to the actual login forms only — NOT to the language
   switcher form, which would otherwise also get a logo overlay. */
#loginform::before,
#registerform::before,
#lostpasswordform::before,
#resetpassform::before {
    content: '';
    display: block;
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 50px;
    background-image: var(--ebc-logo-url);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ----- Container width ----- */
#login {
    width: 360px;
    padding: 5% 0 0;
}

@media (max-width: 480px) {
    #login {
        width: 90%;
        padding: 8% 0 0;
    }
    .login form {
        padding: 70px 24px 24px 24px;
    }
}

/* ----- Field labels ----- */
.login label {
    color: #8a96a8 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: block;
}

/* ----- Input fields ----- */
.login input[type="text"],
.login input[type="email"],
.login input[type="password"] {
    background: rgba(10, 18, 30, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    color: #e8ecf1 !important;
    font-size: 14px !important;
    padding: 12px 14px !important;
    height: auto !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
    line-height: 1.4;
}

.login input[type="text"]:focus,
.login input[type="email"]:focus,
.login input[type="password"]:focus {
    border-color: rgba(80, 140, 255, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(80, 140, 255, 0.15) !important;
    outline: none !important;
}

.login input::placeholder {
    color: #5a6478;
}

/* ----- Password show/hide button ----- */
.login .wp-pwd {
    position: relative;
}

.login .wp-pwd button.button {
    background: transparent !important;
    border: none !important;
    color: #8a96a8 !important;
    box-shadow: none !important;
    top: 50%;
    transform: translateY(-50%);
    height: auto !important;
    padding: 6px 8px !important;
}

.login .wp-pwd button.button:hover {
    color: #e8ecf1 !important;
}

.login .wp-pwd button .dashicons {
    color: inherit;
}

/* ----- "Remember me" row ----- */
.login .forgetmenot {
    color: #8a96a8;
    font-size: 13px;
    margin: 12px 0 18px;
}

.login .forgetmenot label {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #8a96a8 !important;
    display: inline;
}

.login input[type="checkbox"] {
    accent-color: #4a90ff;
    margin-right: 6px;
}

/* ----- Primary submit button ----- */
.login .button-primary,
.login p.submit .button-primary {
    background: linear-gradient(180deg, #3b7fff 0%, #2563eb 100%) !important;
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-shadow: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
    height: auto !important;
    padding: 12px 20px !important;
    width: 100%;
    cursor: pointer;
    transition: transform 0.05s ease, box-shadow 0.15s ease, filter 0.15s ease;
    float: none !important;
}

.login .button-primary:hover,
.login .button-primary:focus {
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.45),
                inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.login .button-primary:active {
    transform: translateY(1px);
    filter: brightness(0.95);
}

.login p.submit {
    margin-top: 4px;
}

/* ----- Links below the form (Lost password / Back to site) ----- */
.login #nav,
.login #backtoblog {
    text-align: center;
    margin: 20px 0 0 !important;
    padding: 0 !important;
    text-shadow: none !important;
}

.login #nav a,
.login #backtoblog a {
    color: #8a96a8 !important;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #4a90ff !important;
}

.login #backtoblog {
    margin-top: 8px !important;
}

/* ----- Notices / errors / messages ----- */
.login .message,
.login .notice,
.login #login_error {
    background: rgba(20, 30, 45, 0.7) !important;
    border-left: 3px solid #4a90ff !important;
    border-radius: 6px;
    color: #e8ecf1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    padding: 12px 14px !important;
    font-size: 13px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login #login_error {
    border-left-color: #ef4444 !important;
}

.login .message a,
.login .notice a,
.login #login_error a {
    color: #4a90ff !important;
}

/* ----- Language switcher (if shown) ----- */
.login .language-switcher,
.language-switcher {
    margin-top: 24px !important;
    text-align: center;
}

.login .language-switcher form,
.language-switcher form {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
}

/* Remove the logo pseudo-element from the language switcher form */
.login .language-switcher form::before,
.language-switcher form::before {
    display: none !important;
    content: none !important;
}

.login .language-switcher select,
.language-switcher select {
    background: rgba(20, 30, 45, 0.6);
    color: #e8ecf1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
}

.login .language-switcher .button,
.language-switcher .button {
    background: rgba(20, 30, 45, 0.6) !important;
    color: #e8ecf1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    height: auto !important;
    font-size: 13px !important;
}

.login .language-switcher label,
.language-switcher label {
    color: #8a96a8 !important;
}

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

.login .privacy-policy-page-link a {
    color: #5a6478 !important;
    font-size: 12px;
    text-decoration: none;
}

.login .privacy-policy-page-link a:hover {
    color: #8a96a8 !important;
}
