/*
  Dark mode: the hand-made details (owner, 2026-10-13). Linked last and only active in dark mode
  (tools/site-pages.mjs THEME_SCRIPT). Every other dark colour comes from the dark twins that
  tools/dark-mode.mjs writes for each stylesheet at build time, so this file stays short: only what the
  colour rules cannot know (pictures, colours written inside the page's HTML, the browser's own parts).
  Rules: docs/style-guide.md "Dark mode".
*/

/* The browser's own parts (scroll bars, date pickers, autofill) in their dark style. */
:root { color-scheme: dark; }
html { background: #0f1419; }

/* The logo: the reversed wordmark (white "REPAIR", blue "LINKUP"), made for dark backgrounds. */
html:not(#rlu-a):not(#rlu-b) body img.repairlinkup-brand-wordmark:not(.repairlinkup-brand-wordmark-reversed) {
  content: url("brand/repairlinkup-logo-horizontal-reversed.png");
}

/* A facility without a photo shows its initials on a blue tile (Interested Facilities): light letters on it. */
html:not(#rlu-a):not(#rlu-b) body .owner-facility-row .owner-facility-photo > span { color: var(--rlu-ink) !important; }

/* A photo or logo on an initials tile keeps its white backing in dark mode (site-system.css section 20): logos are
   made for light backgrounds, and a see-through one would otherwise sit on the dark tile. */
html:not(#rlu-a):not(#rlu-b) body :is(.owner-facility-photo, .facility-profile-avatar, .conversation-avatar, .chat-shop-avatar, .facility-vehicle-thumb) img { background: #ffffff !important; }
/* The Saved Facilities card (#11151a in dark mode) and the "Mark completed" shop row (#175b75) too. */
html:not(#rlu-a):not(#rlu-b) body :is(.saved-facility-photo, .complete-repair-shop-avatar) img { background: #ffffff !important; }

/* New Repair Request, dark mode: the progress marks of steps not reached yet were about 1:1 against the strip (gone on
   a computer). A grey with at least 3:1 against every dark background (WCAG 1.4.11, non-text), at every width; the
   reached steps keep their light blue. tools/dark-mode.test.mjs checks the contrast. */
html:not(#rlu-a):not(#rlu-b) body #app .request-wizard-modal .steps i:not(.active) { background: #6b7785 !important; background-image: none !important; }

/* Notification switches (v16 review r2, 2026-11-01): the generated twin turned an OFF switch into a dark track with a
   dark knob on the dark panel (about 1:1), so Monthly Report, once off, looked like empty space. OFF: a grey track with a
   ring and a light knob; ON: a lighter teal track with the light knob. The ring, the knob and the ON track each keep at
   least 3:1 against the dark backgrounds, and the knob against its track (WCAG 1.4.11); tools/dark-mode.test.mjs. */
html:not(#rlu-a):not(#rlu-b) body .notification-pref-row i { background: #3b4652 !important; box-shadow: inset 0 0 0 1px #6f7e8b !important; }
html:not(#rlu-a):not(#rlu-b) body .notification-pref-row i:after { background: #e6ebef !important; }
html:not(#rlu-a):not(#rlu-b) body .notification-pref-row input:checked + i { background: #2a7fa3 !important; box-shadow: none !important; }

/* The updated-Terms dialog writes its colours in its HTML (app-v794.js repairLinkUpReacceptanceDialogHtml). */
html:not(#rlu-a):not(#rlu-b) body [aria-labelledby="rluTermsReacceptTitle"] { background: var(--rlu-surface) !important; color: var(--rlu-ink) !important; }
html:not(#rlu-a):not(#rlu-b) body [aria-labelledby="rluTermsReacceptTitle"] a { color: var(--rlu-blue-ink) !important; }
html:not(#rlu-a):not(#rlu-b) body #rluTermsReacceptError { color: var(--rlu-danger) !important; }

/* The owner's light-look rule (styles-v794.css, end): these parts were light-look fixes only, so the dark look stays
   exactly as it was (near-black photo boxes and the photo's letterbox, with their light words, the dark "N / 5 photos" chip, the dark Replace). */
html:not(#rlu-a):not(#rlu-b) body #app :is(.vehicle-upload-preview, .standalone-photo-preview) { background: #07111f !important; box-shadow: none !important; }
html:not(#rlu-a):not(#rlu-b) body #app :is(.vehicle-upload-preview, .standalone-photo-preview) img { background: #07111f !important; }
html:not(#rlu-a):not(#rlu-b) body #app .vehicle-upload-placeholder, html:not(#rlu-a):not(#rlu-b) body #app .vehicle-upload-placeholder span { color: #c4ccd6 !important; }
html:not(#rlu-a):not(#rlu-b) body #app .vehicle-upload-placeholder small { color: #c4ccd6 !important; }
html:not(#rlu-a):not(#rlu-b) body #app .owner-request-photo > span { background: rgba(7, 17, 31, .82) !important; color: #ffffff !important; box-shadow: none !important; }
html:not(#rlu-a):not(#rlu-b) body #app .photo-manager-item .photo-replace { background: rgba(7, 17, 31, .86) !important; color: #ffffff !important; }
html:not(#rlu-a):not(#rlu-b) body #app .photo-manager-item .photo-replace:hover { background: rgba(7, 17, 31, .86) !important; }