/* =====================================================================================================
   VỎ CHUNG TRÊN ĐIỆN THOẠI — đầu trang · menu · tìm toàn màn hình · thanh dưới · chân trang (23/10/2026)
   Thiết kế RIÊNG cho màn nhỏ (không phải bản thu nhỏ của máy tính). Nạp có điều kiện media="(max-width: 860px)" sau p-brand.css.
   Đầu trang/menu/tìm: ≤ 860px. Thanh dưới + chân trang accordion + ẩn 2 dải đầu trang: ≤ 760px. Máy tính không bị ảnh hưởng.
   Luật: chạm ≥ 44px, chữ nguyên px (14 / 12 / 11), token --ds-*, màu chính --brand*, nút phẳng, không vạch trái, không hiện thanh cuộn.
   ===================================================================================================== */

/* sửa gốc: `html, body { overflow-x: hidden }` (dental.css, ≤ 760px) biến body thành khung cuộn → đầu trang position:sticky không dính khi cuộn. `clip` vẫn chặn tràn ngang nhưng không tạo khung cuộn. */
html, body { overflow-x: clip; }

/* ---------- ĐẦU TRANG 56px: logo | ô tìm dạng nút | chuông / Đăng nhập | ≡ ---------- */
.hv-main > .hv-in, .hv-hd.is-scrolled .hv-main > .hv-in { height: 56px; gap: 6px; }
.hv-logo, .hv-hd.is-scrolled .hv-logo { width: 34px; height: 34px; margin-right: 2px; }
.hv-cat .hv-bg, .hv-cat .hv-bx { display: none; }
.hv-cat { order: 3; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; border-radius: 8px; background: transparent; justify-content: center; }
.hv-cat:hover, .hv-cat[aria-expanded="true"] { background: transparent; border: 0; }
.hv-cat .hv-cat-d, .hv-cat > span:not(.hv-bg):not(.hv-bx), .hv-cat .cv { display: none; }
/* ≡ vẽ bằng CSS (3 vạch 2px) và ✕ khi menu mở — nét mảnh, hợp với icon Phosphor */
.hv-cat .hv-bg { display: block; position: relative; width: 20px; height: 2px; border-radius: 1px; background: var(--ds-ink-900); box-shadow: 0 -6px 0 var(--ds-ink-900), 0 6px 0 var(--ds-ink-900); }
.hv-cat[aria-expanded="true"] .hv-bg { display: none; }
.hv-cat[aria-expanded="true"] .hv-bx { display: block; position: relative; width: 20px; height: 2px; background: transparent; }
.hv-cat .hv-bx::before, .hv-cat .hv-bx::after { content: ''; position: absolute; left: 0; top: 0; width: 20px; height: 2px; border-radius: 1px; background: var(--ds-ink-900); transform: rotate(45deg); }
.hv-cat .hv-bx::after { transform: rotate(-45deg); }
.hv-sx--hd { order: 1; flex: 1 1 auto; min-width: 0; max-width: none; }
.hv-right { order: 2; margin-left: 0; gap: 0; }
.hv-right > .ds-btn, .hv-right > .hv-ib, .hv-hd.is-scrolled .hv-ib { display: none; }
/* ô tìm = nút: cao 40px, MỘT viền, một dòng chữ mờ (bấm → tìm toàn màn hình) */
.hv-sx--hd .hv-sx-f { height: 40px; padding: 0 10px; gap: 8px; border-radius: 8px; }
.hv-sx--hd .hv-sx-f > i { font-size: 18px; }
.hv-sx--hd .hv-sx-f input { font-size: 14px; text-overflow: ellipsis; }
.hv-sx--hd kbd { display: none !important; }
/* chuông (đã đăng nhập) / Đăng nhập (chưa); chuyển tư cách nằm ở Tài khoản (thanh dưới) */
.hv-acc { margin-left: 0; gap: 0; }
.hv-acc .actsw { display: none; }
.hv-acc .hbell-b { width: 44px; height: 44px; font-size: 22px; }
.hv-acc > a[href="/dang-nhap"] { display: inline-flex; align-items: center; height: 44px; padding: 0 8px; font-size: 14px; font-weight: var(--ds-fw-600); white-space: nowrap; color: var(--brand-ink, var(--ds-blue-600)); }
.hv-acc > a[href="/dang-nhap"] i { display: none; }
.hv-acc .hbell-p { position: fixed; left: 8px; right: 8px; top: 60px; width: auto; max-width: none; }

