/*
 * Shared member-facing components for Member Hub and Event Management forms
 * (owner decision, September 30, 2026: extend the Community styles into one set,
 * colored with the NWMET canonical blue and green defined on :root below).
 * Wrap a form or section in `nwmh-ui` (Community pages use `nwmh-community`) and use:
 *   buttons   nwmh-button + --primary | --secondary | --quiet | --danger
 *   fields    nwmh-field (label above control), nwmh-help (help text)
 *   required  nwmh-required marker after the label text; nwmh-required-legend once per form.
 *             Mark required fields only on forms that also have optional fields.
 *   notices   nwmh-notice + --success (role="status") | --error (role="alert")
 * Helpers: member-hub/includes/member-ui.php. Checklist: event-management/GUI-CONSISTENCY-TODO.md.
 */
/* NWMET canonical colors (owner, September 30, 2026): blue is the brand accent, green marks positive states. */
:root{--nwmet-blue:#30526b;--nwmet-blue-dark:#243f53;--nwmet-blue-soft:#e8eef2;--nwmet-blue-focus:rgba(48,82,107,.35);--nwmet-green:#2d602f;--nwmet-green-soft:#eaf1ea}
.nwmh-ui,.nwmh-community{--nwmh-accent:var(--nwmet-blue);--nwmh-accent-soft:var(--nwmet-blue-soft);--nwmh-border:#d8d4ce;--nwmh-soft:#f7f5f2;--nwmh-text:#262421;--nwmh-muted:#5b5752;--nwmh-success:var(--nwmet-green);--nwmh-error:#b3261e;--nwmh-focus:var(--nwmet-blue-focus)}
.nwmh-ui *{box-sizing:border-box}
.nwmh-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
:is(.nwmh-ui,.nwmh-community) :is(.nwmh-help,.description){color:var(--nwmh-muted)}
:is(.nwmh-ui,.nwmh-community) .nwmh-help{display:block;margin:.3em 0 0!important;color:var(--nwmh-muted);font-size:.9em}
:is(.nwmh-ui,.nwmh-community) :is(a,button,summary,input,select,textarea):focus-visible{outline:3px solid var(--nwmh-focus);outline-offset:2px}

/* Buttons: neutralize theme button styling (uppercase, shadows). */
:is(.nwmh-ui,.nwmh-community) .nwmh-button,:is(.nwmh-ui,.nwmh-community) .nwmh-link-button{display:inline-flex;align-items:center;justify-content:center;gap:.4em;min-height:44px;margin:0;padding:.6em 1.05em;border:1px solid var(--nwmh-accent);border-radius:6px;box-shadow:none!important;font:inherit;font-size:1em;font-weight:700;letter-spacing:normal;line-height:1.2;text-transform:none;text-decoration:none;white-space:nowrap;cursor:pointer;transition:filter .15s,background-color .15s}
:is(.nwmh-ui,.nwmh-community) .nwmh-button--primary{background:var(--nwmh-accent);color:#fff!important}
:is(.nwmh-ui,.nwmh-community) .nwmh-button--secondary{background:#fff;color:var(--nwmh-accent)!important}
:is(.nwmh-ui,.nwmh-community) .nwmh-button--quiet{border-color:transparent;background:transparent;color:var(--nwmh-muted)!important}
:is(.nwmh-ui,.nwmh-community) .nwmh-button--danger{border-color:var(--nwmh-error);background:var(--nwmh-error);color:#fff!important}
:is(.nwmh-ui,.nwmh-community) .nwmh-button:hover:not(:disabled){filter:brightness(.93)}
:is(.nwmh-ui,.nwmh-community) .nwmh-button--quiet:hover{background:var(--nwmh-soft)}
:is(.nwmh-ui,.nwmh-community) .nwmh-button:disabled{border-color:#c9c4bd;background:#e9e6e2;color:#6f6a64!important;cursor:not-allowed;filter:none}
:is(.nwmh-ui,.nwmh-community) .nwmh-link-button{min-height:36px;padding:.3em .2em;border:0;background:transparent;color:var(--nwmh-accent);font-size:.92em;font-weight:600;text-decoration:underline;text-underline-offset:3px}
:is(.nwmh-ui,.nwmh-community) .nwmh-link-button:hover{background:transparent;text-decoration-thickness:2px}
.nwmh-actions{display:flex;flex-wrap:wrap;align-items:center;gap:.75em;margin:1em 0 0}

/* Form controls: replace the theme's underline-only inputs with visible fields. */
:is(.nwmh-ui,.nwmh-community) :is(input[type=text],input[type=email],input[type=password],input[type=url],input[type=tel],input[type=search],input[type=number],input[type=date],input:not([type]),select,textarea){display:block;width:100%;max-width:100%;min-height:44px;margin:0;padding:.6em .75em;border:1px solid #8f8a84;border-radius:6px;background:#fff;box-shadow:none;color:var(--nwmh-text);font:inherit;font-size:1em;line-height:1.4}
:is(.nwmh-ui,.nwmh-community) textarea{min-height:96px;resize:vertical}
:is(.nwmh-ui,.nwmh-community) :is(input,select,textarea):focus{border-color:var(--nwmh-accent);background-image:none}
:is(.nwmh-ui,.nwmh-community) input[type=checkbox],:is(.nwmh-ui,.nwmh-community) input[type=radio]{accent-color:var(--nwmh-accent)}
:is(.nwmh-ui,.nwmh-community) label{color:var(--nwmh-text)}
.nwmh-field{margin:0 0 1.15em}
.nwmh-field>label{display:block;margin-bottom:.4em;font-weight:700}

/* Required fields */
.nwmh-required{margin-left:.15em;color:var(--nwmh-error,#b3261e);font-weight:700}
.nwmh-required-legend{margin:0 0 1em!important;color:var(--nwmh-muted,#5b5752);font-size:.9em}

/* Notices: role="status" for success, role="alert" for errors. */
.nwmh-notice{margin:0 0 1.25em;padding:.85em 1em;border-left:4px solid var(--nwmh-success,#2d602f);border-radius:4px;background:var(--nwmet-green-soft,#eaf1ea);color:var(--nwmh-text,#262421)}
.nwmh-notice--error{border-left-color:var(--nwmh-error,#b3261e);background:#fdeeed}
.nwmh-notice p{margin:0!important;font-weight:600}
.nwmh-notice p+p,.nwmh-notice ul{margin-top:.4em!important}
