/* ============================================================
   Shrewsbury Music — Custom Login Page
   Layers on top of WP's own login.css. Keeps the centring,
   replaces all visual styling.
   ============================================================ */

:root {
    --osm-cream: #FFF6E8;
    --osm-navy: #1F1B3E;
    --osm-coral: #FF5E5B;
    --osm-yellow: #FFB627;
}

/* Animated background body — flex column with vertical centring so brand+form sit as ONE block */
body.osm-branded-login {
    background: var(--osm-cream) !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: stretch !important;
    padding: 40px 0 140px !important;
    box-sizing: border-box !important;
}

/* Hide things we don't want */
body.osm-branded-login .language-switcher,
body.osm-branded-login #language-switcher,
body.osm-branded-login .privacy-policy-page-link,
body.osm-branded-login #backtoblog {
    display: none !important;
}

/* Hide the default WordPress login title h1 (the wp-logo link) */
body.osm-branded-login #login h1,
body.osm-branded-login .login h1 {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Animated background gradient blobs (drift slowly across the page) */
body.osm-branded-login::before,
body.osm-branded-login::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    filter: blur(70px);
    opacity: 0.45;
}
body.osm-branded-login::before {
    width: 540px;
    height: 540px;
    background: var(--osm-coral);
    top: -180px;
    left: -180px;
    animation: osm-blob-1 18s ease-in-out infinite;
}
body.osm-branded-login::after {
    width: 460px;
    height: 460px;
    background: var(--osm-yellow);
    bottom: -130px;
    right: -130px;
    animation: osm-blob-2 22s ease-in-out infinite;
}
@keyframes osm-blob-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(80px, 50px) scale(1.1); }
    66%      { transform: translate(-40px, 100px) scale(0.9); }
}
@keyframes osm-blob-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-80px, -60px) scale(1.15); }
}

/* Outer container — vertically centred by the body's flex layout above */
body.osm-branded-login #login {
    width: 380px !important;
    max-width: 92% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
}

/* ============================================================
   Brand block above the form
   ============================================================ */
.osm-login-brand {
    text-align: center;
    margin-bottom: 24px;
}
.osm-login-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    max-width: 100%;
    color: var(--osm-navy);
    text-decoration: none;
}
.osm-login-logo:focus-visible {
    outline: 2px solid var(--osm-navy);
    outline-offset: 6px;
    border-radius: 6px;
}
.osm-login-logo .osm-brand { width: 240px; max-width: 100%; }

/* Animated equalizer divider */
.osm-login-divider {
    display: flex;
    justify-content: center;
    margin: 14px 0 10px;
}
.osm-login-divider .osm-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}
.osm-login-divider .osm-eq__bar {
    width: 4px;
    background: var(--osm-coral);
    border-radius: 2px 2px 0 0;
}
.osm-eq__bar--1 { animation: osm-eq-1 0.9s ease-in-out infinite; }
.osm-eq__bar--2 { animation: osm-eq-2 1.1s ease-in-out infinite; }
.osm-eq__bar--3 { animation: osm-eq-3 0.7s ease-in-out infinite; }
.osm-eq__bar--4 { animation: osm-eq-4 1.3s ease-in-out infinite; }
.osm-eq__bar--5 { animation: osm-eq-5 0.95s ease-in-out infinite; }
@keyframes osm-eq-1 { 0%, 100% { height: 30%; } 50% { height: 90%; } }
@keyframes osm-eq-2 { 0%, 100% { height: 60%; } 50% { height: 100%; } }
@keyframes osm-eq-3 { 0%, 100% { height: 80%; } 50% { height: 40%; } }
@keyframes osm-eq-4 { 0%, 100% { height: 50%; } 50% { height: 95%; } }
@keyframes osm-eq-5 { 0%, 100% { height: 70%; } 50% { height: 35%; } }

.osm-login-tagline {
    color: var(--osm-navy);
    opacity: 0.7;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
    text-align: center;
}

/* ============================================================
   Form card — fully restyled
   ============================================================ */
