/* (c) 2026 Zero Mile Contract Limited. All rights reserved. */
.rx-pad { padding: 14px; display: grid; gap: 14px; min-width: 0; }
.rx-pad p { margin: 0; }
.rx-pattern-row { display: grid; gap: 14px; }
.rx-pattern-field, .rx-example-field { min-width: 0; }
.rx-label { display: block; margin: 0 0 6px; color: var(--mute); font: 500 13px var(--mono); }
.rx-code { display: block; width: 100%; font: 400 15px/1.6 var(--mono); tab-size: 2; }
textarea.rx-code { resize: vertical; }
.rx-example-field select { width: 100%; min-height: 46px; font: 400 15px var(--sans); }
.rx-help { color: var(--mute); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.rx-help code, .rx-reference code { font-size: .92em; color: var(--ink); }
.rx-pattern-field .rx-help, #rx-size, #rx-replacement-help { margin-top: 6px; }
.rx-flags { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.rx-flags legend { padding: 0; }
.rx-flags label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; min-height: 44px; border: 1px solid var(--rule); color: var(--ink); font-size: 13px; cursor: pointer; }
.rx-flags label:has(input:checked) { background: var(--press); border-color: var(--blue); }
.rx-flags label:has(input:disabled) { color: var(--mute); cursor: not-allowed; }
.rx-flags code { font-size: 15px; font-weight: 500; }
.rx-flags input, .rx-auto input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); flex: none; }
.rx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rx-bar > .rx-label { margin: 0; }
.rx-auto { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; font-size: 14px; cursor: pointer; }
.rx-status { padding: 10px 12px; background: var(--note-bg); border-left: 3px solid var(--note); font-size: 14px; overflow-wrap: anywhere; }
.rx-status[data-state="error"] { background: var(--bad-bg); border-color: var(--bad); }
.rx-status[data-state="success"] { background: var(--ok-bg); border-color: var(--ok); }
.rx-status[data-state="limit"] { background: var(--warn-bg); border-color: var(--warn); }
.rx-sheet-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--ink); }
.rx-sheet-bar .sheet-h { border-bottom: 0; }
.rx-sheet-bar .btn { border: 0; border-left: 1px solid var(--rule); font-size: 13px; }
.rx-highlight { margin: 0; min-height: 80px; max-height: 360px; padding: 12px; border: 1px solid var(--rule); background: var(--tint); color: var(--ink); font: 400 14px/1.8 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; tab-size: 2; }
.rx-highlight:empty::before { content: "No text to display."; color: var(--mute); }
.rx-highlight mark { background: #dce6f5; color: var(--ink); border-bottom: 2px solid var(--blue); }
.rx-highlight mark:nth-of-type(even) { background: #e8f4ed; border-color: var(--ok); }
.rx-zero { display: inline-block; height: 1.1em; margin: 0 1px; border-left: 2px solid var(--blue); vertical-align: text-bottom; }
.rx-notice { padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); font-size: 14px; }
.rx-details { display: grid; gap: 8px; max-height: 480px; overflow: auto; }
.rx-details details { border: 1px solid var(--rule); min-width: 0; }
.rx-details summary { cursor: pointer; padding: 10px 12px; font: 400 13px/1.6 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.rx-details dl { display: grid; grid-template-columns: minmax(75px, auto) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--rule); }
.rx-details dt, .rx-details dd { margin: 0; padding: 6px 10px; border-bottom: 1px solid var(--rule); font: 400 13px/1.6 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; }
.rx-details dt { color: var(--mute); border-right: 1px solid var(--rule); }
.rx-details dd { color: var(--ink); }
.rx-details dl > :nth-last-child(-n+2) { border-bottom: 0; }
#rx-copy-status:empty { display: none; }
@media (min-width: 821px) {
  .rx-pad { padding: 18px 20px; }
  .rx-pattern-row { grid-template-columns: minmax(0, 1fr) 220px; }
  .rx-auto { margin-left: auto; }
}
@media (max-width: 640px) {
  .rx-reference dl { grid-template-columns: minmax(0, 1fr); }
  .rx-reference dt { border-right: 0; border-bottom: 0; padding-bottom: 0; }
  .rx-sheet-bar { align-items: stretch; }
  .rx-sheet-bar .btn { text-align: left; }
}
