/* Trash detail only. Support both the early theme boot and runtime toggle. */
:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case {
  color-scheme: dark;
  color: var(--ap-text, #f0f0f0);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__panel {
  background: var(--ap-surface-1, #1e1e1e);
  border-color: var(--ap-border, #3f3f46);
  box-shadow: none;
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__panel > h2, .trash-case__section-title
) {
  color: var(--ap-text, #f0f0f0);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__body, .trash-case__section-body, .trash-case__shelf li,
  .trash-case__edit-fields label, .trash-row__field, .trash-case__history-link
) {
  color: var(--ap-text-soft, #d4d4d4);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__back, .trash-case__kicker, .trash-case__detail, .trash-case__meta,
  .trash-case__shelf h3, .trash-case__shelf .stamp, .trash-case__edit-status,
  .trash-case__section-figure figcaption, .trash-row__number,
  .trash-row__media summary, .trash-case__extras summary
) {
  color: var(--ap-text-muted, #b4b4b4);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__back:hover, .trash-case__history-link:hover
) {
  color: var(--ap-link-hover, #ffffff);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__section, .trash-case__detail, .trash-case__shelf li,
  .trash-case__edit-controls, .trash-case__extras, .trash-case__section-figure img
) {
  border-color: var(--ap-border, #3f3f46);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__image-frame, .trash-case__shelf, .trash-row
) {
  background: var(--ap-surface-2, #262626);
  border-color: var(--ap-border, #3f3f46);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__nav a, .trash-case__edit-controls button,
  .trash-case__format-tools button, .trash-row__bar-actions button,
  .trash-case__add-row, .trash-case__edit-fields input,
  .trash-case__edit-fields textarea, .trash-row__field input, .trash-row__field textarea
) {
  background: var(--ap-surface-2, #262626);
  border-color: var(--ap-border, #3f3f46);
  color: var(--ap-text, #f0f0f0);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(
  .trash-case__nav a:hover, .trash-case__edit-controls button:hover,
  .trash-case__format-tools button:hover, .trash-row__bar-actions button:hover,
  .trash-case__add-row:hover
) {
  background: var(--ap-surface-3, #303030);
  color: var(--ap-link-hover, #ffffff);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__nav a.is-primary {
  background: var(--ap-surface-3, #303030);
  border-color: var(--ap-text-muted, #b4b4b4);
  color: var(--ap-text, #f0f0f0);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__nav a.is-primary:hover {
  background: #404040;
  color: var(--ap-link-hover, #ffffff);
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case :is(input, textarea)::placeholder {
  color: var(--ap-text-muted, #b4b4b4);
  opacity: 1;
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__verdict {
  background: #3f101b;
  border-color: #9f1239;
  color: #fecdd3;
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__verdict--accepted {
  background: #052e16;
  border-color: #166534;
  color: #bbf7d0;
}

:is(html[data-theme="dark"], html.dark-mode, body.dark-mode) .trash-case__verdict--product {
  background: #431407;
  border-color: #9a3412;
  color: #fed7aa;
}