/* ---------- TÌM TOÀN MÀN HÌNH: thanh nhập + "Huỷ" ở trên, gợi ý cuộn ở dưới ---------- */
.hv-sx--hd.is-open { position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column; padding: 8px 12px 0; background: #fff; }
.hv-sx--hd.is-open .hv-sx-f { flex: none; height: 44px; }
.hv-sx--hd.is-open .hv-sx-x { display: inline-flex; align-items: center; flex: none; height: 44px; margin-right: -4px; padding: 0 10px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: var(--ds-fw-600); color: var(--brand-ink, var(--ds-blue-600)); }
.hv-sx--hd.is-open .hv-sx-p { position: static; flex: 1; min-height: 0; min-width: 0; max-height: none; margin-top: 4px; padding: 4px 0 24px; border: 0; border-radius: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
.hv-sx--hd.is-open .hv-sx-idle { grid-template-columns: 1fr; }
.hv-sx--hd.is-open .hv-sx-i, .hv-sx--hd.is-open .hv-sx-cat { min-height: 48px; }
html:has(.hv-sx--hd.is-open), html:has(#hvMega.is-open) { overflow: hidden; }
html:has(.hv-sx--hd.is-open) :is(.ast-fab, .dk-fab, .to-top, .mnav, .cb-fab), html:has(#hvMega.is-open) :is(.ast-fab, .dk-fab, .to-top, .cb-fab) { display: none !important; }

/* ---------- MENU TOÀN MÀN HÌNH: Địa điểm → 5 nhóm đóng/mở → tỉnh nổi bật → trợ giúp / tổng đài / ứng dụng ---------- */
.hv-mega, .hv-hd.is-scrolled .hv-mega { top: 56px; z-index: 90; border-width: 1px 0 0; box-shadow: none; transform: none; }
.hv-ov { display: none; }
.hv-mega-in, .hv-mega-in.no-owner { padding: 0 0 8px; width: calc(100% - 24px); }
.hv-mega-loc { display: flex; align-items: center; gap: 12px; min-height: 60px; border-bottom: 1px solid var(--ds-line); color: var(--ds-ink-900); }
.hv-mega-loc .ic { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 6px; font-size: 18px; }
.hv-mega-loc .tx { min-width: 0; flex: 1; line-height: 1.3; }
.hv-mega-loc small { display: block; font-size: 11px; color: var(--ds-ink-500); }
.hv-mega-loc b { display: block; font-size: 14px; font-weight: var(--ds-fw-700); }
.hv-mega-loc .chg { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: var(--ds-fw-600); color: var(--brand-ink, var(--ds-blue-600)); }
.hv-mg h4 { min-height: 52px; font-size: 14px; font-weight: var(--ds-fw-700); }
.hv-mg h4 > i:first-child { font-size: 18px; }
.hv-mg a.hv-mi { min-height: 48px; font-size: 14px; }
.hv-mg-side { padding: 12px 0 4px; }
.hv-mg-side h4 { min-height: 32px; }
.hv-mp a { height: 44px; font-size: 14px; }
.hv-mega-ad { display: none; }
.hv-mega-ft { display: block; position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--ds-line); }
.hv-mega-ft .hv-in { width: calc(100% - 24px); height: auto; padding: 4px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 8px; font-size: 13px; }
.hv-mega-ft a { min-height: 44px; }

@media (max-width: 760px) {
  /* hai dải đầu trang (tải app, "xác nhận nha khoa miễn phí") không hiện trên điện thoại */
  .appbar, .appbar.on, .ds-topbar, .ds-topbar-open, .ds-topbar-open.is-on { display: none !important; }

  /* ---------- THANH DƯỚI: Trang chủ · Nha khoa · [Đặt hẹn nổi] · Voucher · Tài khoản ---------- */
  body .mnav { z-index: 50; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ds-line); box-shadow: none; background: #fff; }
  body .mnav :is(a, button) { position: relative; justify-content: center; min-height: 48px; padding: 4px 0 2px; border: 0; background: none; font-family: inherit; font-size: 11px; font-weight: var(--ds-fw-600); line-height: 1.2; color: var(--ds-ink-500); }
  body .mnav :is(a, button) i { font-size: 22px; }
  body .mnav :is(a, button).on, body .mnav :is(a, button).book { color: var(--brand-ink, var(--ds-blue-600)); }
  body .mnav .book span.c { width: 48px; height: 48px; margin-top: -24px; border: 3px solid #fff; background: var(--brand-btn, #3672da); box-shadow: none; }
  body .mnav .book span.c i { font-size: 22px; color: #fff; }
  body .mnav .book small { margin-top: -2px; color: var(--brand-ink, var(--ds-blue-600)); font-size: 11px; font-weight: var(--ds-fw-600); }

  /* ---------- CHÂN TRANG: dải gọi/nhận tin gọn → giới thiệu 1 dòng → thẻ ĐÓNG/MỞ → tải app → bản quyền ---------- */
  .v3f { margin-top: 32px; }
  .v3f .ds-wrap { width: calc(100% - 24px); }
  /* dải tổng đài + nhận voucher: một khối phẳng, 2 hàng */
  .v3f-strip { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: -24px; padding: 12px; border-radius: 8px; box-shadow: none; }
  .v3f-strip .it { padding: 0; align-items: center; gap: 10px; }
  .v3f-strip .it > i { width: 36px; height: 36px; font-size: 18px; }
  .v3f-strip b { font-size: 14px; }
  .v3f-strip .it small { margin-top: 0; line-height: 1.35; }
  .v3f-strip .it:first-child b a { display: inline-flex; align-items: center; min-height: 36px; font-size: 16px; font-weight: var(--ds-fw-800); }
  .v3f-strip .it + .it { padding-top: 8px; border-top: 1px solid var(--ds-line); }
  .v3f-strip .it + .it > i { display: none; } .v3f-strip .it + .it small { display: none; }
  .v3f-strip .nl { display: block; }
  .v3f .fnl.nl .form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: stretch; margin: 0; }
  .v3f .fnl.nl .form-grid > div { display: block; flex: none; min-width: 0; margin: 0; }
  .v3f .fnl.nl .form-grid > .full { grid-column: 1 / -1; }
  .v3f-strip .nl .form-label { display: none; }
  .v3f-strip .nl input { height: 44px; width: 100%; font-size: 14px; }
  .v3f-strip .nl .btn, .v3f-strip .nl .ds-btn { width: 100%; height: 44px; justify-content: center; }
  .v3f-main { padding-top: 40px; }

  /* khối thương hiệu gọn: logo + khẩu hiệu một khối, ẩn số liệu/chi tiết (đã có ở dòng bản quyền) */
  .v3f-cols { display: block; padding-bottom: 0; }
  .v3f .about { gap: 10px; padding: 0 0 12px; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .v3f .about::before { display: none; }
  .v3f .about .ct, .v3f .about .nums { display: none; }
  .v3f .about .slogan { margin: 0; font-size: 12px; line-height: 1.5; color: var(--ds-ink-500); }
  .v3f .soc a { width: 44px; height: 44px; }

  /* ---- ACCORDION: .is-acc do p-foot.js gắn; thẻ đóng chỉ ẩn phần thân (vẫn có trong HTML cho SEO) ---- */
  .v3f .col.is-acc, .v3f .bn.is-acc, .v3f-about.is-acc { display: grid; align-content: start; border-top: 1px solid var(--ds-line); gap: 0; }
  .v3f .col.is-acc h4, .v3f .bn.is-acc > .bn-h, .v3f-about.is-acc > .lb { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0; padding: 0; cursor: pointer; font-size: 14px; font-weight: var(--ds-fw-700); letter-spacing: 0; text-transform: none; color: var(--ds-ink-900); -webkit-tap-highlight-color: transparent; }
  .v3f .col.is-acc h4 .cv, .v3f .bn.is-acc > .bn-h .cv, .v3f-about.is-acc > .lb .cv { display: block; flex: none; width: auto; height: auto; margin-left: auto; background: none; font-size: 14px; color: var(--ds-ink-500); transition: transform .2s var(--ds-ease); }
  .v3f .is-acc.is-open > h4 .cv, .v3f .is-acc.is-open > .bn-h .cv, .v3f-about.is-acc.is-open > .lb .cv { transform: rotate(180deg); }
  .v3f .bn-h > i:first-child { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 4px; background: var(--ds-blue-100); color: var(--ds-blue-700); font-size: 14px; }
  .v3f .col.is-acc:not(.is-open) > :not(h4), .v3f .bn.is-acc:not(.is-open) > :not(.bn-h), .v3f-about.is-acc:not(.is-open) > :not(.lb) { display: none; }
  .v3f .col.is-acc.is-open { padding-bottom: 12px; }
  .v3f .col.is-acc.is-open > :not(h4) { margin-left: 36px; }
  .v3f .col.is-acc a { width: auto; min-height: 40px; display: flex; align-items: center; font-size: 14px; }
  .v3f .col.is-acc a::after { display: none; }
  .v3f .col.is-acc b { margin-top: 8px; }
  .v3f .col-fold a.more { display: flex; } .v3f .col-fold .v3f-more { display: none; } /* thẻ đã gập sẵn → hiện đủ tỉnh/thành, không cần "xem thêm" */
  /* 3 banner → chỉ còn nút hành động + danh sách liên kết khi mở */
  .v3f-bns { display: block; margin-top: 0; }
  .v3f-bns .bn.is-acc { border-radius: 0; border-width: 1px 0 0; background: none; overflow: visible; transition: none; }
  .v3f-bns .bn:hover { transform: none; box-shadow: none; }
  .v3f-bns .bn.is-acc .top { display: block; min-height: 0; padding: 0 0 4px; background: none; color: var(--ds-ink-900); }
  .v3f-bns .bn.is-acc .top::before, .v3f-bns .bn.is-acc .top::after, .v3f-bns .bn.is-acc .art, .v3f-bns .bn.is-acc .tx > .eb, .v3f-bns .bn.is-acc .tx > b, .v3f-bns .bn.is-acc .tx > small { display: none; }
  .v3f-bns .bn.is-acc .go i { color: #fff; }
  .v3f-bns .bn.is-acc .go { height: 44px; margin: 0 0 4px 36px; padding: 0 16px; border-radius: 6px; background: var(--brand-btn, #3672da); color: #fff; font-size: 14px; }
  .v3f-bns .bn.is-acc .lk { display: grid; gap: 0; padding: 0 0 12px 36px; }
  .v3f-bns .bn.is-acc .lk li { display: flex; flex-wrap: wrap; gap: 6px; } .v3f-bns .bn.is-acc .lk a { min-height: 44px; font-size: 14px; }
  .v3f-bns .bn.is-acc .lk li:has(.chip) { padding: 4px 0 8px; }
  .v3f-cbs { margin-top: 8px; }

  /* tải app: KHÔNG đóng mở — mỗi ứng dụng một hàng gọn (tên + 1 dòng chữ), 2 nút cửa hàng ngang nhau */
  .v3f-apps { grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 0 0; padding-top: 14px; border-top: 1px solid var(--ds-line); }
  .v3f-apps .app { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; padding: 12px; border-radius: 8px; }
  .v3f-apps .app::after, .v3f-apps .qr { display: none; }
  .v3f-apps .ph { width: 40px; height: 40px; border-radius: 6px; font-size: 22px; }
  .v3f-apps .eb { display: none; }
  .v3f-apps .tx b { font-size: 14px; font-weight: var(--ds-fw-700); }
  .v3f-apps .tx small { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
  .v3f-apps .st { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
  .v3f .store { justify-content: center; height: 44px; padding: 0 8px; font-size: 13px; }
  .v3f .store i { font-size: 20px; }

  /* giới thiệu dài + từ khoá: một thẻ đóng/mở */
  .v3f-about { margin-top: 0; padding-top: 0; gap: 0; }
  .v3f-about.is-acc > .lb i:first-child { color: var(--ds-blue-500); font-size: 16px; }
  .v3f-about.is-acc.is-open { padding-bottom: 12px; }
  .v3f-about .txt { grid-template-columns: 1fr; gap: 10px; padding-top: 2px; }
  .v3f .kws { margin-top: 10px; }
  .v3f .kws a { height: 32px; font-size: 12px; }

  /* bản quyền + pháp lý: MỘT khối gọn */
  .v3f-bar { margin-top: 12px; }
  .v3f-bar .ds-wrap { display: grid; gap: 8px; padding: 14px 0 calc(76px + env(safe-area-inset-bottom)); font-size: 12px; line-height: 1.5; }
  .v3f-bar .cp { display: grid; gap: 2px; }
  .v3f-bar .lk { gap: 0 16px; }
  .v3f-bar .lk a { display: inline-flex; align-items: center; min-height: 36px; }
  .v3f-bar .lk .by { flex-basis: 100%; font-size: 11px; color: var(--ds-ink-400); }
}
