/* Adaptive dark mode — follows the visitor's device setting.
   Linked from every page. Only applies when the OS/browser is in dark mode. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --gold-soft: #e3c37c;
    --muted: #b8b4a8;
  }

  body {
    background: #141414;
    color: #ececec;
  }

  /* Headings & titles */
  h1, h2, h3, h4,
  .sec-title, .sup-group,
  .mat-body h3, .sup-card h4,
  .cab-card h3, .sink-card h3 {
    color: #f5f5f5 !important;
  }

  /* Body text */
  p, li, td, th,
  .sec-sub, .sup-note, .sup-addr,
  .mat-body p, .cab-card p, .sink-card p,
  .sup-phone {
    color: #c9c9c9 !important;
  }
  .sup-addr, .mat-type { color: #d8d8d8 !important; }

  /* Cards & surfaces */
  .mat-card, .sup-card, .cab-card, .sink-card,
  .qcard, .contact-card, .appt-form,
  .faq-a, .edge-card, .calc-box {
    background: #1f1f1f !important;
    border-color: #383838 !important;
    color: #ececec;
  }

  /* Muted labels / badges on cream backgrounds */
  .mat-type {
    background: #3a3220 !important;
    color: #e8cf8f !important;
  }
  .sup-pop { color: #fff !important; }

  /* Form controls */
  input, select, textarea {
    background: #242424 !important;
    color: #f0f0f0 !important;
    border-color: #444 !important;
  }
  input::placeholder, textarea::placeholder { color: #888 !important; }
  label { color: #d5d5d5 !important; }

  /* Chips / filter pills */
  .chip {
    background: #242424 !important;
    border-color: #444 !important;
    color: #e0e0e0 !important;
  }
  .chip.active {
    background: #c8a24a !important;
    border-color: #c8a24a !important;
    color: #141414 !important;
  }

  /* FAQ chat */
  .chat-box { background: #1a1a1a !important; border-color: #383838 !important; }
  .msg-bot { background: #262626 !important; color: #ececec !important; }
  .msg-user { background: #c8a24a !important; color: #141414 !important; }
  .chat-input { background: #1f1f1f !important; border-color: #383838 !important; }

  /* Footer */
  footer, .footer { background: #0d0d0d !important; color: #aaa !important; }

  /* Gold accents stay gold */
  .btn-gold, .btn.btn-gold { background: #c8a24a !important; color: #141414 !important; }

  /* Important notice box */
  .notice-box {
    background: #2b2517 !important;
    border-color: #c8a24a !important;
    color: #f0e6c8 !important;
  }

  /* FAQ / care accordions */
  .faq-item {
    background: #1f1f1f !important;
    border-color: #383838 !important;
  }
  .faq-item summary {
    color: #f5f5f5 !important;
  }
  .faq-item summary:hover, .faq-item[open] summary {
    background: #2a2a2a !important;
  }
  .faq-item[open] summary { border-bottom-color: #383838 !important; }

  /* Hero / section subtitles */
  .mat-hero p, .sec-sub { color: #b8b4a8 !important; }

  /* Remnant size search */
  .size-search {
    background: #1f1f1f !important;
    border-color: #383838 !important;
  }
  .size-search h3 { color: #f5f5f5 !important; }
  .size-search > p, .size-form label { color: #c9c9c9 !important; }
  .size-msg { color: #e8cf8f !important; }
}
