/*
 * UI fixes (2026-10-17) — loaded by inc/ui-fixes.php.
 * Kept out of the compiled Tailwind main.css so a rebuild can't wipe it.
 * "html body" prefixes beat the inline <style id="hot-auth-form-visibility"> block in functions.php.
 */

/* 1. Newsletter / sponsor / lesson Forminator forms sit in a dark wrapper (text forced white),
      but the fields themselves are white — typed text was white-on-white (invisible). */
html body .forminator-wrapper-dark input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html body .forminator-wrapper-dark textarea,
html body .forminator-wrapper-dark select {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    caret-color: #111111 !important;
    background-color: #ffffff !important;
}
html body .forminator-wrapper-dark input::placeholder,
html body .forminator-wrapper-dark textarea::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}

/* 1b. The Subscribe button had no background/border (white text on the dark page = looked like plain text).
       Gold pill to match the rest of the site's buttons. */
html body .forminator-wrapper-dark .forminator-button-submit {
    background-color: #F8B010 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    border: 0 !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    min-height: 40px;
}
html body .forminator-wrapper-dark .forminator-button-submit:hover,
html body .forminator-wrapper-dark .forminator-button-submit:focus {
    background-color: #ffc933 !important;
}

/* 2. Login page layout: the real "Log In" button comes first and is the big primary button;
      "Register" drops below it as a secondary outlined button (it used to sit ABOVE Log In). */
html body .tml-login form,
html body form#loginform {
    display: flex;
    flex-direction: column;
}
html body .tml-login form .tml-submit-wrap,
html body form#loginform p.submit {
    order: 1;
    text-align: center;
    margin-top: 14px;
}
html body .tml-login form .hot-create-account-link,
html body form#loginform .hot-create-account-link {
    order: 2;
}
html body .tml-login form input[type="hidden"] {
    order: 3;
}
/* scoped to the main submit row only, so Wordfence's own injected 2FA button is left alone */
html body .tml-submit-wrap .tml-button,
html body .tml-submit-wrap input[type="submit"],
html body .tml-submit-wrap button[type="submit"],
html body form#loginform p.submit input[type="submit"] {
    min-width: 200px;
    padding: 12px 24px !important;
    border-radius: 9999px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
}
html body form#loginform p.submit .button-primary {
    float: none !important; /* wp-login.php floats the button right; center it like the TML page */
}
html body .hot-create-account-link a {
    background: transparent !important;
    background-color: transparent !important;
    color: #F8B010 !important;
    -webkit-text-fill-color: #F8B010 !important;
    border: 2px solid #F8B010 !important;
    box-shadow: none !important;
}

/* 3. Theme My Login messages ("You are now logged out", errors) were light text on a white box. */
html body .tml .tml-message,
html body .tml .tml-errors li,
html body .tml .tml-error {
    background: #262626 !important;
    color: #fafafa !important;
    border-left: 4px solid #F8B010 !important;
    padding: 10px 14px !important;
    margin-bottom: 12px !important;
}
html body .tml .tml-errors li,
html body .tml .tml-error {
    border-left-color: #e60000 !important;
}
html body .tml .tml-message a,
html body .tml .tml-error a {
    color: #F8B010 !important;
}

/* 3b. Wordfence pops its login errors / 2FA prompt in a white modal (#wfls-login-modal) appended to <body>.
       The body text colour is near-white, so the text inside the white box was invisible. */
html body #wfls-login-modal > div {
    color: #1d2327 !important;
    background-color: #ffffff !important;
    max-width: 520px;
}
html body #wfls-login-modal p,
html body #wfls-login-modal label,
html body #wfls-login-modal strong,
html body #wfls-login-modal span,
html body #wfls-login-modal h1,
html body #wfls-login-modal h2,
html body #wfls-login-modal h3 {
    color: #1d2327 !important;
}
html body #wfls-login-modal a {
    color: #b30000 !important;
    text-decoration: underline;
}
html body #wfls-login-modal input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) {
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    background-color: #ffffff !important;
    border: 1px solid #8c8f94 !important;
}
html body #wfls-login-modal button {
    background-color: #e60000 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border: 0 !important;
    border-radius: 9999px !important;
    padding: 8px 22px !important;
    font-weight: 700;
    cursor: pointer;
}

/* 4. Wordfence 2FA code row that appears on the login form: keep labels/text readable on the dark page
      (inputs stay black-on-white via the existing rules). */
html body .tml [class*="wfls-"]:not(input):not(script):not(style),
html body .tml [id*="wfls-"]:not(input):not(script):not(style) {
    background-color: transparent !important;
    color: #fafafa !important;
}
html body .tml label[for*="wfls"] {
    color: #fafafa !important;
}

/* 5. Footer newsletter = Brevo plugin form [sibwp_form id=1] (2026-10-25, replaced Forminator 1523).
      The plugin prints its own light-theme form; on the dark footer: white labels, black-on-white
      fields, gold Subscribe pill, readable success/error message. */
html body .habit-newsletter form,
html body .habit-newsletter [class*="sib_signup_box_inside"] {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    color: #ffffff !important;
}
html body .habit-newsletter p {
    margin: 0 0 10px !important;
}
html body .habit-newsletter label {
    display: block;
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
}
html body .habit-newsletter input[type="email"],
html body .habit-newsletter input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background-color: #ffffff !important;
    color: #111111 !important;
    -webkit-text-fill-color: #111111 !important;
    caret-color: #111111 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
}
html body .habit-newsletter input::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
    -webkit-text-fill-color: rgba(0, 0, 0, 0.5) !important;
}
html body .habit-newsletter input[type="submit"],
html body .habit-newsletter button[type="submit"],
html body .habit-newsletter .sib-default-btn {
    background-color: #F8B010 !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    border: 0 !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    min-height: 40px;
    width: auto !important;
}
html body .habit-newsletter input[type="submit"]:hover,
html body .habit-newsletter button[type="submit"]:hover,
html body .habit-newsletter .sib-default-btn:hover {
    background-color: #ffc933 !important;
}
html body .habit-newsletter .sib_msg_disp,
html body .habit-newsletter .sib_msg_disp * {
    color: #ffffff !important;
    font-size: 0.85rem;
}

/* ===== Homepage design pass (2026-10-31) =====
   One button system: gold = the action, quiet = outline, live = red (only for LIVE).
   Tap targets 44px, body lines capped near 65 characters, visible focus. */
.hab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1.6rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    font-family: Oswald, Impact, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.hab-btn-primary { background: #F8B010; color: #000; }
.hab-btn-primary:hover { background: #ffc933; color: #000; }
.hab-btn-quiet { background: rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.hab-btn-quiet:hover { background: rgba(255, 255, 255, 0.12); border-color: #fff; color: #fff; }
.hab-btn-live { background: #D0121A; color: #fff; }
.hab-btn-live:hover { background: #e8222a; color: #fff; }

.hab-nav-register { gap: 0.4rem; color: #F8B010 !important; font-weight: 700 !important; }
.hab-nav-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #F8B010; flex: none; }

#intro p, #lessons p, #donate p { max-width: 65ch; }
#donate p { margin-left: auto; margin-right: auto; }

.hab-rc-btn, .rackemjoe-upcoming-button, #mobile-menu a, #masthead .btn-cta, #mobile-menu-toggle {
    min-height: 44px;
}
.hab-rc-btn, .rackemjoe-upcoming-button { display: inline-flex; align-items: center; justify-content: center; }
#mobile-menu a { display: flex; align-items: center; }
#mobile-menu-toggle { min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.site-footer a { display: inline-block; padding-block: 0.4rem; }
