/* ==========================================================================
   REPLIES, THE OWNER'S REVIEW OF THE REPLY LIBRARY (reply-review, 6 Nov 2026;
   admin/js/office-replies.mjs paints #ofc-rr-card).

   Additions only, on the Office's own card, tabs (.ofc-addr), state dots
   (.ofc-conn__st) and buttons. Every colour is an --o-* token, which the pro
   theme points at the light sheet and the dark switch at the black, so light
   and dark read without a dark copy. Every control is 44px tall; at 390px the
   preview and the words as written stack, and nothing runs off the side.
   ========================================================================== */

/* "Replies for": tkati's own book or a client business's (fixes-1117b). */
#office #ofc-rr-card .ofc-rr__for { margin: 0 0 0.75rem; }
#office #ofc-rr-card .ofc-rr__for[hidden] { display: none; }
#office #ofc-rr-card .ofc-rr__forl { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; color: var(--o-dim); font: 500 var(--o-t-sm)/1.4 var(--body); }
#office #ofc-rr-card .ofc-rr__forl select { min-height: 44px; width: auto; max-width: 100%; min-width: min(18rem, 100%); }
#office #ofc-rr-card .ofc-rr__forn { margin: 0.35rem 0 0; }
#office #ofc-rr-card .ofc-rr__mode { margin: 0 0 0.75rem; max-width: 72ch; }
#office #ofc-rr-card .ofc-rr__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin: 0 0 0.75rem; }
#office #ofc-rr-card .ofc-rr__count { margin: 0; color: var(--o-text); font: 600 var(--o-t-sm)/1.4 var(--body); }
#office #ofc-rr-card .ofc-rr__tone { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0; padding: 0; border: 0; }
#office #ofc-rr-card .ofc-rr__lg { float: left; margin-right: 0.5rem; padding: 0; color: var(--o-dim); font-size: var(--o-t-sm); }
#office #ofc-rr-card .ofc-rr__radio { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; color: var(--o-text); font-size: var(--o-t-sm); cursor: pointer; }
#office #ofc-rr-card .ofc-rr__radio input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--o-accent); }
#office #ofc-rr-card .ofc-rr__why { color: var(--o-faint); font-size: var(--o-t-xs); }
#office #ofc-rr-card .ofc-addr { margin-bottom: 0.5rem; }
#office #ofc-rr-card .ofc-addr__b { min-height: 44px; }
#office #ofc-rr-card .ofc-rr__key { margin: 0.25rem 0 1rem; }

/* The preview's marks: the business's own values, and the blanks a record fills when the reply goes. */
#office #ofc-rr-card .ofc-rr__v { padding: 0 0.15em; border-radius: var(--tk-r-xs); background: color-mix(in srgb, var(--o-accent) 24%, transparent); color: inherit; }
#office #ofc-rr-card .ofc-rr__b { padding: 0 0.3em; border: 1px dashed var(--o-faint); border-radius: var(--tk-r-xs); color: var(--o-dim); font-style: italic; }
#office #ofc-rr-card .ofc-rr__b.is-missing { border-color: var(--o-warn); color: var(--o-warn-ink); }

/* A situation: its name and how many of its replies are approved; opened, its replies. */
#office #ofc-rr-card .ofc-rr__sit { border-top: 1px solid var(--o-line); }
#office #ofc-rr-card .ofc-rr__sit:last-child { border-bottom: 1px solid var(--o-line); }
#office #ofc-rr-card .ofc-rr__sum { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem 1rem; min-height: 44px;
  padding: 0.5rem 0; cursor: pointer; list-style: none; }
#office #ofc-rr-card .ofc-rr__sum::-webkit-details-marker { display: none; }
#office #ofc-rr-card .ofc-rr__sum::before { content: '+'; width: 1rem; color: var(--o-faint); font-weight: 600; }
#office #ofc-rr-card .ofc-rr__sit[open] > .ofc-rr__sum::before { content: '\2212'; }
#office #ofc-rr-card .ofc-rr__sl { flex: 1 1 14rem; color: var(--o-text); font: 600 var(--o-t-sm)/1.35 var(--body); }
#office #ofc-rr-card .ofc-rr__sc { color: var(--o-dim); font-size: var(--o-t-xs); font-variant-numeric: tabular-nums; }
#office #ofc-rr-card .ofc-rr__sb { display: grid; gap: 0.75rem; padding: 0 0 1rem; }
#office #ofc-rr-card .ofc-rr__all { justify-self: start; min-height: 44px; }