body.osm-branded-login #loginform,
body.osm-branded-login #registerform,
body.osm-branded-login #lostpasswordform,
body.osm-branded-login #resetpassform {
    background: #fff !important;
    border: 0 !important;
    border-radius: 18px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5) inset,
        0 12px 40px rgba(31,27,62,0.12),
        0 2px 8px rgba(31,27,62,0.06) !important;
    padding: 32px 28px !important;
    margin: 14px 0 0 !important;
    overflow: hidden !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Top accent bar inside the form */
body.osm-branded-login #loginform::before,
body.osm-branded-login #registerform::before,
body.osm-branded-login #lostpasswordform::before,
body.osm-branded-login #resetpassform::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--osm-coral) 0%, var(--osm-yellow) 50%, var(--osm-coral) 100%);
    background-size: 200% 100%;
    animation: osm-accent-shimmer 3s linear infinite;
}
@keyframes osm-accent-shimmer {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

body.osm-branded-login #loginform p,
body.osm-branded-login #registerform p,
body.osm-branded-login #lostpasswordform p,
body.osm-branded-login #resetpassform p {
    margin: 0 0 16px !important;
    text-align: left;
}

body.osm-branded-login #loginform label,
body.osm-branded-login #registerform label,
body.osm-branded-login #lostpasswordform label,
body.osm-branded-login #resetpassform label {
    color: var(--osm-navy) !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    display: block;
    margin-bottom: 6px !important;
    line-height: 1.3 !important;
}

body.osm-branded-login input[type="text"],
body.osm-branded-login input[type="email"],
body.osm-branded-login input[type="password"] {
    background: var(--osm-cream) !important;
    border: 1.5px solid #F0E6D0 !important;
    border-radius: 10px !important;
    padding: 13px 14px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: var(--osm-navy) !important;
    box-shadow: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
    height: auto !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    margin: 0 !important;
}
body.osm-branded-login input[type="text"]:focus,
body.osm-branded-login input[type="email"]:focus,
body.osm-branded-login input[type="password"]:focus {
    border-color: var(--osm-coral) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgba(255,94,91,0.15) !important;
    outline: none !important;
}

/* ============================================================
   Show/hide password button — reposition + restyle
   ============================================================ */
body.osm-branded-login .wp-pwd {
    position: relative;
}
body.osm-branded-login .wp-pwd input[type="password"],
body.osm-branded-login .wp-pwd input[type="text"] {
    padding-right: 48px !important;
}
body.osm-branded-login .wp-pwd .button.wp-hide-pw {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    position: absolute !important;
    right: 4px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    padding: 4px 10px !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    color: var(--osm-navy) !important;
    opacity: 0.55;
    transition: opacity 0.2s ease, color 0.2s ease;
    line-height: 1 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
}
body.osm-branded-login .wp-pwd .button.wp-hide-pw:hover {
    opacity: 1;
    color: var(--osm-coral) !important;
    background: transparent !important;
}
/* The dashicon inside the button — keep it small and inline */
body.osm-branded-login .wp-pwd .button.wp-hide-pw .dashicons {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px !important;
    line-height: 18px !important;
    vertical-align: middle;
}
/* Hide the screen-reader text inside the button */
body.osm-branded-login .wp-pwd .button.wp-hide-pw .text {
    display: none !important;
}

/* ============================================================
   Caps lock indicator — convert to a small inline pill
   ============================================================ */
body.osm-branded-login .capslock-tip,
body.osm-branded-login #pass1-text-wrap .capslock {
    background: var(--osm-yellow) !important;
    color: var(--osm-navy) !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    width: auto !important;
    margin-top: 6px !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}
body.osm-branded-login .capslock-tip::before {
    content: '⚠️ ';
}
/* Hide the dashicon if WP also adds one */
body.osm-branded-login .capslock-tip .dashicons,
body.osm-branded-login .capslock .dashicons {
    display: none !important;
}

/* ============================================================
   Remember-me / keep signed in
   ============================================================ */
body.osm-branded-login .forgetmenot {
    margin-top: 6px !important;
    float: none !important;
}
body.osm-branded-login .forgetmenot label {
    text-transform: none !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    letter-spacing: 0 !important;
    color: var(--osm-navy) !important;
    opacity: 0.75;
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0 !important;
}
body.osm-branded-login .forgetmenot input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    border: 1.5px solid #F0E6D0 !important;
    border-radius: 4px !important;
    accent-color: var(--osm-coral);
    margin: 0 !important;
}

