/* Hỗ trợ khách hàng (anh Phong 04/11/2026; design C:/AppTinhTienSo/sua-quan-tri/ho-tro/kiem/THIET-KE.md §4.5, §11): the support
   entries, the chooser (js/ho-tro.js: a dialog on a computer, a bottom sheet under 992px), #/ho-tro (js/view-ho-tro.js) and the
   owner page Quản trị → Hỗ trợ khách hàng (js/view-ho-tro-khach-hang.js). Colours only through the tokens of styles.css :root
   (they exist on the login screens and the public pages too; the theme ones change under body.has-shell), so a later light /
   dark mode applies by redefining the tokens. Classes .ht-* only, plus the entries it shows or hides. Linked in index.html
   and app.html right after css/app-login.css. */

/* ------------------------------------------------------------------ the entries: shown only while support is on
   (<html data-ho-tro="on">, set by js/ho-tro.js; nothing before the first answer, nothing when the read fails without a copy) */
html:not([data-ho-tro="on"]) .tts-support,
html:not([data-ho-tro="on"]) .tts-sheet-support,
html:not([data-ho-tro="on"]) [data-ho-tro-entry] { display: none !important; }
html[data-ho-tro="on"] [data-ho-tro-fallback] { display: none !important; } /* reserved: nothing uses it today */

/* the headset replaced the Telegram paper plane (review N9): no paper-plane nudge, the app's blue instead of Telegram's */
.tts-support-icon .ic { margin-left: 0; }
.tts-sheet-support .ic { color: var(--tts-blue); }
.public-footer-support .ic { color: var(--tts-blue); }
/* the phone Menu sheet's Hỗ trợ line: the first line under the sheet's head (app.js sheetHtml; at the end of the sheet it was
   below the fold, review 04/11/2026), a full-width row like the tiles, a 44px tap (styles.css gave it 36 / 40px) */
.tts-sheet-support,
body.has-shell .tts-sheet-support {
  height: auto; min-height: 44px; margin: -4px 0 16px; padding: 0 14px; border-radius: 12px;
  background: var(--xa-gloss); box-shadow: inset 0 0 0 .8px var(--xa-line), var(--xa-shadow); color: var(--tts-ink);
}
.tts-sheet-support .ic { font-size: 16px; }

/* ------------------------------------------------------------------ the rows (chooser, #/ho-tro, the owner's preview) */
.ht-intro { margin: 0 0 10px; color: var(--xa-muted); font: 13px/1.45 var(--font-sans); }
.ht-saved { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border: .8px solid var(--info-border);
  border-radius: 8px; background: var(--info-bg); color: var(--info-ink); font: 12.5px/1.45 var(--font-sans); }
.ht-saved .ic { flex: none; margin-top: 2px; font-size: 13px; }
.ht-list { display: flex; flex-direction: column; gap: 8px; font-family: var(--font-sans); }
.ht-row { display: flex; align-items: stretch; gap: 8px; min-width: 0; }
.ht-item {
  flex: 1 1 auto; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 7px 12px;
  border: .8px solid var(--xa-line); border-radius: 12px; background: var(--xa-gloss); box-shadow: var(--xa-shadow-flat);
  color: var(--tts-ink); text-decoration: none;
}
.ht-item:hover { border-color: var(--xa-field-line); color: var(--tts-ink); text-decoration: none; }
.ht-item:focus { outline: none; }
.ht-item:focus-visible { border-color: var(--xa-focus-line); box-shadow: 0 0 0 3px var(--focus-ring); }
.ht-item-ic {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--xa-sunk); color: var(--tts-blue); font-size: 17px;
}
.ht-item-t { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.ht-item-t strong { font-size: 14px; line-height: 19px; font-weight: 700; }
.ht-item-t small { font-size: 12.5px; line-height: 17px; color: var(--xa-muted); overflow-wrap: anywhere; }
.ht-item-go { flex: none; font-size: 13px; color: var(--xa-icon); }
.ht-copy { flex: none; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; white-space: nowrap; font-size: 13px; }
.ht-copy .ic { font-size: 13px; }
/* "Chép số" drawn like the rows on every screen (the login screens have no app theme for .btn-light: review 04/11/2026) */
.ht-row .ht-copy { border: .8px solid var(--xa-line); border-radius: 12px; background: var(--xa-gloss); box-shadow: var(--xa-shadow-flat); color: var(--tts-ink); }
.ht-row .ht-copy:hover { border-color: var(--xa-field-line); color: var(--tts-ink); }
.ht-row .ht-copy:focus { outline: none; }
.ht-row .ht-copy:focus-visible { border-color: var(--xa-focus-line); box-shadow: 0 0 0 3px var(--focus-ring); }
/* a 320–359px phone: no arrow, so a number like +84 909 000 111 stays on one line beside "Chép số" */
@media (max-width: 359.98px) {
  .ht-item-go { display: none; }
}
.ht-list.is-big .ht-item { min-height: 60px; padding: 10px 14px; }
.ht-list.is-big .ht-item-ic { width: 42px; height: 42px; font-size: 20px; }
.ht-list.is-big .ht-item-t strong { font-size: 15px; line-height: 21px; }
.ht-list.is-big .ht-item-t small { font-size: 13.5px; line-height: 19px; }
.ht-state { font: 13.5px/1.5 var(--font-sans); color: var(--tts-ink); }
.ht-state p { margin: 0 0 10px; }
.ht-state .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }
.ht-faq, .ht-owner-link a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }

