.dcm-scene-frame {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  border-radius: 8px;
  margin-top: 12px;
  background: var(--dcm-surface, #111);
}

/* Layer toggle buttons — stat tiles postMessage layer visibility to the embedded map.
   Accent token: --dcm-accent (= var(--ds-brand-primary, var(--primary-color, #1877f2))). */
.dcm-det__stat--toggle {
  font: inherit;
  cursor: pointer;
  text-align: inherit;
  width: 100%;
  position: relative;
}

/* SELECTED — full accent fill, explicit opacity: 1 beats any inherited dimming */
.dcm-det__stat--toggle[aria-pressed="true"] {
  background: var(--dcm-accent);
  border-color: var(--dcm-accent);
  opacity: 1;
}

.dcm-det__stat--toggle[aria-pressed="true"] .dcm-det__stat-num,
.dcm-det__stat--toggle[aria-pressed="true"] .dcm-det__stat-label {
  color: var(--dcm-on-brand);
}

/* Checkmark badge anchored to top-right of the selected tile */
.dcm-det__stat--toggle[aria-pressed="true"]::after {
  content: '\2713';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: var(--dcm-on-brand);
}

/* UNSELECTED — ghost treatment: dashed border, muted text, flattened shadow */
.dcm-det__stat--toggle[aria-pressed="false"] {
  background: var(--dcm-surface);
  border: 1px dashed var(--dcm-border);
  box-shadow: none;
  opacity: 0.55;
}

.dcm-det__stat--toggle[aria-pressed="false"] .dcm-det__stat-num,
.dcm-det__stat--toggle[aria-pressed="false"] .dcm-det__stat-label {
  color: var(--dcm-muted);
}

/* Right-aligned actions group in the header top row — keeps badge + status
   button compact together so the title takes the remaining width */
.dcm-det__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

/* Let the title take remaining width and wrap its TEXT so the actions group
   stays on the same row (min-width:0 defeats the flex min-content floor) */
.dcm-det__header-top .dcm-det__title {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* Status action button — small pill in the header top row */
.dcm-btn--sm {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  line-height: 1.4;
}

/* Full-width variant — used for close/cancel choices inside the status sheet */
.dcm-btn--full {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  text-align: center;
}

/* Danger ghost — "Cancel Operation" button in the status sheet */
.dcm-btn--ghost.dcm-btn--danger {
  color: var(--ds-danger, #c0392b);
  border-color: var(--ds-danger, #c0392b);
}
.dcm-btn--ghost.dcm-btn--danger:active {
  background: rgba(192, 57, 43, 0.1);
}

/* Prompt line inside close-status sheet body */
.dcm-status-sheet__prompt {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--dcm-muted);
}

/* ── Map Layers modal (sceneMapLayersModal.js) ───────────────────────────────
   Bottom-sheet checklist reusing .dcm-sheet chrome. All colors via --dcm-*
   tokens (dark-mode aware). Category rows are select-all/none; item rows sit
   indented beneath their category. */
.dcm-layers__cat {
  padding: 4px 0;
  border-bottom: 1px solid var(--dcm-border);
}
.dcm-layers__cat:last-child { border-bottom: 0; }

.dcm-layers__cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--dcm-text);
  cursor: pointer;
}
.dcm-layers__cat-row input,
.dcm-layers__item input {
  width: 20px;
  height: 20px;
  flex: none;
  accent-color: var(--dcm-accent);
  cursor: pointer;
}
.dcm-layers__cat-icon { font-size: 16px; }
.dcm-layers__cat-label { flex: 1 1 auto; }

.dcm-layers__count {
  flex: none;
  min-width: 22px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: var(--dcm-muted);
  background: var(--dcm-surface-2);
  border-radius: 999px;
}
.dcm-layers__count--live {
  color: var(--dcm-on-brand);
  background: var(--dcm-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dcm-layers__items {
  display: flex;
  flex-direction: column;
  padding: 0 0 8px 30px;
}
.dcm-layers__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 2px;
  font-size: 14px;
  color: var(--dcm-text);
  cursor: pointer;
}
.dcm-layers__item-label {
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.dcm-layers__empty {
  margin: 0 0 8px 30px;
  font-size: 13px;
  color: var(--dcm-muted);
}

/* Report retry pill — ghost sibling to .dcm-det__report-dl */
.dcm-det__report-retry {
  margin-left: auto;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dcm-text);
  background: var(--dcm-surface-2);
  border: 1px solid var(--dcm-border);
  border-radius: 999px;
  cursor: pointer;
}
.dcm-det__report-retry:active { background: var(--dcm-surface); }