/* ============================================================
   Submit button — full pill, dramatic hover
   ============================================================ */
body.osm-branded-login p.submit {
    text-align: center !important;
    margin: 18px 0 0 !important;
}
body.osm-branded-login .submit input[type="submit"],
body.osm-branded-login p.submit input[type="submit"],
body.osm-branded-login #wp-submit {
    background: var(--osm-coral) !important;
    color: var(--osm-cream) !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 14px 22px !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    text-shadow: none !important;
    box-shadow: 0 4px 0 rgba(31,27,62,0.15) !important;
    width: 100% !important;
    height: auto !important;
    line-height: 1.2 !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease, color 0.2s ease !important;
    font-family: inherit !important;
    min-height: 0 !important;
    float: none !important;
    margin: 0 !important;
}
body.osm-branded-login #wp-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(31,27,62,0.15) !important;
    background: var(--osm-navy) !important;
    color: var(--osm-yellow) !important;
}
body.osm-branded-login #wp-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 0 rgba(31,27,62,0.15) !important;
}

/* ============================================================
   Below-form links (Forgotten password? Register)
   ============================================================ */
body.osm-branded-login #nav {
    text-align: center !important;
    padding: 18px 0 0 !important;
    margin: 0 !important;
    font-size: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    text-shadow: none !important;
}
body.osm-branded-login #nav a {
    color: var(--osm-navy) !important;
    opacity: 0.65;
    text-decoration: none !important;
    border-bottom: 1px dashed transparent !important;
    transition: color 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
    box-shadow: none !important;
    text-shadow: none !important;
}
body.osm-branded-login #nav a:hover {
    color: var(--osm-coral) !important;
    opacity: 1;
    border-bottom-color: var(--osm-coral) !important;
}

/* ============================================================
   Messages (info, success, errors)
   ============================================================ */
body.osm-branded-login .osm-login-message,
body.osm-branded-login .login .message,
body.osm-branded-login .login-action-confirm_admin_email .message {
    background: #D6F0DE !important;
    color: #0F4D2A !important;
    border-left: 4px solid #3F8C5C !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin: 0 0 16px !important;
    font-size: 13px !important;
    font-weight: 500;
    box-shadow: none !important;
    text-align: left;
}
body.osm-branded-login #login_error {
    background: #FFD7D6 !important;
    color: #7A1F3D !important;
    border-left: 4px solid var(--osm-coral) !important;
    border-radius: 10px !important;
    padding: 14px 18px !important;
    margin: 0 0 16px !important;
    font-size: 13px !important;
    font-weight: 500;
    box-shadow: none !important;
    text-align: left;
}
body.osm-branded-login #login_error a {
    color: inherit !important;
    font-weight: 700 !important;
}

/* ============================================================
   Below-form: secondary link (back to listings)
   Sits in normal flow right under the form.
   ============================================================ */
.osm-login-secondary {
    text-align: center;
    margin: 24px 0 8px;
    padding: 0;
    position: relative;
    z-index: 1;
}
.osm-login-back {
    display: inline-block;
    color: var(--osm-navy) !important;
    opacity: 0.7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}
.osm-login-back:hover {
    color: var(--osm-coral) !important;
    opacity: 1;
    transform: translateX(-2px);
}

/* ============================================================
   Bottom bar: "Run a venue?" CTA + copyright
   Absolutely pinned to the bottom of the page (out of flex flow)
   so the brand+form can sit centred vertically without being
   affected by the bar's height.
   ============================================================ */
