/* Under > Chargebacks (public/un-chargebacks.js). Every new class starts with .unk- ("unc-" belongs to Clientes).
   Cards, chips, rows, the sheet, buttons and fields come from the existing classes (.as-card, .as-top, .fi-name, .as-amt, .as-sub, .as-st,
   .un-pills, .un-sec, .un-row, .un-facts, .un-err, .un-acts, .btn.sm.un-btn, .fi); here is only what this screen adds.
   Colours only through the tokens (--v-*), with the fallback of the old theme, so the light and the dark theme both read.
   Tap targets: 40 px or more. Nothing here may create horizontal page scroll at 360, 390 and 430 px. */

/* ---- notices (above the list, and inside the sheet) ---- */
.unk-note { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere;
  border: 1px solid var(--v-line, var(--line)); background: var(--v-gray-bg, rgba(255,255,255,.05)); color: var(--v-strong, var(--text)); }
.unk-note.warn { border-color: color-mix(in srgb, var(--warn, #f59e0b) 45%, transparent); background: color-mix(in srgb, var(--warn, #f59e0b) 12%, transparent); }
.unk-note.bad { border-color: color-mix(in srgb, var(--err, #ef4444) 50%, transparent); background: color-mix(in srgb, var(--err, #ef4444) 12%, transparent); font-weight: 500; }
.unk-counts { margin-top: -4px; }
.unk-tip { margin-top: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.unk-center { justify-content: center; }

/* ---- card of the list ---- */
.unk-card.unk-tap { cursor: pointer; }
.unk-card.unk-wait { border-left: 3px solid #e11d48; }   /* still takes an answer */
.unk-card .as-top { align-items: flex-start; gap: 10px; }
.unk-card .fi-name { min-width: 0; overflow-wrap: anywhere; }
.unk-card .as-amt { white-space: nowrap; flex-shrink: 0; }
.unk-card .as-sub, .unk-second { overflow-wrap: anywhere; }
.unk-card .un-pills { margin-top: 8px; }
.unk-card .un-pills .as-st, .unk-det .un-pills .as-st { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.unk-cur { font-size: 11px; font-weight: 500; color: var(--v-muted, var(--muted)); }
/* the order number, when the order can be opened: it reads as a link, and it is 40 px tall without making the card taller */
.unk-ord { -webkit-appearance: none; appearance: none; display: inline-flex; align-items: center; min-width: 0; min-height: 40px; margin: -10px 0; padding: 0; border: 0; background: none;
  font: inherit; font-family: var(--v-sans, inherit); font-weight: 600; text-align: left; overflow-wrap: anywhere; color: var(--v-blue, var(--dv-blue));
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.v2[data-theme="dark"] .unk-ord { color: #8fb0ff; }
/* label on the left, value on the right; a long value wraps under itself */
.unk-kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 12.5px; line-height: 1.4; color: var(--v-muted, var(--muted)); }
.unk-kv > span { flex: 0 0 auto; }
.unk-kv > b { min-width: 0; text-align: right; font-weight: 600; color: var(--v-strong, var(--text)); overflow-wrap: anywhere; }
.unk-kv > b.un-pills { justify-content: flex-end; margin-top: 0; }
.unk-kv i { display: block; font-style: normal; font-weight: 500; font-size: 12px; }
.unk-kv.unk-urgent > b { color: var(--v-err, var(--err)); }   /* 3 days or less to answer, or past the deadline */
button.unk-kv.unk-ship { -webkit-appearance: none; appearance: none; width: 100%; min-height: 40px; margin: 4px 0 0; padding: 4px 0; border: 0; background: none; align-items: center;
  font: inherit; font-family: var(--v-sans, inherit); font-size: 12.5px; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.unk-trk { font-family: var(--v-mono, monospace); font-size: 11px; font-weight: 500; color: var(--v-muted, var(--muted)); overflow-wrap: anywhere; }
.unk-flag { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--v-warn, var(--warn)); }
.unk-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.unk-acts .btn.sm.un-btn { flex: 1 1 140px; min-height: 44px; justify-content: center; }
.unk-ord:focus-visible, .unk-ship:focus-visible, .unk-grp-h:focus-visible, .unk-mini:focus-visible { outline: 2px solid var(--v-blue, var(--dv-blue)); outline-offset: 2px; }

/* ---- detail sheet ---- */
.unk-det { min-width: 0; }
.unk-det .un-row { align-items: baseline; }
.unk-det .un-row > span { flex: 0 0 auto; max-width: 55%; overflow-wrap: anywhere; }
.unk-det .un-row > b { flex: 1 1 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.unk-det .un-row > b .un-pills { justify-content: flex-end; }
.unk-det .un-facts li { overflow-wrap: anywhere; color: var(--v-strong, var(--text)); }
.unk-det .btn.sm.un-btn { flex: 0 0 auto; }
.unk-det .btn.sm.un-btn:disabled { opacity: .55; cursor: default; }
.unk-det .unk-note { margin: 10px 0 0; }
.unk-det .unk-out + .unk-note { margin-top: 0; }
.unk-due { margin-top: 10px; font-size: 13px; }
.unk-sub { margin: 12px 0 4px; font-size: 12px; font-weight: 600; color: var(--v-strong, var(--text)); }
.unk-err { text-align: center; }
.unk-end { margin-top: 16px; justify-content: center; }
/* what an action answered, and a submit that has no answer yet (top of the sheet) */
.unk-out, .unk-ask-r { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; border: 1px solid transparent; color: var(--v-strong, var(--text)); }
.unk-out b { display: block; font-weight: 600; }
.unk-out p { margin: 4px 0 0; font-size: 12.5px; }
.unk-out.ok, .unk-ask-r.ok { border-color: color-mix(in srgb, var(--ok, #22c55e) 45%, transparent); background: var(--v-ok-bg, color-mix(in srgb, var(--ok, #22c55e) 12%, transparent)); }
.unk-out.err, .unk-ask-r.err { border-color: color-mix(in srgb, var(--err, #ef4444) 50%, transparent); background: color-mix(in srgb, var(--err, #ef4444) 12%, transparent); }
.unk-out.warn, .unk-ask-r.warn { border-color: color-mix(in srgb, var(--warn, #f59e0b) 50%, transparent); background: color-mix(in srgb, var(--warn, #f59e0b) 12%, transparent); }

/* ---- the form: five groups that open and close. A closed group still says what it holds ---- */
.unk-grp { margin-top: 10px; border: 1px solid var(--v-line, var(--line)); border-radius: 14px; background: var(--v-gray-bg, rgba(255,255,255,.04)); }
.unk-grp-h { -webkit-appearance: none; appearance: none; display: flex; align-items: center; gap: 8px; width: 100%; min-height: 48px; margin: 0; padding: 8px 12px; border: 0; border-radius: 14px; background: none;
  color: var(--v-strong, var(--text)); font: inherit; font-family: var(--v-sans, inherit); font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.unk-grp-c { flex: none; width: 8px; height: 8px; margin: 0 2px 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .6; transition: transform .15s; }
.unk-grp-h[aria-expanded="true"] .unk-grp-c { transform: rotate(45deg); }
.unk-grp-l { flex: 0 0 auto; }
.unk-grp-s { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.unk-sign { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: rgba(127,127,127,.16); color: var(--v-muted, var(--muted)); }
.unk-sign.none { font-weight: 500; }
.unk-sign.diff { background: color-mix(in srgb, var(--warn, #f59e0b) 20%, transparent); color: var(--v-warn, var(--warn)); }   /* a box that a save would write */
.unk-sign.held { background: color-mix(in srgb, var(--v-blue, var(--dv-blue)) 14%, transparent); color: var(--v-blue, var(--dv-blue)); }   /* a text Stripe holds: a submit sends it */
.unk-sign.long, .unk-sign.moved { background: color-mix(in srgb, var(--err, #ef4444) 16%, transparent); color: var(--v-err, var(--err)); }
html.v2[data-theme="dark"] .unk-sign.held { color: #8fb0ff; }
.unk-grp-b { padding: 0 12px 12px; }
.unk-box { padding-top: 10px; }
.unk-box + .unk-box { margin-top: 12px; border-top: 1px solid var(--v-line, var(--line)); }
.unk-box-h, .unk-ro-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 8px; margin-bottom: 5px; }
.unk-lb { font-size: 12.5px; font-weight: 600; color: var(--v-strong, var(--text)); overflow-wrap: anywhere; }
.unk-org { font-size: 11px; font-weight: 600; color: var(--v-muted, var(--muted)); }
.unk-org.diff { color: var(--v-warn, var(--warn)); }
.unk-org:empty { display: none; }
.unk-box textarea.fi.unk-in { display: block; width: 100%; min-width: 0; margin: 0; padding: 9px 12px; box-sizing: border-box; resize: none; overflow-y: auto;
  font-family: inherit; font-size: 16px; line-height: 1.4; -webkit-user-select: text; user-select: text; }   /* 16 px: iOS does not zoom the page on focus */
.unk-box.diff textarea.fi.unk-in { border-color: color-mix(in srgb, var(--warn, #f59e0b) 75%, transparent); }
.unk-box.over textarea.fi.unk-in { border-color: var(--v-err, var(--err)); }
.unk-box textarea.fi.unk-in[readonly] { opacity: .6; }
.unk-box-f { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: 4px; }
.unk-hint { flex: 1 1 auto; min-width: 0; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.unk-cnt { flex: none; padding-top: 2px; font-family: var(--v-mono, monospace); font-size: 10.5px; color: var(--v-muted, var(--muted)); font-variant-numeric: tabular-nums; }
.unk-long[hidden] { display: none; }
.unk-box-a:empty { display: none; }
.unk-mini { -webkit-appearance: none; appearance: none; min-height: 40px; margin: 6px 8px 0 0; padding: 6px 14px; border: 1px solid var(--v-cardbd, var(--line)); border-radius: 999px; background: var(--v-card, transparent);
  color: var(--v-strong, var(--text)); font: inherit; font-family: var(--v-sans, inherit); font-size: 12.5px; font-weight: 500; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* a box whose text at Stripe became another one after the person typed: what was typed is kept here, to be put back or thrown away */
.unk-shelf { margin-top: 8px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; color: var(--v-strong, var(--text));
  border: 1px solid color-mix(in srgb, var(--err, #ef4444) 45%, transparent); background: color-mix(in srgb, var(--err, #ef4444) 9%, transparent); }
.unk-shelf-t { margin-top: 6px; padding: 6px 8px; border-radius: 8px; max-height: 8.5em; overflow-y: auto; white-space: pre-wrap; background: rgba(127,127,127,.14); -webkit-user-select: text; user-select: text; }
.unk-shelf-a { display: flex; flex-wrap: wrap; }
/* a box whose text a read (or the answer of a save) put in the place of the one that was on the sheet: marked until the person taps Conferi */
.unk-box.chg textarea.fi.unk-in { border-color: var(--v-err, var(--err)); }
.unk-chg-l { margin-top: 6px; font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--v-err, var(--err)); }
.unk-chg-l[hidden] { display: none; }
/* read only: the text Stripe holds, as text */
.unk-ro { margin-top: 10px; }
.unk-ro-t { padding: 8px 10px; border-radius: 10px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--v-gray-bg, rgba(255,255,255,.06)); color: var(--v-strong, var(--text));
  -webkit-user-select: text; user-select: text; }
/* the end of the form: what is wrong, how it stands, the two buttons */
.unk-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--v-line, var(--line)); }
.unk-foot .un-err.unk-prob { margin: 0 0 8px; }
/* what a read replaced on the sheet, said above the buttons until the person taps Conferi (Enviar ao banco is off meanwhile) */
.unk-chg { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; color: var(--v-strong, var(--text));
  border: 1px solid color-mix(in srgb, var(--err, #ef4444) 50%, transparent); background: color-mix(in srgb, var(--err, #ef4444) 10%, transparent); }
.unk-chg b { display: block; font-weight: 600; }
.unk-chg span { display: block; margin-top: 2px; }
.unk-chg .unk-mini { margin: 8px 0 0; font-weight: 600; }
.unk-chg .unk-mini:disabled { opacity: .55; cursor: default; }
.unk-status { font-size: 12.5px; line-height: 1.45; color: var(--v-muted, var(--muted)); overflow-wrap: anywhere; }
.unk-status.warn { padding: 8px 10px; border-radius: 10px; background: color-mix(in srgb, var(--warn, #f59e0b) 14%, transparent); color: var(--v-strong, var(--text)); }
.unk-status.warn b { display: block; font-weight: 600; }
.unk-status.warn span { display: block; margin-top: 2px; }
.unk-foot-a, .unk-ask-a { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.unk-foot-a.one, .unk-ask-a.one { grid-template-columns: minmax(0, 1fr); }
.unk-foot-a .btn.sm.un-btn, .unk-ask-a .btn.sm.un-btn { width: 100%; min-width: 0; min-height: 46px; justify-content: center; white-space: normal; }
.unk-accept { text-align: center; }

/* ---- the question before the evidence goes to the bank: above the detail sheet (140) and the contact menu (160), below the toast (170) ---- */
.unk-dlg { position: fixed; inset: 0; z-index: 165; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .55);
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom)); }
.unk-dlg[hidden] { display: none; }
.unk-dlg, .unk-panel { overscroll-behavior: contain; }   /* a pull on the question never reaches the screens under it */
.unk-panel { width: 100%; max-width: 460px; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; -webkit-overflow-scrolling: touch; margin: 0; padding: 18px 16px 16px;
  box-sizing: border-box; border-radius: 18px; text-align: left; background: var(--card, #0e0f16); color: var(--v-strong, var(--text)); border: 1px solid var(--v-line, var(--line)); box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
html.v2:not([data-theme="dark"]) .unk-panel { background: #fff; }
.unk-ask-t { margin: 0 0 8px; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.unk-ask-m { margin: 0; font-size: 14px; line-height: 1.5; color: var(--v-muted, var(--muted)); overflow-wrap: anywhere; }
.unk-ask-w { margin-top: 12px; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere;
  border: 1px solid color-mix(in srgb, var(--err, #ef4444) 50%, transparent); background: color-mix(in srgb, var(--err, #ef4444) 12%, transparent); }
.unk-ask-l { margin-top: 12px; font-size: 13px; line-height: 1.45; }
.unk-ask-l p { margin: 0 0 4px; }
.unk-ask-l ul { margin: 0; padding-left: 18px; max-height: 32vh; overflow-y: auto; }
.unk-ask-l li { margin-bottom: 2px; overflow-wrap: anywhere; }
.unk-ask-n { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--v-muted, var(--muted)); }
.unk-ask-r { margin: 4px 0 0; font-size: 13.5px; }
.unk-ask-r p { margin: 0 0 6px; }
.unk-ask-r p:last-child { margin-bottom: 0; }
.unk-ask-a { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .unk-grp-c { transition: none; } }