/* ------------------------------------------------------------------ the chooser */
.modal-root.ht-chooser .modal-body { padding: 14px 16px 16px; }
.modal-root.ht-chooser .modal-title { font-weight: 650; color: var(--tts-ink); }
/* under 992px a bottom sheet (the pattern of the Quản trị ⋮ sheet): its own history entry, Back closes it */
@media (max-width: 991.98px) {
  .modal-root.ht-chooser .modal { display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
  .modal-root.ht-chooser .modal .modal-dialog {
    width: 100%; max-width: none; margin: 0; transform: translateY(40px); transition: transform .2s ease-out, opacity .15s;
  }
  .modal-root.ht-chooser.show .modal .modal-dialog { transform: none; }
  .modal-root.ht-chooser .modal-content {
    max-height: 86vh; border-width: 0; border-radius: 16px 16px 0 0; box-shadow: var(--xa-shadow-raised); font-family: var(--font-sans);
  }
  .modal-root.ht-chooser .modal-header { flex: none; align-items: center; padding: 10px 6px 8px 18px; border-radius: 16px 16px 0 0; box-shadow: none; }
  .modal-root.ht-chooser .modal-header .close { margin: -10px -6px -10px auto; }
  .modal-root.ht-chooser .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .modal-root.ht-chooser .modal-footer { padding-bottom: calc(12px + var(--safe-bottom)); }
  .modal-root.ht-chooser .modal-footer .btn { min-height: 44px; flex: 1 1 auto; }
}

/* ------------------------------------------------------------------ #/ho-tro */
.ht-page { max-width: 640px; font-family: var(--font-sans); }
.ht-page-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ht-page-ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--xa-sunk); color: var(--tts-blue); font-size: 22px;
}
.ht-page-head .tts-page-sub { margin-bottom: 0; }
.ht-owner-link { margin: 4px 0 0; font-size: 13px; }

/* ------------------------------------------------------------------ the owner page */
.ht-where { display: flex; align-items: flex-start; gap: 6px; max-width: 84ch; margin: 0 0 10px; padding: 8px 10px; border: .8px solid var(--xa-line-2);
  border-radius: 8px; background: var(--xa-field); color: var(--tts-ink); font-size: 12.5px; line-height: 1.45; }
.ht-where .ic { flex: none; margin-top: 2px; font-size: 13px; color: var(--tts-blue); }
.ht-form { max-width: 720px; }
.ht-general { padding-bottom: 6px; }
.ht-general .adm-switch { min-height: 44px; }
.ht-field { padding: 10px 0 12px; border-top: .8px solid var(--xa-line-2); }
.ht-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; min-height: 44px; margin-bottom: 6px; }
.ht-label { margin: 0; font-weight: 700; color: var(--tts-ink); }
.ht-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; cursor: pointer; font-weight: 600; }
.ht-hint { display: block; margin-top: 4px; }
.ht-empty { display: block; margin-top: 4px; color: var(--warn-ink); font-weight: 600; }
.ht-empty[hidden], .ht-unsaved[hidden], .ht-form .invalid-feedback[hidden] { display: none; }
.ht-preview { margin-bottom: 10px; padding: 10px; border: .8px dashed var(--xa-line); border-radius: 12px; background: var(--xa-field); }
.ht-none { margin: 0; color: var(--xa-muted); }
.ht-unsaved { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg);
  color: var(--warn-ink); font-size: 12.5px; line-height: 1.45; }
.ht-unsaved .ic { flex: none; margin-top: 2px; }
.ht-save { min-height: 40px; min-width: 120px; }
/* the placeholders are examples ("Ví dụ: …"): muted, never mistaken for a saved value (the site's own are as dark as text) */
.ht-form .form-control::placeholder { color: var(--xa-muted); opacity: 1; }
@media (max-width: 767.98px) {
  .ht-save { width: 100%; min-height: 44px; }
  /* 44px taps on a phone (review 04/11/2026): phone.css gives every #view .btn 40px, so the save button needs this weight */
  body.has-shell #view .btn.ht-save { min-height: 44px; }
  .ht-form .form-control { height: 44px; }
}