.osm-login-bottom {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 2;
    box-sizing: border-box;
}
.osm-login-cta {
    width: 100%;
    margin: 0;
    background: var(--osm-navy);
    color: var(--osm-cream);
    border-radius: 0;
    padding: 18px 24px;
    font-size: 13px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    box-shadow: 0 -6px 24px rgba(31,27,62,0.12);
    position: relative;
    overflow: hidden;
}
.osm-login-cta::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: var(--osm-yellow);
    border-radius: 50%;
    opacity: 0.12;
}
.osm-login-cta::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: var(--osm-coral);
    border-radius: 50%;
    opacity: 0.1;
}
.osm-login-cta strong {
    color: var(--osm-yellow);
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 13px;
    position: relative;
}
.osm-login-cta a {
    color: var(--osm-cream) !important;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed rgba(255,246,232,0.4) !important;
    transition: color 0.2s ease, border-color 0.2s ease;
    position: relative;
}
.osm-login-cta a:hover {
    color: var(--osm-yellow) !important;
    border-bottom-color: var(--osm-yellow) !important;
}
.osm-login-copyright {
    margin: 0;
    padding: 14px 16px;
    font-size: 11px;
    color: var(--osm-navy);
    opacity: 0.4;
    letter-spacing: 0.3px;
    text-align: center;
    background: rgba(31,27,62,0.03);
}

/* Stack on narrow phones — strong above link, not side-by-side */
@media (max-width: 480px) {
    .osm-login-cta {
        flex-direction: column;
        gap: 6px;
        padding: 16px 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body.osm-branded-login {
        padding: 30px 0 160px !important; /* more bottom space — CTA stacks on phones */
    }
    body.osm-branded-login #login {
        width: 92% !important;
    }
    body.osm-branded-login::before,
    body.osm-branded-login::after { filter: blur(40px); opacity: 0.35; }
}

/* Email-code access: calm, readable, and fully usable without JavaScript. */
body.osm-email-code-login {
    --osm-cream: #FBF7F0;
    --osm-navy: #163F5B;
    --osm-coral: #CC6130;
    --osm-yellow: #E1B651;
    padding-bottom: 40px !important;
}
body.osm-email-code-login::before,
body.osm-email-code-login::after { animation: none; opacity: .12; }
body.osm-email-code-login #login { width: 440px !important; }
body.osm-email-code-login .osm-login-bottom { position: static !important; margin-top: 24px !important; }
body.osm-email-code-login #loginform::before {
    animation: none;
    background: linear-gradient(90deg, #235D9F, #E1B651 65%, #CC6130);
}
.osm-otp-title {
    margin: 0 0 16px;
    color: var(--osm-navy);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 25px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.025em;
}
.osm-otp-intro, .osm-otp-help { color: #526B7B; font-size: 13px; line-height: 1.65; }
body.osm-branded-login #loginform .osm-otp-help { margin: -3px 0 18px !important; font-size: 12px; }
body.osm-branded-login #loginform .osm-otp-remember { float: none; margin: 22px 0 12px !important; }
body.osm-branded-login #loginform .osm-otp-remember label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
}
body.osm-branded-login #loginform .osm-otp-remember input { flex: 0 0 18px; margin: 1px 0 0 !important; }
body.osm-branded-login #loginform .osm-otp-code {
    font-size: 25px !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: .24em;
    text-align: center;
    padding-left: calc(14px + .24em) !important;
}
body.osm-branded-login #loginform .osm-otp-error {
    color: #852D1D;
    background: #FFF1E9;
    border-left: 3px solid #CC6130;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}
body.osm-branded-login #loginform .osm-otp-actions { display: grid; gap: 14px; clear: both; }
.osm-otp-resend {
    width: fit-content;
    border: 0;
    padding: 0;
    background: none;
    color: var(--osm-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
}
body.osm-branded-login .osm-otp-form .submit button {
    width: 100%;
    min-height: 48px;
    padding: 13px 18px;
    float: none;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: #163F5B;
    box-shadow: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
    white-space: normal;
    cursor: pointer;
    transition: background .2s ease;
}
body.osm-branded-login .osm-otp-form .submit button:hover { background: #235D9F; }
.osm-otp-actions a, .osm-otp-password-link a { color: var(--osm-navy); font-size: 12px; line-height: 1.65; }
.osm-otp-password-link { clear: both; }
.osm-otp-form button:focus-visible, .osm-otp-actions a:focus-visible, .osm-otp-password-link a:focus-visible {
    outline: 3px solid #235D9F;
    outline-offset: 4px;
    border-radius: 3px;
}
@media (max-width: 480px) {
    body.osm-email-code-login { padding: 24px 0 !important; }
    body.osm-email-code-login #login { width: 92% !important; }
    body.osm-email-code-login #loginform { padding: 26px 22px !important; }
    .osm-otp-title { font-size: 23px; }
}
