/* Semantic colors shared by the workspace, public summary, and screen report. */
:root {
  color-scheme: light;
  --theme-canvas: #f3f6f7;
  --theme-surface: #ffffff;
  --theme-raised: #e8eff2;
  --theme-input: #ffffff;
  --theme-line: #cbd7dd;
  --theme-control-line: #7b8f9a;
  --theme-text: #172b3a;
  --theme-muted: #4e6573;
  --theme-link: #245670;
  --theme-focus: #0c6f9a;
  --theme-primary: #365e76;
  --theme-primary-hover: #284b62;
  --theme-on-primary: #ffffff;
  --theme-info-bg: #e5f2f8;
  --theme-info-ink: #214e68;
  --theme-info-line: #557e94;
  --theme-success-bg: #e2f1e8;
  --theme-success-ink: #245337;
  --theme-success-line: #568568;
  --theme-warning-bg: #fcf0d8;
  --theme-warning-ink: #6e4a15;
  --theme-warning-line: #947133;
  --theme-danger-bg: #fbe9e8;
  --theme-danger-ink: #852e2e;
  --theme-danger-line: #b86464;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --theme-canvas: #101719;
  --theme-surface: #172126;
  --theme-raised: #223037;
  --theme-input: #1b282e;
  --theme-line: #39484d;
  --theme-control-line: #607984;
  --theme-text: #f4f8f8;
  --theme-muted: #aabdc4;
  --theme-link: #94cee9;
  --theme-focus: #92d2ef;
  --theme-primary: #eea47e;
  --theme-primary-hover: #ffc09d;
  --theme-on-primary: #251811;
  --theme-info-bg: #203a47;
  --theme-info-ink: #bfe7ff;
  --theme-info-line: #5789a5;
  --theme-success-bg: #203c30;
  --theme-success-ink: #b5edcb;
  --theme-success-line: #5d9477;
  --theme-warning-bg: #45391f;
  --theme-warning-ink: #ffe0a3;
  --theme-warning-line: #a1844a;
  --theme-danger-bg: #482e33;
  --theme-danger-ink: #ffbfc1;
  --theme-danger-line: #ba7780;
}

@media print {
  html[data-theme="dark"] { color-scheme: light; }
}

@media screen {
  html[data-theme] {
    --muted: var(--theme-muted);
    --workspace-muted: var(--theme-muted);
    --refresh-muted: var(--theme-muted);
  }

  html[data-theme] .catalog-controls .button[aria-pressed="true"],
  html[data-theme] .node-workspace .node-filters a[aria-current="page"] {
    color: var(--theme-info-ink);
    background: var(--theme-info-bg);
    border-color: var(--theme-info-line);
  }

  html[data-theme] .public-lot-hero .dual-status-auction {
    color: var(--auction-ink);
    background: var(--auction-bg);
  }
  html[data-theme] .public-lot-hero .dual-status-analysis {
    color: var(--analysis-ink);
    background: var(--analysis-bg);
  }

  html[data-theme="dark"] img[src*="/brand/autos-logo."] {
    content: url("brand/autos-logo-dark.bed3c4e94e23.svg");
  }

  html[data-theme] body { accent-color: var(--theme-focus); }
  html[data-theme] :focus-visible { outline-color: var(--theme-focus); }
  html[data-theme] :where(h1, h2, h3, h4) a { color: var(--theme-link); }

  html[data-theme] :is(input, select, textarea):not([type="hidden"], [type="checkbox"], [type="radio"]) {
    color: var(--theme-text);
    background-color: var(--theme-input);
    border-color: var(--theme-control-line);
  }

  html[data-theme] :is(input, textarea)::placeholder { color: var(--theme-muted); opacity: 1; }
  html[data-theme] :is(input, select, textarea)[aria-invalid="true"] { border-color: var(--theme-danger-line); }
  html[data-theme] :is(input, select, textarea):disabled { opacity: .72; }

  html[data-theme] :is(button:not(.primary, .quiet), .button:not(.primary)) {
    color: var(--theme-text);
    background-color: var(--theme-input);
    border-color: var(--theme-control-line);
  }
  html[data-theme] :is(button:not(.primary, .quiet), .button:not(.primary)):hover:not(:disabled) {
    background-color: var(--theme-raised);
    border-color: var(--theme-link);
  }
  html[data-theme] :is(button, .button).primary {
    color: var(--theme-on-primary);
    background-color: var(--theme-primary);
    border-color: var(--theme-primary);
  }
  html[data-theme] :is(button, .button).primary:hover:not(:disabled) {
    color: var(--theme-on-primary);
    background-color: var(--theme-primary-hover);
    border-color: var(--theme-primary-hover);
    filter: none;
  }

  html[data-theme] #notifications {
    color: var(--theme-text);
    background: var(--theme-surface);
    border-color: var(--theme-line);
  }

  html[data-theme] .notice:not(.error, .success, .info) {
    color: var(--theme-warning-ink);
    background-color: var(--theme-warning-bg);
    border-color: var(--theme-warning-line);
  }
  html[data-theme] .notice.info {
    color: var(--theme-info-ink);
    background-color: var(--theme-info-bg);
    border-color: var(--theme-info-line);
  }
  html[data-theme] .notice.success {
    color: var(--theme-success-ink);
    background-color: var(--theme-success-bg);
    border-color: var(--theme-success-line);
  }
  html[data-theme] :is(.notice.error, .account-form-errors) {
    color: var(--theme-danger-ink);
    background-color: var(--theme-danger-bg);
    border-color: var(--theme-danger-line);
  }
  html[data-theme] :is(.notice, .account-form-errors) :where(a, small, strong, h2, h3) { color: inherit; }
  html[data-theme] :is(.errorlist, .account-panel .errorlist) { color: var(--theme-danger-ink); }
}
