/* ==========================================================================
   HomePezzo — account & authentication messages (SO9, v0.1.181)
   --------------------------------------------------------------------------
   ONE presentation for every message state observed on the account and
   authentication surfaces. Each state below was seen rendering live before
   this file was written; nothing is styled speculatively:

     alert-danger   "Error: The password you entered for the username … is
                     incorrect. Lost your password?"   (/login/, bad password)
     alert-info     "No invoices found."               (/account/?type=gp-invoices)
     alert-success  UsersWP account-update confirmation
     alert-warning  UsersWP / GetPaid warning notices

   SCOPE. Deliberately limited to the auth pages, the account page and the
   UsersWP profile page by body class. GeoDirectory's own `.alert` on the
   directory surfaces is NOT touched — the v0.1.178 empty-results panel on
   `/places/` and `/vendors/` owns that styling and is verified unchanged.

   WHAT IS PRESERVED. The message TEXT, its `role`, `aria-live`, any native
   icon, and every link inside it are untouched. Nothing here hides a message,
   converts a server-rendered message into a JavaScript notice, or changes
   which element receives focus. Colour is not the only signal: each state
   keeps its native wording and is additionally distinguished by a left rule,
   so the four states remain tellable apart without colour perception.
   ========================================================================== */

body.hp-auth-page .bsui .alert,
body.uwp_account_page .bsui .alert,
body.uwp_profile_page .bsui .alert {
    padding:       14px 16px;
    border:        1px solid var(--hp-line, #E0DCD2);
    border-left:   4px solid var(--hp-ink-muted, #565D69);
    border-radius: 8px;
    font-size:     14px;
    line-height:   1.55;
    /* A long server message must wrap inside the panel, never widen it. */
    overflow-wrap: anywhere;
}

/* Links inside a message stay visible and clickable — GD/AUI otherwise
   inherits the alert's own text colour, which can leave a link reading as
   plain text inside a coloured band. */
body.hp-auth-page .bsui .alert a,
body.uwp_account_page .bsui .alert a,
body.uwp_profile_page .bsui .alert a {
    color:                 inherit;
    font-weight:           600;
    text-decoration:       underline;
    text-underline-offset: 2px;
}

/* Native AUI icons (e.g. the info-circle GetPaid prints) are kept, just
   aligned with the first line of text instead of floating. */
body.hp-auth-page .bsui .alert > i,
body.uwp_account_page .bsui .alert > i,
body.uwp_profile_page .bsui .alert > i {
    margin-right: 8px;
}

/* ── The four states ────────────────────────────────────────────────────
   AUI ships each of these with its own `!important`-free background/colour,
   but at higher specificity than a single class in some builds, so the state
   rules below are written at the same body-scoped specificity as the base
   rule above and land after it in source order. */

body.hp-auth-page .bsui .alert-success,
body.uwp_account_page .bsui .alert-success,
body.uwp_profile_page .bsui .alert-success {
    background-color: var(--hp-success-soft, #E7F3EC);
    border-color:     var(--hp-success-line, #A8CDB8);
    border-left-color: var(--hp-success-text, #146C43);
    color:            var(--hp-success-text, #146C43);
}

body.hp-auth-page .bsui .alert-danger,
body.uwp_account_page .bsui .alert-danger,
body.uwp_profile_page .bsui .alert-danger {
    background-color: var(--hp-danger-soft, #FBECEA);
    border-color:     var(--hp-danger-line, #E7B4AE);
    border-left-color: var(--hp-danger-text, #B42318);
    color:            var(--hp-danger-text, #B42318);
}

body.hp-auth-page .bsui .alert-warning,
body.uwp_account_page .bsui .alert-warning,
body.uwp_profile_page .bsui .alert-warning {
    background-color: var(--hp-warning-soft, #FBF2E0);
    border-color:     var(--hp-warning-line, #E0C88A);
    border-left-color: var(--hp-warning-text, #8A5A00);
    color:            var(--hp-warning-text, #8A5A00);
}

body.hp-auth-page .bsui .alert-info,
body.uwp_account_page .bsui .alert-info,
body.uwp_profile_page .bsui .alert-info {
    background-color: var(--hp-info-soft, #E8EEF6);
    border-color:     var(--hp-info-line, #B6C6DD);
    border-left-color: var(--hp-info-text, #2A5086);
    color:            var(--hp-info-text, #2A5086);
}

/* ── Field-level validation ──────────────────────────────────────────────
   Bootstrap's own `.is-invalid` / `.invalid-feedback` pair, which UsersWP
   uses via AUI's `validation_text`. Presentation only — the message itself,
   and when it appears, stay native. */

body.hp-auth-page .bsui .form-control.is-invalid,
body.uwp_account_page .bsui .form-control.is-invalid {
    border-color: var(--hp-danger-text, #B42318);
}

body.hp-auth-page .bsui .invalid-feedback,
body.uwp_account_page .bsui .invalid-feedback {
    margin-top:  6px;
    font-size:   13px;
    font-weight: 500;
    color:       var(--hp-danger-text, #B42318);
}

/* ── Message spacing inside an auth card ────────────────────────────────
   UsersWP prints notices immediately above the form inside .card-body. */

body.hp-auth-page .bsui .card-body > .alert,
body.hp-auth-page .bsui .uwp_page > .alert {
    margin-bottom: 20px;
}
