/* Z3 color and design changes for the search pages of all three sites (Troy approved all z3 items, Nov 25, 2026).
   Loads last on every search page, after the theme, app.css, mobile-fixes.css and the site header, so it can be
   merged or removed as one file. Each block is numbered like the z3 review list. No other file holds these rules.
   Site scoping: html[data-theme="nwrs|pvh|tdh"] is set in app/pages/layout.php. */

/* ---------- Site colors used below ---------- */
html[data-theme="nwrs"] {
  /* #2 NWRS: one steel blue for main buttons and labels, the same blue as the NWRS site (white text 5.2 to 1) */
  --accent: #1F6FB8;
  --brand-2: #1F6FB8;
  --z3-tint: #EAF1F9;          /* light steel tint (steel text on it 4.6 to 1) */
  --z3-tint-ink: #195C99;      /* darker steel for small text on the tint (6.1 to 1) */
  /* #11 payment chart from the NWRS palette */
  --pay-ins: #8FB3DD;
  --pay-mi: #B8C7DA;
}
html[data-theme="pvh"] {
  /* PVH Dress Blues (option C): navy #0B3B78, flag red #B31942 */
  --z3-tint: #EEF2F7;
  --z3-tint-ink: #0B3B78;
  --pay-ins: #8FA6C4;
  --pay-mi: #C9B48A;
}
html[data-theme="tdh"] {
  /* TDH harbor slate #3B566C (the TDH site's button color), stone washes */
  --z3-tint: #EBEEF0;
  --z3-tint-ink: #3B566C;
  --pay-ins: #A9B4BC;
  --pay-mi: #C8BFAE;
}

/* ---------- #1 Map bubbles: white with a status-colored ring ---------- */
.cluster.cl-active, .cluster.cl-bumpable, .cluster.cl-pending, .cluster.cl-sold {
  background: #fff; color: var(--brand); font-weight: 800; border: 0;
  box-shadow: inset 0 0 0 3px var(--z3-ring, var(--brand)), 0 1px 5px rgba(0, 0, 0, .28);
}
.cluster.cl-active   { --z3-ring: var(--st-active); }
.cluster.cl-bumpable { --z3-ring: var(--st-bumpable); }
.cluster.cl-pending  { --z3-ring: var(--st-pending); }
.cluster.cl-sold     { --z3-ring: var(--st-sold); }

/* ---------- #2 NWRS steel blue: tints that were teal ---------- */
html[data-theme="nwrs"] .hl-chips .hl { background: var(--z3-tint); color: var(--z3-tint-ink); }
html[data-theme="nwrs"] .day[aria-checked="true"] { background: var(--z3-tint); }
html[data-theme="nwrs"] .day[aria-checked="true"] small { color: var(--z3-tint-ink); }

/* ---------- #4 Keyboard focus ring: two-tone (white inside, the site's dark color outside) ---------- */
:is(a, button, input, select, textarea, summary, [tabindex], [role="button"]):focus-visible {
  outline: 2px solid transparent !important;   /* stays visible in Windows high contrast mode */
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus, var(--brand)) !important;
}
.seg label input:focus-visible + span, .seg-pick input:focus-visible + span, .pcs-seg input:focus-visible + span,
.freq-opt:focus-visible, .pd-tab:focus-visible {
  outline: 2px solid transparent; box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--focus, var(--brand));
}

/* ---------- #5 Badges: solid color for status only, white pills for events (open houses) ---------- */
.badge.oh {
  background: #fff; color: var(--brand); font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  display: inline-flex; align-items: center; gap: 6px;
}
.badge.oh::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }

/* ---------- #6 Form errors: a clear box with a mark, not just red words ---------- */
.form-error:not([hidden]) {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; color: #1B2433; font-weight: 600; line-height: 1.45;
  border: 1px solid #E3E8EF; border-left: 4px solid #B42318; border-radius: 8px;
  padding: 10px 12px; margin: 8px 0;
}
.form-error:not([hidden])::before {
  content: "!"; flex: none; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%; background: #B42318; color: #fff;
  font-weight: 800; font-size: 13px; line-height: 1;
}
.form-error:empty { display: none; }
input:has(+ .form-error:not([hidden]):not(:empty)) { border-color: #B42318; }

/* ---------- #7 TDH search: harbor slate buttons, no teal or red leftovers ---------- */
html[data-theme="tdh"] .btn-primary { background: #3B566C; border-color: #3B566C; color: #fff; }
html[data-theme="tdh"] .btn-primary:hover { background: #2F475A; border-color: #2F475A; }
html[data-theme="tdh"] .day[aria-checked="true"] { background: var(--z3-tint); border-color: #3B566C; box-shadow: inset 0 0 0 1px #3B566C; }
html[data-theme="tdh"] .day[aria-checked="true"] small { color: #3B566C; }
html[data-theme="tdh"] .hl-chips .hl { background: var(--z3-tint); color: var(--z3-tint-ink); }
html[data-theme="tdh"] .heart,
html[data-theme="tdh"] .side-card .heart-wide,
html[data-theme="tdh"] .pop-card .row .heart { color: #3B566C; }
html[data-theme="tdh"] .heart[aria-pressed="true"],
html[data-theme="tdh"] .side-card .heart-wide[aria-pressed="true"],
html[data-theme="tdh"] .l-actions .heart[aria-pressed="true"] { background: #3B566C; color: #fff; }

/* #10 PVH gray text: the search side already uses #4A5A6E (6.9 to 1); the fix is on the PVH site pages only. */

/* ---------- #11 Payment chart colors: read by listing-more.js from --pay-ins and --pay-mi ---------- */
