.delivery-room-ui{display:grid;gap:1rem;min-width:0;max-width:100%;color:var(--text,#172033)}
.delivery-room-filter-toggle{display:none}.delivery-room-filter-sheet{display:grid;grid-template-columns:repeat(auto-fit,minmax(12rem,1fr));gap:.75rem;align-items:end;padding:1rem;border:1px solid var(--border,#d5dae1);border-radius:.75rem;background:var(--surface,#fff)}
.delivery-room-filter-sheet>*{min-width:0}.delivery-room-field{display:grid;gap:.3rem;font-weight:600}.delivery-room-field input,.delivery-room-field select{box-sizing:border-box;width:100%;min-height:44px;padding:.55rem;border:1px solid var(--border,#9ca3af);border-radius:.4rem;background:inherit;color:inherit}.delivery-room-field input[type="datetime-local"]{min-width:0;max-width:100%}
.delivery-room-checkbox,.delivery-room-filter-actions{display:flex;gap:.5rem;align-items:center}.delivery-room-checkbox{min-height:44px}.delivery-room-button,.delivery-room-copy{min-height:44px;min-width:44px;padding:.55rem .85rem;border:1px solid var(--border,#77808d);border-radius:.5rem;background:var(--surface,#fff);color:inherit;cursor:pointer}.delivery-room-button:disabled{cursor:wait;opacity:.65}.delivery-room-button:focus-visible,.delivery-room-copy:focus-visible,.delivery-room-raw summary:focus-visible{outline:3px solid var(--focus,#2563eb);outline-offset:2px}
.delivery-room-live{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.delivery-room-groups{display:grid;gap:.75rem}.delivery-room-group{min-width:0;border:1px solid var(--border,#d5dae1);border-radius:.75rem;background:var(--surface,#fff);overflow:hidden}.delivery-room-group-summary{display:grid;gap:.45rem;padding:1rem}.delivery-room-group-summary p{margin:0}.delivery-room-title{display:flex;align-items:center;gap:.5rem;min-width:0;flex-wrap:wrap}.delivery-room-id{font-size:1.05rem;overflow-wrap:anywhere;user-select:text}.delivery-room-state,.delivery-room-reset,.delivery-room-status-summary{font-size:.875rem}.delivery-room-reset{padding:.2rem .45rem;border:1px solid currentColor;border-radius:99px}.delivery-room-attempts{padding:1rem;background:var(--transcript-bg,#f4f7fb)}.delivery-room-attempts[hidden]{display:none}
.delivery-room-transcript{display:flex;flex-direction:column;gap:1rem;margin:0;padding:0;list-style:none;min-width:0}.delivery-room-message{display:flex;width:100%;min-width:0}.delivery-room-message-inbound{justify-content:flex-start}.delivery-room-message-outbound{justify-content:flex-end}.delivery-room-bubble{box-sizing:border-box;width:min(82%,46rem);min-width:0;padding:.85rem 1rem;border:1px solid var(--border,#cbd5e1);border-radius:1rem 1rem 1rem .3rem;background:var(--inbound-bg,#fff);box-shadow:0 1px 2px #0f172a12;overflow-wrap:anywhere}.delivery-room-message-outbound .delivery-room-bubble{border-radius:1rem 1rem .3rem 1rem;background:var(--outbound-bg,#eaf2ff);border-color:var(--outbound-border,#9dbbe8)}
.delivery-room-bubble-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.35rem .75rem;font-size:.8125rem;color:var(--muted,#526071)}.delivery-room-message-text{margin:.6rem 0;white-space:pre-wrap;line-height:1.5}.delivery-room-bubble-status{margin:.35rem 0;font-size:.875rem;font-weight:700}.delivery-room-bubble-status:before{content:"● ";}.status-delivered .delivery-room-bubble-status:before{content:"✓ ";}.status-dead_letter .delivery-room-bubble-status:before{content:"! ";}.delivery-room-retry-timeline{display:grid;gap:.3rem;margin:.65rem 0;padding:.6rem .7rem .6rem 1.8rem;border-left:3px solid var(--border,#94a3b8);background:#ffffff80;font-size:.8125rem}.delivery-room-retry-row{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.25rem .75rem}
.delivery-room-raw{margin-top:.65rem;border-top:1px solid var(--border,#cbd5e1)}.delivery-room-raw summary{display:flex;align-items:center;min-height:44px;font-weight:700;cursor:pointer}.delivery-room-raw-actions,.delivery-room-exact-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:.35rem 0}.delivery-room-json{box-sizing:border-box;max-width:100%;max-height:20rem;margin:.5rem 0 0;padding:.75rem;overflow:auto;overscroll-behavior:contain;border-radius:.5rem;background:#111827;color:#f8fafc;font:400 .8125rem/1.55 ui-monospace,SFMono-Regular,Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.delivery-room-error{padding:.75rem;border-left:4px solid #b91c1c;background:#fef2f2;color:#7f1d1d}.delivery-room-empty,.delivery-room-loading{padding:1rem;text-align:center}.delivery-room-detail{box-sizing:border-box;width:min(42rem,calc(100% - 2rem));max-height:85vh;border:1px solid var(--border,#9ca3af);border-radius:.75rem}.delivery-room-detail header{display:flex;justify-content:space-between;align-items:center;gap:1rem}.delivery-room-detail::backdrop{background:#0f172a99}
@media (max-width:720px){.delivery-room-ui{max-width:100%;overflow-x:hidden}.delivery-room-filter-toggle{display:block;width:100%;min-height:44px}.delivery-room-filter-sheet{display:none;position:fixed;z-index:1000;inset:0;overflow-y:auto;grid-template-columns:1fr;align-content:start;border:0;border-radius:0;padding:1rem 1rem 5rem}.delivery-room-filter-sheet.open{display:grid}.delivery-room-filter-actions{position:sticky;bottom:0;margin:0 -1rem -5rem;padding:1rem;background:inherit}.delivery-room-filter-actions>*{flex:1}.delivery-room-group-summary{padding:.85rem}.delivery-room-title{display:grid;grid-template-columns:minmax(0,1fr) auto}.delivery-room-attempts{padding:.75rem .5rem}.delivery-room-bubble{width:92%;padding:.75rem}.delivery-room-bubble-meta{display:grid}.delivery-room-raw-actions .delivery-room-button,.delivery-room-exact-actions .delivery-room-button{width:100%}.delivery-room-detail{position:fixed;inset:0;width:100%;max-width:none;height:100%;max-height:none;margin:0;border-radius:0}.delivery-room-detail-body{overflow-y:auto}}
@media (prefers-reduced-motion:reduce){.delivery-room-ui *{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Activity filters, room summaries and detailed message inspection. */
.delivery-room-ui { gap: 20px; max-width: 1460px; margin-inline: auto; }
.delivery-room-filter-sheet { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 22px; border-radius: 12px; background: var(--surface); }
.delivery-room-field { gap: 7px; color: var(--text); font-size: 12px; font-weight: 600; line-height: 1.5; }
.delivery-room-field input, .delivery-room-field select { padding: 10px 12px; border-radius: 8px; font: inherit; font-size: 13px; background: var(--surface); }
.delivery-room-advanced-filters { grid-column: 1 / -1; min-width: 0; border-block: 1px solid var(--border); }
.delivery-room-advanced-filters > summary { min-height: 44px; padding-block: 13px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; cursor: pointer; }
.delivery-room-advanced-filters[open] > summary { color: var(--text); }
.delivery-room-advanced-filters > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 3px; }
.delivery-room-identifier-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; min-width: 0; padding: 5px 0 18px; }
.delivery-room-identifier-fields > * { min-width: 0; }
.delivery-room-checkbox { grid-column: 1 / 3; font-size: 12px; font-weight: 500; line-height: 1.5; }
.delivery-room-checkbox input { accent-color: var(--primary); flex: 0 0 auto; width: 17px; height: 17px; }
.delivery-room-filter-actions { grid-column: 3 / 5; justify-content: flex-end; gap: 8px; }
.delivery-room-button, .delivery-room-copy, .delivery-room-filter-toggle { font: inherit; font-size: 12px; font-weight: 600; border-color: var(--border); border-radius: 8px; color: var(--text); background: var(--surface); }
.delivery-room-button:hover, .delivery-room-copy:hover { background: var(--surface-muted); }
.delivery-room-filter-actions [type="submit"] { color: white; background: var(--primary); border-color: var(--primary); }
.delivery-room-groups { gap: 16px; }
.delivery-room-group { border-radius: 12px; }
.delivery-room-group-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 20px; padding: 22px; }
.delivery-room-group-summary > p, .delivery-room-group-summary > .delivery-room-title { grid-column: 1; }
.delivery-room-group-summary > .delivery-room-button { grid-column: 2; grid-row: 1 / 5; align-self: center; }
.delivery-room-group-summary > p { overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }
.delivery-room-id { font: 600 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.delivery-room-copy { min-height: 32px; min-width: 40px; padding: 5px 9px; font-size: 11px; }
.delivery-room-state { padding: 4px 8px; background: var(--surface-muted); border-radius: 5px; color: var(--muted); font-size: 11px; }
.delivery-room-reset { font-size: 10px; }
.delivery-room-status-summary { color: var(--text); font-variant-numeric: tabular-nums; }
.delivery-room-attempts { border-top: 1px solid var(--border); padding: 24px; background: var(--surface-soft); }
.delivery-room-transcript { gap: 20px; }
.delivery-room-bubble { max-width: 760px; padding: 18px; box-shadow: none; border-radius: 11px 11px 11px 3px; background: var(--surface); }
.delivery-room-message-outbound .delivery-room-bubble { border-radius: 11px 11px 3px 11px; background: color-mix(in srgb, var(--primary) 5%, var(--surface)); border-color: color-mix(in srgb, var(--primary) 20%, var(--border)); }
.delivery-room-message-text { font-size: 13px; line-height: 1.7; }
.delivery-room-bubble-meta { font-size: 11px; }
.delivery-room-bubble-status { font-size: 12px; }
.delivery-room-retry-timeline { padding-block: 10px; background: var(--surface); font-size: 11px; line-height: 1.6; }
.delivery-room-raw summary { font-size: 12px; }
.delivery-room-detail { max-width: calc(100vw - 32px); padding: 24px; color: var(--text); background: var(--surface); box-shadow: 0 24px 70px color-mix(in srgb, var(--text) 20%, transparent); }
.delivery-room-detail header { padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.delivery-room-detail header h2 { font-size: 20px; margin: 0; }
.delivery-room-detail-body { min-width: 0; overflow-wrap: anywhere; }
.delivery-room-detail-body dl { display: grid; gap: 8px 16px; }
.delivery-room-detail-body dd { margin: 0 0 12px; min-width: 0; }
.legacy-deliveries { padding: 0 20px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.legacy-deliveries > summary { font-size: 13px; }
.legacy-deliveries .table-wrap { max-width: 100%; overflow-x: auto; box-shadow: none; }
@media (max-width: 1100px) and (min-width: 721px) {
  .delivery-room-filter-sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-room-identifier-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-room-checkbox { grid-column: 1; }
  .delivery-room-filter-actions { grid-column: 2; }
}
@media (max-width: 720px) {
  .delivery-room-ui { overflow-x: visible; }
  .delivery-room-filter-toggle { padding: 12px; }
  .delivery-room-filter-sheet { grid-template-columns: 1fr; gap: 18px; padding: 22px 18px 92px; border-radius: 0; }
  .delivery-room-checkbox, .delivery-room-filter-actions { grid-column: auto; }
  .delivery-room-identifier-fields { grid-template-columns: 1fr; gap: 18px; }
  .delivery-room-filter-actions { margin: 0 -18px -92px; padding: 16px 18px; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); }
  .delivery-room-group-summary { grid-template-columns: 1fr; padding: 18px; }
  .delivery-room-group-summary > .delivery-room-button { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .delivery-room-title { display: flex; }
  .delivery-room-attempts { padding: 18px 12px; }
  .delivery-room-bubble { padding: 14px; width: 96%; }
  .delivery-room-detail { padding: 20px; max-width: none; }
  .delivery-room-detail header { align-items: flex-start; gap: 12px; }
  .legacy-deliveries { padding: 0 14px 14px; }
}
@media (pointer: coarse) { .delivery-room-copy { min-height: 44px; min-width: 44px; } }

/* Filters expand in the document flow, without covering the rest of the page. */
.delivery-room-filter-header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.delivery-room-filter-header h3 { margin: 0; font-size: 15px; }
.delivery-room-filter-close { display: none; }
@media (max-width: 720px) {
  .delivery-room-filter-sheet { position: static; inset: auto; z-index: auto; overflow: visible; padding: 18px; border: 1px solid var(--border); border-radius: 10px; }
  .delivery-room-filter-actions { position: static; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--border); }
  .delivery-room-filter-close { display: inline-flex; }
}

.delivery-room-filter-toggle { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.delivery-room-filter-toggle[aria-expanded="true"] { background: var(--surface-muted); }
