/*
 * Public site - light / dark theme, the hand-written part (owner, 2026-11-16: "our dark theme on the whole site").
 * Most of dark mode is the colour tokens remapped (hlr-site-dark.gen.css, generated by tools/theme/gen-site-dark.py
 * from hlr-site-tokens.css). This file holds what tokens cannot reach: the page itself, Bootstrap's and the form
 * plugins' own colours, the logos, and the sun / moon button (which shows in light mode too).
 * Same REALM palette as the dashboard (hlr-panel-dark.css):
 *   page #171b24 · surface #1f2530 · raised #262d37 · field #13171f · border #363c42
 *   text #e8e8e8 / #b8c0c8 / muted #8f979f · accent blue #62a8f8.
 * Everything is under html[data-hlr-theme="dark"], set before paint (inc/panel-theme.php). Checked by
 * tools/tests/site-theme-test.js (WCAG contrast of every visible text on the public pages).
 */

/* ── The theme button (template-parts/components/theme-toggle.php) - light and dark ───────────────────────────────
 * ONE button, three states (owner, 2026-11-16): the icon says the current mode - half circle = following the device
 * (the default), sun = light chosen, moon = dark chosen. Picked by CSS from <html data-hlr-theme-mode> (set before paint).
 * Header spacing (owner, 2026-11-16: "the search icon's spacing from left and right isn't equal"): on the phone header
 * (#sticker-mobile, up to 1400px) the theme button, the search box and Sign In / the avatar are one row with ONE gap. */