/* One reply: its channel and tone, where it stands, the preview beside the words as written, its buttons. */
#office #ofc-rr-card .ofc-rr__e { padding: 0.75rem 1rem; border: 1px solid var(--o-line); border-radius: var(--o-r-lg); background: var(--o-raised); }
#office #ofc-rr-card .ofc-rr__e[data-state="changed"] { border-color: var(--o-warn); }
#office #ofc-rr-card .ofc-rr__eh { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; margin: 0 0 0.5rem; font-size: var(--o-t-sm); }
#office #ofc-rr-card .ofc-rr__tag { color: var(--o-text); font-weight: 600; }
#office #ofc-rr-card .ofc-rr__who { color: var(--o-faint); font-size: var(--o-t-xs); }
#office #ofc-rr-card .ofc-rr__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; }
#office #ofc-rr-card .ofc-rr__lab { display: block; margin: 0 0 0.25rem; color: var(--o-faint); font: 550 var(--o-t-xs)/1.4 var(--body); }
#office #ofc-rr-card :is(.ofc-rr__words, .ofc-rr__raw, .ofc-rr__subj) { margin: 0; max-width: 64ch; color: var(--o-text); font-size: var(--o-t-sm); line-height: 1.55;
  white-space: pre-line; overflow-wrap: anywhere; }
#office #ofc-rr-card .ofc-rr__subj { font-weight: 600; margin-bottom: 0.25rem; }
#office #ofc-rr-card .ofc-rr__raw { color: var(--o-dim); }
#office #ofc-rr-card .ofc-rr__code { font: 500 0.85em/1 var(--mono, ui-monospace, monospace); color: var(--o-text); }
#office #ofc-rr-card .ofc-rr__said { margin: 0.5rem 0 0; max-width: 64ch; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office #ofc-rr-card .ofc-rr__err { color: var(--o-bad); }
#office #ofc-rr-card .ofc-rr__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.75rem; }
#office #ofc-rr-card .ofc-rr__acts :is(.ofc-ghost, .ofc-quiet, .ofc-primary) { min-height: 44px; margin-left: 0; }
#office #ofc-rr-card .ofc-rr__edit { display: grid; gap: 0.5rem; margin-top: 0.75rem; }
#office #ofc-rr-card .ofc-rr__edit[hidden] { display: none; }
#office #ofc-rr-card .ofc-rr__edit :is(input, textarea) { width: 100%; min-height: 44px; font: 400 var(--o-t-sm)/1.5 var(--body); }
#office #ofc-rr-card .ofc-rr__edit textarea { resize: vertical; padding: 0.5rem; }
#office #ofc-rr-card .ofc-rr__probs { margin: 0; padding-left: 1rem; color: var(--o-bad); font-size: var(--o-t-sm); line-height: 1.5; }
#office #ofc-rr-card .ofc-rr__probs:empty { display: none; }

/* Drafts asked for where nothing fit. */
#office #ofc-rr-card .ofc-rr__drafts { margin: 0 0 1rem; }
#office #ofc-rr-card .ofc-rr__h { margin: 0 0 0.5rem; color: var(--o-text); font: 600 var(--o-t-sm)/1.3 var(--body); }
#office #ofc-rr-card .ofc-rr__dl { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
#office #ofc-rr-card .ofc-rr__d { padding: 0.75rem 1rem; border: 1px solid var(--o-line); border-left: 3px solid var(--o-accent); border-radius: var(--o-r-lg); background: var(--o-raised); }
#office #ofc-rr-card .ofc-rr__dh { margin: 0 0 0.25rem; color: var(--o-text); font: 600 var(--o-t-sm)/1.4 var(--body); }

@media (max-width: 560px) {
  #office #ofc-rr-card .ofc-rr__cols { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  #office #ofc-rr-card .ofc-rr__e, #office #ofc-rr-card .ofc-rr__d { padding: 0.75rem; }
}
