/* ===== Contoh v1.4: "Huruf besar" + teks bantuan lebih jelas =====
   Dimuat paling akhir di <head> pasien, admin, terapis. Palet tetap Pilihan 1 (Biru Malam & Krem). */

:root { --hb-bantu: #474F5F; }                 /* teks bantuan: 7,4:1 di krem, 8,2:1 di putih */
:root[data-tema="gelap"] { --hb-bantu: #D2CAB6; } /* 9,6:1 di #1B2333, 8,3:1 di kartu */

/* ---------- 1. Teks bantuan kecil: selalu sedikit lebih besar (≥15px) dan lebih gelap ---------- */
/* pasien */
html[data-tema] .catatan-harga,
html[data-tema] .hint,
html[data-tema] .ios-catatan,
html[data-tema] .lokasi-status,
html[data-tema] .form-box p.lokasi-status,
html[data-tema] .ket-jadwal,
html[data-tema] .form-box label.opsional,
html[data-tema] .link-prioritas,
html[data-tema] #durasi-info,
html[data-tema] .card-desc,
html[data-tema] .paket-kartu p { font-size: .9375rem; line-height: 1.5; color: var(--hb-bantu); }
html[data-tema] .catatan-harga { margin-top: 10px; }
html[data-tema] .hint { margin-top: 10px; }
html[data-tema] .site-footer, html[data-tema] .site-footer .admin-link { color: var(--hb-bantu); font-size: .9375rem; }
html[data-tema] #wa-submit::after { font-size: .875rem; opacity: 1; }
/* terapis */
html[data-tema] .meta, html[data-tema] .note { font-size: .9375rem; line-height: 1.45; color: var(--hb-bantu); }
html[data-tema] .hd small { font-size: .875rem; color: var(--hb-bantu); }
html[data-tema] .kin small { font-size: .875rem; line-height: 1.25; color: var(--hb-bantu); }
html[data-tema] .kin div { padding: 8px 6px; }
/* admin: keterangan abu-abu kecil (Tailwind text-xs) */
html[data-tema] .text-xs.text-slate-400, html[data-tema] .text-xs.text-slate-500, html[data-tema] .text-xs.text-slate-600 { font-size: .9375rem !important; line-height: 1.4 !important; }
html[data-tema]:not([data-tema="gelap"]) .text-slate-400, html[data-tema]:not([data-tema="gelap"]) .text-slate-500, html[data-tema]:not([data-tema="gelap"]) .text-slate-600 { color: var(--hb-bantu) !important; }
html[data-tema="gelap"] .text-slate-400, html[data-tema="gelap"] .text-slate-500, html[data-tema="gelap"] .text-slate-600 { color: var(--hb-bantu) !important; }
/* stempel waktu di pojok kartu pesanan admin: tidak dipotong jadi dua baris */
/* stempel waktu kartu pesanan admin: di HP pindah ke baris sendiri di bawah layanan (nama tidak lagi terdesak) */
html[data-tema] #list-pesanan article > div:first-child > span.flex-shrink-0 { font-size: .875rem !important; line-height: 1.3 !important; }
@media (max-width: 479px) {
  html[data-tema] #list-pesanan article > div:first-child { flex-wrap: wrap; row-gap: 2px; }
  html[data-tema] #list-pesanan article > div:first-child > .min-w-0 { flex: 1 1 100%; }
  html[data-tema] #list-pesanan article > div:first-child > span.flex-shrink-0 { max-width: none; text-align: left; font-size: .9375rem !important; }
}
html.huruf-besar[data-tema] #list-pesanan article > div:first-child { flex-wrap: wrap; row-gap: 2px; }
html.huruf-besar[data-tema] #list-pesanan article > div:first-child > .min-w-0 { flex: 1 1 100%; }
html.huruf-besar[data-tema] #list-pesanan article > div:first-child > span.flex-shrink-0 { max-width: none; text-align: left; font-size: .8125rem !important; }

/* ---------- 3. Ukuran tulisan besar (115% / 130% / Standar di HP yang tulisannya besar) ----------
   Skalanya dipasang assets/huruf.js di <html style="font-size">; kelas huruf-besar = penyesuaian tata letak. */
/* teks yang ukurannya px ikut membesar */
html.huruf-besar input, html.huruf-besar textarea, html.huruf-besar select,
html.huruf-besar .inp, html.huruf-besar .masuk-inp { font-size: 1rem !important; }
html.huruf-besar input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), html.huruf-besar select { min-height: 3rem; }
/* tombol: target sentuh ±1,3× (44px -> ±57px) */
html.huruf-besar button:not(.ios-sakelar):not(.sheet-close):not(.icon-btn),
html.huruf-besar .btn, html.huruf-besar .chip, html.huruf-besar a.wa-submit { min-height: 2.75rem; }
html.huruf-besar .icon-btn { min-width: 52px; min-height: 52px; }
html.huruf-besar .icon-btn svg { width: 26px; height: 26px; }
/* sakelar sedikit lebih besar */
html.huruf-besar .ios-sakelar { width: 62px; height: 37px; }
html.huruf-besar .ios-sakelar::after { width: 33px; height: 33px; }
html.huruf-besar .ios-sakelar[aria-checked="true"]::after { transform: translateX(25px); }
html.huruf-besar .ios-baris { min-height: 3.25rem; }
/* pasien: header tetap satu baris (nama mengikuti lebar layar, tidak ikut 130%) */
html.huruf-besar[data-tema] .site-header .brand-text h1 { font-size: min(1.32rem, 5vw); }
@media (max-width: 399px) { html.huruf-besar[data-tema] .site-header .brand-text h1 { font-size: min(1.14rem, 4.6vw); } html.huruf-besar .site-header .brand img { width: 36px; height: 36px; } }
html.huruf-besar[data-tema] .header-kanan { gap: 4px; }
/* pasien: langkah 1-2-3 tersusun ke bawah supaya tidak patah per kata */
@media (max-width: 559px) {
  html.huruf-besar[data-tema] .cara-pesan { flex-direction: column; align-items: stretch; gap: 10px; }
  html.huruf-besar[data-tema] .cara-item { flex-direction: row; text-align: left; gap: 14px; font-size: 1rem; }
  html.huruf-besar[data-tema] .cara-panah { display: none; }
  html.huruf-besar .cara-item .nw { white-space: normal; }
}
/* pasien: kartu layanan, tombol + Tambah turun ke bawah bila sempit */
@media (max-width: 559px) { html.huruf-besar[data-tema] .chips.domisili .chip { font-size: .85rem; } }
/* admin: bilah bawah HP, label tetap satu baris */
@media (max-width: 479px) { html.huruf-besar .lbl-penuh { display: none !important; } html.huruf-besar .lbl-pendek { display: inline !important; } }
html.huruf-besar[data-tema] .bottom-nav-item { font-size: .62rem !important; padding-left: 1px !important; padding-right: 1px !important; }
@media (max-width: 359px) { html.huruf-besar[data-tema] .bottom-nav-item { font-size: .56rem !important; } }
html.huruf-besar[data-tema] .bottom-nav-item .lbl-penuh, html.huruf-besar[data-tema] .bottom-nav-item .lbl-pendek { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.huruf-besar[data-tema] .bottom-nav-item i { font-size: 1.15rem; }
/* terapis: bilah tab bawah */
html.huruf-besar .tabs-atas button { font-size: .7rem; }
/* admin: judul halaman di header tidak dipatah di tengah kata; di HP sempit tombol "Lihat" cukup ikon */
html.huruf-besar #page-title { overflow-wrap: normal; word-break: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 399px) {
  html.huruf-besar #page-title { font-size: 1rem; }
  html.huruf-besar .tombol-kepala .sm\:hidden:not(.sr-only) { display: none; }
  html.huruf-besar .tombol-kepala { padding-left: 12px !important; padding-right: 12px !important; }
}
/* admin HP + huruf besar: panel lebih rapat supaya kartu pasien tidak sempit */
@media (max-width: 479px) {
  html.huruf-besar main .p-5, html.huruf-besar main .p-6 { padding: .75rem !important; }
  html.huruf-besar main.p-4 { padding-left: .6rem !important; padding-right: .6rem !important; }
  html.huruf-besar #list-pasien summary { padding: .75rem !important; gap: .5rem; }
  html.huruf-besar #list-pasien summary > div > div.w-10 { display: none; } /* 4 digit WA sudah tertulis di baris "WA …" */
}


/* ===== Varian 2: ketuk judul ⌄ -> menu kecil "Tampilan" (ukuran tetap dalam px) ===== */
[data-judul-menu] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.judul-menu { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.judul-menu .hd-judul { flex: 0 1 auto; }
.site-header .brand[data-judul-menu] { min-width: 0; text-decoration: none; color: inherit; }
.tp-cb { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; width: 34px; height: 44px; min-height: 44px !important; padding: 0; margin-left: -2px; border: 0; background: none; color: var(--ios-tint); cursor: pointer; font: 600 15px var(--ios-font) !important; }
.tp-cb-bulat { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 26px; background: var(--ios-tint-lembut); }
.tp-cb-bulat svg { width: 16px; height: 16px; }
.tp-cb[aria-expanded="true"] .tp-cb-bulat { background: var(--ios-tint); color: #fff; }
.tp-cb:focus-visible { outline: 2px solid var(--ios-tint); outline-offset: 2px; border-radius: 10px; }
.tp-cb-teks { display: none; }
html[data-tema="gelap"] .tp-cb { color: #D6BC84; }
html[data-tema="gelap"] .tp-cb-bulat { background: #33405A; }
html[data-tema="gelap"] .tp-cb[aria-expanded="true"] .tp-cb-bulat { background: #D6BC84; color: #1B2333; }
/* terapis, layar masuk: judul disembunyikan, tombol jadi "⌄ Tampilan" di kanan */
body.login .hd .judul-menu { justify-content: flex-end; }
body.login .hd .judul-menu > img, body.login .hd .judul-menu > .hd-judul { display: none; }
body.login .tp-cb { width: auto; padding: 0 12px 0 6px; border-radius: 999px; background: var(--ios-isi); }
body.login .tp-cb-teks { display: inline; color: var(--ios-teks); }
/* denyut lembut pada ⌄ selama gelembung petunjuk tampil (transform/opacity saja) */
.tp-cb-bulat::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid currentColor; opacity: 0; pointer-events: none; }
html.tp-petunjuk .tp-cb-bulat::after { animation: tpDenyut 1.6s ease-out infinite; }
@keyframes tpDenyut { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(1.9); opacity: 0; } }

.tp-latar { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 170; background: rgba(20,26,40,.18); }
.tp-latar[hidden], .tp-panel[hidden] { display: none !important; }
.tp-panel { position: fixed; top: 64px; left: 10px; z-index: 180; width: min(340px, calc(100vw - 20px)); max-height: calc(100vh - 80px); overflow-y: auto; overscroll-behavior: contain;
  background: #FFFDF8; color: var(--ios-teks); border: 1px solid var(--ios-garis); border-radius: 16px; box-shadow: 0 16px 40px rgba(36,49,79,.28);
  padding: 10px 14px 14px; font: 400 15px/1.35 var(--ios-font) !important; animation: tpMuncul .18s cubic-bezier(.2,.8,.2,1); transform-origin: 24px 0; }
@keyframes tpMuncul { from { opacity: 0; transform: translate3d(0,-6px,0) scale(.97); } to { opacity: 1; transform: none; } }
html[data-tema="gelap"] .tp-panel { background: var(--ios-kartu); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.tp-kepala { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; }
.tp-panel h2 { margin: 0; font: 700 17px/1.2 var(--ios-font) !important; color: var(--ios-teks); }
.tp-panel .tp-selesai { min-height: 44px !important; padding: 0 2px 0 12px; border: 0; background: none; color: var(--ios-tint); font: 600 16px var(--ios-font) !important; cursor: pointer; }
html[data-tema="gelap"] .tp-panel .tp-selesai { color: #D6BC84; }
.tp-panel .tp-sub { margin: 6px 2px 8px; font: 600 12px/1.2 var(--ios-font) !important; letter-spacing: .05em; text-transform: uppercase; color: var(--hb-bantu); }
.tp-ukuran, .tp-tema { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #EDE6D8; }
html[data-tema="gelap"] .tp-ukuran, html[data-tema="gelap"] .tp-tema { background: #1B2333; }
.tp-ukuran button, .tp-tema button { flex: 1 1 0; min-width: 0; border: 0; background: transparent; color: var(--ios-teks); border-radius: 10px; cursor: pointer; font-family: var(--ios-font); }
.tp-ukuran button { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 78px !important; padding: 8px 2px 7px; text-align: center; }
.tp-ukuran b { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1; }
.tp-ukuran .tp-a1 { font-size: 16px !important; } .tp-ukuran .tp-a2 { font-size: 21px !important; } .tp-ukuran .tp-a3 { font-size: 27px !important; }
.tp-ukuran span { margin-top: 6px; font-size: 13px !important; line-height: 1.2; }
.tp-ukuran small { font-size: 12px !important; line-height: 1.2; color: var(--hb-bantu); }
.tp-tema button { min-height: 40px !important; padding: 0 4px; font-size: 14px !important; }
.tp-ukuran button[aria-checked="true"], .tp-tema button[aria-checked="true"] { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.14); }
.tp-ukuran button[aria-checked="true"] span, .tp-tema button[aria-checked="true"] { font-weight: 700; }
.tp-ukuran button[aria-checked="true"] b { color: var(--ios-tint); }
html[data-tema="gelap"] .tp-ukuran button[aria-checked="true"], html[data-tema="gelap"] .tp-tema button[aria-checked="true"] { background: #3A4762; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
html[data-tema="gelap"] .tp-ukuran button[aria-checked="true"] b { color: #D6BC84; }
.tp-ukuran button:focus-visible, .tp-tema button:focus-visible { outline: 2px solid var(--ios-tint); outline-offset: 1px; }
.tp-panel .tp-catatan { margin: 8px 2px 0 !important; font-size: 13px !important; line-height: 1.35; color: var(--hb-bantu); }
.tp-garis { height: 1px; margin: 14px 0 8px; background: var(--ios-garis); }

/* gelembung petunjuk sekali tampil */
.tp-gelembung { position: fixed; z-index: 175; width: min(300px, calc(100vw - 20px)); padding: 13px 14px 12px; border-radius: 16px; background: #24314F; color: #F6F2EA;
  box-shadow: 0 14px 34px rgba(36,49,79,.30); font: 400 15px/1.4 var(--ios-font) !important; animation: tpMuncul .22s cubic-bezier(.2,.8,.2,1); }
.tp-gelembung::before { content: ""; position: absolute; top: -7px; left: var(--panah, 24px); width: 16px; height: 16px; border-radius: 3px; background: inherit; transform: rotate(45deg); }
.tp-gelembung p { margin: 0; position: relative; } .tp-gelembung b { color: #fff; }
.tp-gel-oke { display: flex; justify-content: flex-end; margin-top: 10px; }
.tp-gel-oke button { min-height: 36px !important; padding: 0 20px; border: 0; border-radius: 999px; background: #F6F2EA; color: #24314F; font: 700 15px var(--ios-font) !important; cursor: pointer; }
html[data-tema="gelap"] .tp-gelembung { background: #F6F2EA; color: #1B2333; box-shadow: 0 14px 34px rgba(0,0,0,.5); }
html[data-tema="gelap"] .tp-gelembung b { color: #1B2333; }
html[data-tema="gelap"] .tp-gel-oke button { background: #24314F; color: #F6F2EA; }
@media print { .tp-gelembung, .tp-panel, .tp-latar { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .tp-panel, .tp-gelembung { animation: none; } html.tp-petunjuk .tp-cb-bulat::after { animation: none; opacity: .5; transform: scale(1.35); } }
/* admin: judul + ⌄ + status tetap satu baris; "Lihat" cukup ikon bila huruf besar di HP */
@media (max-width: 639px) {
  html.huruf-besar .tombol-kepala .sm\:hidden:not(.sr-only) { display: none; }
  html.huruf-besar .tombol-kepala { padding-left: 11px !important; padding-right: 11px !important; }
}