.hlr-theme-btns { display: flex; align-items: center; margin: 0 6px; }
.hlr-theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0;
    border: 0; border-radius: 50%; background: transparent; color: var(--ink, #151a21); font-size: 17px; cursor: pointer; line-height: 1; }
.hlr-theme-btn:hover { background: rgba(21, 26, 33, .07); }
.hlr-theme-btn:focus-visible { outline: 3px solid var(--gold, #fec20f); outline-offset: 1px; }
.hlr-theme-btn i { display: none; }
/* One simple switch (owner, 2026-11-16: "doesn't need to be 3, make it simple"): moon on the light theme (click: dark),
   sun on the dark theme (click: light). Until the person clicks, the theme follows the device (inc/panel-theme.php). */
html:not([data-hlr-theme="dark"]) .hlr-theme-btn .hlr-theme-i-dark,
html[data-hlr-theme="dark"] .hlr-theme-btn .hlr-theme-i-light { display: inline-block; }
html[data-hlr-theme="dark"] .hlr-theme-btn { color: #e8e8e8; }
html[data-hlr-theme="dark"] .hlr-theme-btn .hlr-theme-i-light, html[data-hlr-theme="dark"] .hlr-theme-btn .hlr-theme-i-dark { color: #f3c97a; }
html[data-hlr-theme="dark"] .hlr-theme-btn:hover { background: rgba(255, 255, 255, .08); }
/* phone header: theme tile | search tile | Sign In or avatar, the same 8px between each; both icon tiles 32 x 32 with the
   glyph centred, so the gaps you see are the gaps measured (tools/tests/site-theme-test.js 3i) */
#sticker-mobile .wrap-right-menu { gap: 8px; }
#sticker-mobile .hlr-theme-btns { margin: 0; }
#sticker-mobile .wrap-profile { gap: 8px; }
#sticker-mobile .hlr-theme-btn, #sticker-mobile a.icon-search { width: 32px; height: 32px; margin: 0; padding: 0; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 16px; line-height: 1; }
#sticker-mobile .hlr-theme-btn { background: var(--bg-gray-97-2); }
#sticker-mobile a.icon-search i { line-height: 1; }
#sticker-mobile .btn-signin { white-space: nowrap; }

/* ── The page ─────────────────────────────────────────────────────────────────────────────────────────────────── */
html[data-hlr-theme="dark"] { background: #171b24; }
html[data-hlr-theme="dark"] body { background-color: #171b24; color: #e8e8e8; }
/* style.css writes some text as rgba(var(--text-color), a): the ink triplet, light in dark mode */
html[data-hlr-theme="dark"] { --text-color: 232, 232, 232; }
html[data-hlr-theme="dark"] hr { border-color: #363c42; }
html[data-hlr-theme="dark"] ::placeholder { color: #8f979f; opacity: 1; }

/* Logos: the light-lettering versions (as the dashboard does with hlriq-logo-dark) */
html[data-hlr-theme="dark"] .site-logo img,
html[data-hlr-theme="dark"] .side-logo img { content: url("../images/logo-on-dark.png"); }   /* .side-logo: the phone menu's drawer (2026-11-16: dark lettering on the dark drawer) */
html[data-hlr-theme="dark"] #hlriLogo { content: url("../images/hlriq/hlriq-logo-dark.png"); }

/* ── Bootstrap 4's own colours ───────────────────────────────────────────────────────────────────────────────────── */
html[data-hlr-theme="dark"] .bg-white { background-color: #1f2530 !important; }
html[data-hlr-theme="dark"] .bg-light { background-color: #262d37 !important; }
html[data-hlr-theme="dark"] .text-dark, html[data-hlr-theme="dark"] .text-body, html[data-hlr-theme="dark"] .text-black-50 { color: #e8e8e8 !important; }
html[data-hlr-theme="dark"] .text-muted, html[data-hlr-theme="dark"] .text-secondary { color: #b8c0c8 !important; }
html[data-hlr-theme="dark"] .text-primary { color: #62a8f8 !important; }
html[data-hlr-theme="dark"] .border, html[data-hlr-theme="dark"] .border-top, html[data-hlr-theme="dark"] .border-bottom,
html[data-hlr-theme="dark"] .border-left, html[data-hlr-theme="dark"] .border-right { border-color: #363c42 !important; }
html[data-hlr-theme="dark"] .card { background-color: #1f2530; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .card-header, html[data-hlr-theme="dark"] .card-footer { background-color: #262d37; border-color: #363c42; }
html[data-hlr-theme="dark"] .modal-content { background-color: #1f2530; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .modal-header, html[data-hlr-theme="dark"] .modal-footer { border-color: #363c42; }
html[data-hlr-theme="dark"] .modal-backdrop.show { opacity: .7; }
html[data-hlr-theme="dark"] .close { color: #e8e8e8; text-shadow: none; opacity: .8; }
html[data-hlr-theme="dark"] .close:hover { color: #ffffff; opacity: 1; }
html[data-hlr-theme="dark"] .form-control, html[data-hlr-theme="dark"] .custom-select,
html[data-hlr-theme="dark"] input[type="text"], html[data-hlr-theme="dark"] input[type="email"], html[data-hlr-theme="dark"] input[type="tel"],
html[data-hlr-theme="dark"] input[type="search"], html[data-hlr-theme="dark"] input[type="number"], html[data-hlr-theme="dark"] input[type="password"],
html[data-hlr-theme="dark"] input[type="url"], html[data-hlr-theme="dark"] input[type="date"], html[data-hlr-theme="dark"] select,
html[data-hlr-theme="dark"] textarea { background-color: #13171f; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .form-control:focus { background-color: #13171f; border-color: #62a8f8; color: #e8e8e8; box-shadow: 0 0 0 .2rem rgba(98, 168, 248, .25); }
html[data-hlr-theme="dark"] .form-control:disabled, html[data-hlr-theme="dark"] .form-control[readonly] { background-color: #262d37; }
html[data-hlr-theme="dark"] .input-group-text { background-color: #262d37; border-color: #363c42; color: #b8c0c8; }
html[data-hlr-theme="dark"] .dropdown-menu { background-color: #262d37; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .dropdown-item { color: #e8e8e8; }
html[data-hlr-theme="dark"] .dropdown-item:hover, html[data-hlr-theme="dark"] .dropdown-item:focus { background-color: #2f3742; color: #ffffff; }
html[data-hlr-theme="dark"] .dropdown-divider { border-color: #363c42; }
html[data-hlr-theme="dark"] .table { color: #e8e8e8; }
html[data-hlr-theme="dark"] .table th, html[data-hlr-theme="dark"] .table td, html[data-hlr-theme="dark"] .table thead th { border-color: #363c42; }
html[data-hlr-theme="dark"] .table-striped tbody tr:nth-of-type(odd) { background-color: rgba(255, 255, 255, .03); }
html[data-hlr-theme="dark"] .table-hover tbody tr:hover { background-color: rgba(255, 255, 255, .05); color: #e8e8e8; }
html[data-hlr-theme="dark"] .list-group-item { background-color: #1f2530; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .nav-tabs { border-color: #363c42; }
html[data-hlr-theme="dark"] .nav-tabs .nav-link.active { background-color: #1f2530; border-color: #363c42 #363c42 #1f2530; color: #e8e8e8; }
html[data-hlr-theme="dark"] .page-link { background-color: #1f2530; border-color: #363c42; color: #62a8f8; }
html[data-hlr-theme="dark"] .page-item.disabled .page-link { background-color: #1f2530; border-color: #363c42; color: #8f979f; }
html[data-hlr-theme="dark"] .btn-light { background-color: #262d37; border-color: #363c42; color: #e8e8e8; }
html[data-hlr-theme="dark"] .btn-outline-dark, html[data-hlr-theme="dark"] .btn-outline-secondary { color: #e8e8e8; border-color: #4a5159; }
html[data-hlr-theme="dark"] .badge-light { background-color: #262d37; color: #e8e8e8; }
html[data-hlr-theme="dark"] .popover { background-color: #262d37; border-color: #363c42; }
html[data-hlr-theme="dark"] .popover-body { color: #e8e8e8; }
html[data-hlr-theme="dark"] .breadcrumb { background-color: #1f2530; }
html[data-hlr-theme="dark"] .alert-light { background-color: #262d37; border-color: #363c42; color: #e8e8e8; }

/* ── Leaflet maps on the site's pages (the listing page's map; the map app has its own rules, more specific) ──── */
html[data-hlr-theme="dark"] .leaflet-container { background: #1b2028; }
html[data-hlr-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.75); }
html[data-hlr-theme="dark"] .leaflet-bar a { background-color: #262d37; color: #e8e8e8; border-bottom-color: #363c42; }
html[data-hlr-theme="dark"] .leaflet-bar a:hover { background-color: #2f3742; }
html[data-hlr-theme="dark"] .leaflet-control-attribution { background: rgba(23, 27, 36, .82) !important; color: #b8c0c8; }
html[data-hlr-theme="dark"] .leaflet-control-attribution a { color: #62a8f8; }
html[data-hlr-theme="dark"] .leaflet-popup-content-wrapper, html[data-hlr-theme="dark"] .leaflet-popup-tip { background: #1f2530; color: #e8e8e8; }

/* ── Contact Form 7 and its add-ons (plugin stylesheets) ───────────────────────────────────────────────────────── */
html[data-hlr-theme="dark"] .wpcf7 label, html[data-hlr-theme="dark"] .uacf7-form-wrapper label { color: #e8e8e8; }
html[data-hlr-theme="dark"] .wpcf7-not-valid-tip { color: #f8b0b0; }
html[data-hlr-theme="dark"] .wpcf7 form .wpcf7-response-output { color: #e8e8e8; }
html[data-hlr-theme="dark"] .wpo365-mssignin-button { background-color: #262d37 !important; border-color: #363c42 !important; }
html[data-hlr-theme="dark"] .wpo365-mssignin-button * { color: #e8e8e8 !important; }
html[data-hlr-theme="dark"] .swal2-popup { background: #1f2530; color: #e8e8e8; }
html[data-hlr-theme="dark"] .swal2-title, html[data-hlr-theme="dark"] .swal2-html-container { color: #e8e8e8; }

/* The "Photo unavailable" picture assets/js/script.js puts in place of a failed listing photo (img[data-hlr-ph]) is
   light grey; in dark it is shown inverted, so it reads as a dark box with a light outline (2026-11-16). */
html[data-hlr-theme="dark"] img[data-hlr-ph] { filter: invert(.9) hue-rotate(180deg); }

/* ── Owner's review 2026-11-16 ─────────────────────────────────────────────────────────────────────────────────────── */
/* Page title banner (blog, archives): the fade under the title goes into the page colour, not a grey band. */
html[data-hlr-theme="dark"] .page-header { border-image: fill 0 linear-gradient(0deg, #171b24 40%, rgba(23, 27, 36, 0) 100%); }

/* "No image" pictures (posts without a picture: posts-default-img.png; old placeholders): shown inverted, so a dark
   box with light lines instead of a bright white card. */
html[data-hlr-theme="dark"] img[src*="posts-default-img"],
html[data-hlr-theme="dark"] img[src*="No-Image-Placeholder"],
html[data-hlr-theme="dark"] img[src*="noimage"] { filter: invert(.88) hue-rotate(180deg); }

/* Project pages: "Last Update" on the gold badge in dark ink (the light grey text-muted could not be read). */
html[data-hlr-theme="dark"] .update-label { color: #151a21 !important; }

/* Project logos are often transparent PNGs with dark lettering: a white plate behind them in dark. */
html[data-hlr-theme="dark"] .project-logo-top,
html[data-hlr-theme="dark"] .properties-card_logo { background: #fff; padding: 6px 10px; border-radius: 6px; }

/* "Register below to secure your unit" (style.css .hlr-reg-cta): a dark button with light text; gold on hover. */
html[data-hlr-theme="dark"] .hlr-reg-cta { background-color: #262d37; border-color: #4a5159; color: #e8e8e8; }
html[data-hlr-theme="dark"] .hlr-reg-cta:hover,
html[data-hlr-theme="dark"] .hlr-reg-cta:focus-visible { background-color: #fec20f; border-color: #fec20f; color: #151a21; }

/* The register form on project pages: was a rust-brown panel (the light theme's orange, darkened). Dark: a raised
   panel, dark fields, gold accents. */
html[data-hlr-theme="dark"] .hlri-contact-form,
html[data-hlr-theme="dark"] .hlri-contact-form:before { background-color: #262d37; }
html[data-hlr-theme="dark"] .hlri-contact-form:before { border-color: #363c42; }
html[data-hlr-theme="dark"] .hlri-circle { background: linear-gradient(135deg, transparent 30%, rgba(254, 194, 15, .07)); }
html[data-hlr-theme="dark"] .hlri-title { color: #e8e8e8; }
html[data-hlr-theme="dark"] input.hlri-input,
html[data-hlr-theme="dark"] textarea.hlri-input { background: #13171f; border-color: #4a5159; color: #e8e8e8; }
html[data-hlr-theme="dark"] input.hlri-input:focus,
html[data-hlr-theme="dark"] textarea.hlri-input:focus { border-color: #fec20f; }
html[data-hlr-theme="dark"] .hlri-input-container label { color: #b8c0c8; }
html[data-hlr-theme="dark"] .hlri-input-container span:before,
html[data-hlr-theme="dark"] .hlri-input-container span:after,
html[data-hlr-theme="dark"] .hlri-input-container.focus label { background: #262d37; }
html[data-hlr-theme="dark"] .hlri-input-container.focus label { color: #fec20f; }
html[data-hlr-theme="dark"] .hlri-contact-form .wpcf7-list-item-label { background: transparent; color: #e8e8e8; }
html[data-hlr-theme="dark"] .hlri-contact-form input[type="radio"] { accent-color: #fec20f; }
/* The register form beside a floor plan (single-floorplans.php, .hlr-fp-register): was the light theme's bright orange
   with near-black fields. Dark: the same raised panel, dark fields and gold accents as the project page's form. The
   "Are you a realtor?" group (style.css div.hlri-input): light text, gold radios and focus ring, no box. */
html[data-hlr-theme="dark"] .hlr-fp-register { background-color: #262d37; box-shadow: inset 0 0 0 1px #363c42; }
html[data-hlr-theme="dark"] .hlr-fp-register h3 { color: #e8e8e8 !important; }
html[data-hlr-theme="dark"] div.hlri-input,
html[data-hlr-theme="dark"] .hlr-fp-register div.hlri-input { color: #e8e8e8; }
html[data-hlr-theme="dark"] div.hlri-input input[type="radio"],
html[data-hlr-theme="dark"] .hlr-fp-register div.hlri-input input[type="radio"] { accent-color: #fec20f; }
html[data-hlr-theme="dark"] div.hlri-input input[type="radio"]:focus-visible { outline-color: #fec20f; }

/* Property management page (page-property-management.php): its own palette (ink on paper) turned for dark. Brass stays. */
html[data-hlr-theme="dark"] .pm { --ink: #e8e8e8; --paper: #171b24; --slate: #b8c0c8; --line: #363c42; }
html[data-hlr-theme="dark"] .pm-btn { background: #fec20f; border-color: #fec20f; color: #151a21; }
html[data-hlr-theme="dark"] .pm-btn:hover, html[data-hlr-theme="dark"] .pm-btn:focus-visible { background: #e6c87f; border-color: #e6c87f; color: #151a21; }
html[data-hlr-theme="dark"] .pm-btn--ghost { background: transparent; border-color: #b8c0c8; color: #e8e8e8; }
html[data-hlr-theme="dark"] .pm-btn--ghost:hover, html[data-hlr-theme="dark"] .pm-btn--ghost:focus-visible { background: #262d37; border-color: #e8e8e8; color: #e8e8e8; }
html[data-hlr-theme="dark"] .pm-board-section, html[data-hlr-theme="dark"] .pm-enquire { background: #11151c; }
html[data-hlr-theme="dark"] .hlri-contact-info:before { border-color: #fec20f; opacity: .08; }   /* the ring decoration: faint gold, not rust */
