/* Teman Kebaikan — shell responsif desktop (T1, Nov 2026).
   Dimuat paling akhir di nuxt.config.ts supaya menang atas main.css / custom.css / style.css.
   Di bawah 992px tidak ada yang berubah: tampilan PWA ponsel tetap seperti sebelumnya. */

:root {
  --tk-brand: #005180; --tk-brand-ink: #003a5c; --tk-brand-tint: #e3eff7; --tk-brand-wash: #f1f7fb;
  --tk-amber: #f0a03a; --tk-amber-ink: #8a4b00; --tk-amber-tint: #fdf0dd;
  --tk-ink: #10283a; --tk-ink-2: #3d5466; --tk-ink-3: #5f7383; --tk-line: #d9e3ea; --tk-bg: #f6f9fb;
  --tk-font: Figtree, Inter, system-ui, sans-serif;
  --tk-nav-h: 72px;
  --tk-col: 480px;
}

@media (min-width: 992px) {
  body { background: var(--tk-bg); }

  /* Navigasi bawah (TheHeader) hanya untuk ponsel. Kelas .desktop-navigation.fixed-bottom juga dipakai
     untuk tombol aksi (Lanjutkan Pembayaran, Bayar, Kirim laporan), jadi yang disembunyikan hanya bar yang
     berisi menu bawah. Tombol aksi tetap tampil, dikunci selebar kolom. */
  .menu-mobile-bottom, .desktop-navigation.fixed-bottom:has(.menu-mobile-bottom), .navbar-mobile { display: none !important; }
  .tk-shell:not(.page-wide) .desktop-navigation.fixed-bottom:not(:has(.menu-mobile-bottom)) {
    max-width: var(--tk-col); left: 50%; right: auto; width: 100%; transform: translateX(-50%);
  }

  /* ---------- Halaman kolom (bawaan) ---------- */
  .tk-shell:not(.page-wide) .content-box {
    max-width: var(--tk-col);
    background: #fff;
    min-height: calc(100vh - var(--tk-nav-h));
    border-left: 1px solid var(--tk-line);
    border-right: 1px solid var(--tk-line);
  }
  /* Header kembali di halaman dalam: tetap di dalam kolom, di bawah navbar desktop */
  .tk-shell:not(.page-wide) .content-box header.nav-fixed {
    top: var(--tk-nav-h);
    left: 50%;
    width: var(--tk-col);
    transform: translateX(-50%);
  }
  .tk-shell .content-box header .nav,
  .tk-shell:not(.page-wide) .content-home .section-header,
  .tk-shell:not(.page-wide) .content-program .section-header,
  .tk-shell:not(.page-wide) .content-program-detail .section-header,
  .tk-shell:not(.page-wide) .content-program-detail .banner,
  .tk-shell:not(.page-wide) footer,
  .tk-shell:not(.page-wide) .section-popup { max-width: var(--tk-col); }
  /* section-header beranda lama dipasang absolute di atas konten: geser di bawah navbar */
  .tk-shell:not(.page-wide) .content-home .section-header,
  .tk-shell:not(.page-wide) .content-program-detail .section-header { top: var(--tk-nav-h); }

  /* Logo dan pencarian versi ponsel di beranda lama digantikan navbar desktop */
  .tk-shell .content-home .section-header .img-logo { visibility: hidden; }

  /* ---------- Halaman lebar ---------- */
  .tk-shell.page-wide .content-box { max-width: none; overflow: visible; }
  .tk-shell.page-wide .content-box header.nav-fixed { display: none; }
  .tk-shell.page-wide .padding-nav { padding-top: 0 !important; }
  .tk-shell.page-wide footer { max-width: 1200px; }
}

@media (prefers-reduced-motion: reduce) {
  .tk-shell * { transition: none !important; animation: none !important; }
}

@media (min-width: 992px) {
  /* Tombol WhatsApp melayang: pojok kanan bawah, tidak menutupi konten */
  .tk-shell .show-btn-bottom { width: auto; left: auto; right: 24px; bottom: 24px; text-align: right; }
  /* Footer selebar layar di halaman lebar, isi tetap sejajar kontainer 1200px */
  .tk-shell.page-wide footer { max-width: none; padding-left: max(20px, calc((100% - 1200px) / 2 + 16px)); padding-right: max(20px, calc((100% - 1200px) / 2 + 16px)); }
}

@media (min-width: 992px) {
  /* Footer desktop baru mengatur lebarnya sendiri */
  .tk-shell footer.ft-desk { max-width: none; padding: 0; margin-left: 0; }
}

/* ---------- Halaman bantuan (FAQ, Pusat Bantuan, S&K, Privasi) ---------- */
@media (min-width: 992px) {
  .tk-shell.page-doc .doc-wrap { max-width: 1120px; margin: 0 auto; padding: 40px 16px 96px; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .tk-shell.page-doc .content-box { max-width: 820px !important; width: 100%; margin: 0; min-height: 0 !important; background: #fff; border: 1px solid var(--tk-line) !important; border-radius: 20px; padding: 0 !important; overflow: visible; }
  .tk-shell.page-doc .content-box header.nav-fixed { display: none; }
  .tk-shell.page-doc .section-container { padding: 44px 52px 52px !important; font-family: var(--tk-font); }
  .tk-shell.page-doc .section-container .txt-sub-title,
  .tk-shell.page-doc .sec-inner-page > h5:first-child { font-size: 32px !important; font-weight: 800 !important; letter-spacing: -.01em; color: var(--tk-brand-ink) !important; text-transform: none; margin: 0 0 8px; line-height: 1.2; }
  .tk-shell.page-doc .sec-inner-page > h5:first-child { margin-top: 0 !important; font-size: 32px !important; }
  .tk-shell.page-doc .sec-inner-page h5 { text-align: left !important; font-size: 20px; font-weight: 800; color: var(--tk-ink); margin: 40px 0 12px; scroll-margin-top: calc(var(--tk-nav-h) + 24px); letter-spacing: .01em; }
  .tk-shell.page-doc .sec-inner-page p,
  .tk-shell.page-doc .sec-inner-page li { font-size: 16px; line-height: 1.75; color: var(--tk-ink-2); max-width: 70ch; }
  .tk-shell.page-doc .sec-inner-page li { margin-bottom: 6px; }
  .tk-shell.page-doc .sec-inner-page b { color: var(--tk-ink); }
  .tk-shell.page-doc .section-container .txt-body,
  .tk-shell.page-doc .section-container .txt-body-gray { font-size: 16px; line-height: 1.65; }
  /* FAQ dan Pusat Bantuan: baris pilihan lebih lega */
  .tk-shell.page-doc .select-button-bordered { padding: 18px 20px !important; border-radius: 14px !important; cursor: pointer; transition: border-color .2s, background-color .2s; }
  .tk-shell.page-doc .select-button-bordered:hover { border-color: #1f4f9a !important; background: #f7fafd; }
  .tk-shell.page-doc .select-button-bordered .txt-body { font-size: 16px; font-weight: 600; color: var(--tk-ink); }
  .tk-shell.page-doc .box-secondary { padding: 16px 20px !important; font-size: 15px; line-height: 1.7; border-radius: 0 0 14px 14px; }
  .tk-shell.page-doc .section-container > .btn-block { max-width: 280px; margin: 0 auto; }
}

/* ---------- Form donasi (form1-3): dua kolom ---------- */
@media (min-width: 992px) {
  .tk-shell.page-don .don-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 16px 96px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
  .tk-shell.page-don .content-box { max-width: none !important; width: 100%; margin: 0; min-height: 0 !important; border: 1px solid var(--tk-line) !important; border-radius: 20px; overflow: visible; padding-top: 0 !important; padding-bottom: 0 !important; }
  .tk-shell.page-don .content-box header.nav-fixed { display: none; }
  /* Tombol aksi ada di awal markup; di desktop dipindah ke bawah form. Kartu program dipindah ke kolom kanan. */
  .tk-shell.page-don .content-box { display: flex; flex-direction: column; }
  .tk-shell.page-don .content-box > .desktop-navigation.fixed-bottom { order: 99; }
  .tk-shell.page-don .content-box > .section-payment:has(.widget-campaign),
  .tk-shell.page-don .content-box > .section-payment:has(.widget-campaign) + .content-space { display: none; }
  .tk-shell.page-don .content-box > .section-payment:first-of-type { border-radius: 20px 20px 0 0; }
  .tk-shell.page-don .desktop-navigation.fixed-bottom:not(:has(.menu-mobile-bottom)) {
    position: sticky !important; bottom: 0; left: auto !important; transform: none !important; max-width: none !important; width: 100% !important;
    border-radius: 0 0 20px 20px; border-top: 1px solid var(--tk-line); background: #fff;
  }
}

/* ---------- Halaman akun (Masuk, Daftar, Lupa sandi, OTP) ---------- */
@media (min-width: 992px) {
  .tk-shell.page-auth .auth-wrap { max-width: 1040px; margin: 0 auto; padding: 40px 16px 80px; display: grid; grid-template-columns: 1fr 460px; gap: 32px; align-items: stretch; }
  .tk-shell.page-auth .content-box { max-width: none !important; width: 100%; margin: 0; min-height: 0 !important; background: #fff !important; border: 1px solid var(--tk-line) !important; border-radius: 24px; overflow: hidden; padding: 20px 8px 28px !important; align-self: stretch; }
  .tk-shell.page-auth .content-box .custom-header-login,
  .tk-shell.page-auth .content-box header.nav-fixed { position: static !important; transform: none !important; width: auto !important; box-shadow: none !important; border: 0 !important; background: transparent !important; font-size: 22px !important; font-weight: 800; color: var(--tk-brand-ink); }
  .tk-shell.page-auth .content-box .custom-header-login img,
  .tk-shell.page-auth .content-box header.nav-fixed img { display: none; }
  .tk-shell.page-auth .content-box .custom-header-login > div { font-size: 26px !important; font-weight: 800; }
  .tk-shell.page-auth .content-box .bg-gray, .tk-shell.page-auth .content-box.bg-gray { background: #fff !important; }
  .tk-shell.page-auth .content-box input.input-data { height: 46px; border-radius: 10px; }
}

/* ---------- Ponsel: logo WhatsApp muncul dari kanan secara berkala ----------
   Satu siklus 15 detik: tersembunyi, geser masuk dari kanan, tampak sekitar 5 detik, geser keluar.
   Berhenti saat disentuh atau difokus. Dengan prefers-reduced-motion logo tampil diam, tanpa animasi. */
@media (max-width: 991px) {
  .tk-shell .show-btn-bottom { display: block !important; position: fixed; left: auto; right: 0; width: auto; text-align: right; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 25; pointer-events: none; }
  .tk-shell .floating-hubungi-kami { pointer-events: auto; display: block !important; font-size: 0 !important; line-height: 0 !important; width: 54px; height: 54px; min-width: 0 !important; margin: 0 12px 0 0 !important; padding: 0 !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; animation: tk-wa-peek 15s infinite; -webkit-tap-highlight-color: transparent; }
  .tk-shell .floating-hubungi-kami img { content: url("/img/icons/wa-logo.svg"); display: block; width: 54px !important; height: 54px !important; margin: 0 !important; padding: 0 !important; filter: drop-shadow(0 6px 10px rgba(16, 40, 58, .28)); }
  /* Bubble teks di sisi kiri logo, ikut meluncur bersama logo */
  .tk-shell .floating-hubungi-kami { position: relative; }
  .tk-shell .floating-hubungi-kami::before { content: "Butuh bantuan?"; position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); white-space: nowrap; padding: 9px 14px; border-radius: 16px; background: #fff; border: 1px solid #e3eaf1; box-shadow: 0 8px 20px -10px rgba(16, 40, 58, .4); color: #10283a; font: 700 12.5px/1.2 var(--tk-font, sans-serif); }
  .tk-shell .floating-hubungi-kami::after { content: ""; position: absolute; right: calc(100% + 5px); top: 50%; width: 10px; height: 10px; transform: translateY(-50%) rotate(45deg); background: #fff; border-top: 1px solid #e3eaf1; border-right: 1px solid #e3eaf1; }
  .tk-shell .floating-hubungi-kami:active, .tk-shell .floating-hubungi-kami:focus-visible { animation-play-state: paused; }
  .tk-shell .floating-hubungi-kami:focus-visible { outline: 3px solid var(--tk-amber); outline-offset: 3px; border-radius: 50% !important; }
  @keyframes tk-wa-peek {
    0%, 34.9% { transform: translateX(calc(100% + 16px)); visibility: hidden; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
    38.5%, 71.5% { transform: translateX(0); visibility: visible; animation-timing-function: cubic-bezier(.7, 0, .84, 0); }
    75%, 100% { transform: translateX(calc(100% + 16px)); visibility: hidden; }
  }
}
@media (max-width: 991px) and (prefers-reduced-motion: reduce) {
  .tk-shell .floating-hubungi-kami { animation: none; transform: none; visibility: visible; }
  .tk-shell .floating-hubungi-kami::before, .tk-shell .floating-hubungi-kami::after { display: none; }
}

/* ---------- Lebar ponsel: ikuti lebar layar ----------
   main.css membatasi isi di 411px dan menempel ke kiri (warisan tampilan PWA lama). Di iPhone Plus/Pro Max (428-440px)
   itu meninggalkan strip abu-abu di kanan dan membuat menu bawah tidak sejajar dengan isi. */
@media (max-width: 991px) {
  body { background: var(--tk-bg); }
  .tk-shell .content-box { max-width: 520px; margin-left: auto; margin-right: auto; }
  .tk-shell.page-wide .content-box { max-width: none; }
  .tk-shell .content-box header .nav,
  .tk-shell .content-home .section-header,
  .tk-shell .content-program .section-header,
  .tk-shell .content-program-detail .section-header,
  .tk-shell .content-program-detail .banner,
  .tk-shell .section-popup { max-width: 520px; }
  .tk-shell footer.ft-desk { max-width: none; margin: 0; padding: 0; }
}

/* Halaman masuk/daftar di ponsel: satu kartu putih bersih, tanpa pita abu-abu antar bagian */
@media (max-width: 991px) {
  .tk-shell.page-auth, .tk-shell.page-auth .auth-wrap { background: #fff; }
  .tk-shell.page-auth .content-box { background: #fff !important; min-height: 0 !important; }
  .tk-shell.page-auth .content-box .bg-gray, .tk-shell.page-auth .content-box .section-custom { background: #fff !important; }
  .tk-shell.page-auth .content-box .custom-header-login { display: none !important; }
  .tk-shell.page-auth .content-box .section-custom { margin: 0 !important; padding-top: 6px !important; }
  .tk-shell.page-auth .content-box input.input-data { height: 48px; border-radius: 12px; }
  .tk-shell.page-auth .content-box .btn, .tk-shell.page-auth .content-box button.btn-primary { border-radius: 12px; }
  .tk-shell.page-auth .content-box .section-custom + .section-custom:last-of-type { border-top: 1px solid var(--tk-line); margin-top: 12px !important; padding-top: 20px !important; }
}
@media (max-width: 991px) { body:has(.tk-shell.page-auth), html:has(.tk-shell.page-auth) { background: #fff !important; } }
@media (min-width: 992px) { .tk-shell.page-auth .content-box { display: flex; flex-direction: column; justify-content: center; } }

/* Pemisah "atau" + tombol Google di halaman masuk/daftar */
.tk-shell.page-auth .auth-or { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; color: var(--tk-ink-3, #6b7a89); font-size: 13px; }
.tk-shell.page-auth .auth-or::before, .tk-shell.page-auth .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--tk-line, #e1e8ef); }
.tk-shell.page-auth .section-container.bg-white { padding-top: 0 !important; }
.tk-shell.page-auth .section-container button.btn-outline-secondary { display: flex; align-items: center; justify-content: center; gap: 10px; height: 48px; margin-top: 0 !important; border: 1px solid var(--tk-line, #d5dee8); border-radius: 12px; background: #fff; font-size: 15px; }
.tk-shell.page-auth .section-container button.btn-outline-secondary img { width: 20px; height: 20px; padding: 0; margin: 0; }

/* Formulir halaman akun (Data Diri, Kata Sandi, Ganti Email/HP) */
.af-card { background: #fff; border: 1px solid var(--tk-line, #d9e3ea); border-radius: 18px; padding: 20px 16px; margin-bottom: 16px; }
.af-card h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--tk-ink-3, #5f7383); margin: 0 0 14px; }
.af-f { margin-bottom: 16px; }
.af-f label, .af-lbl { display: block; font-size: 14px; font-weight: 600; color: var(--tk-ink-2, #3d5466); margin-bottom: 6px; }
.af-in { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--tk-line, #d0dbe5); border-radius: 12px; background: #fff; font: 400 16px var(--tk-font, sans-serif); color: var(--tk-ink, #10283a); transition: border-color .2s, box-shadow .2s; }
.af-in:focus { outline: none; border-color: #1f4f9a; box-shadow: 0 0 0 3px rgba(31, 79, 154, .14); }
.af-in[readonly] { background: #f3f6f9; color: var(--tk-ink-3, #5f7383); }
.af-in.bad { border-color: #c0392b; }
.af-wrapw { position: relative; }
.af-wrapw .af-in { padding-right: 48px; }
.af-eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: none; color: var(--tk-ink-3, #5f7383); cursor: pointer; border-radius: 10px; }
.af-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.af-eye:focus-visible { outline: 3px solid var(--tk-amber, #f0a03a); }
.af-err { margin: 6px 0 0; font-size: 13px; color: #b3261e; }
.af-hint { margin: 6px 0 0; font-size: 13px; color: var(--tk-ink-3, #5f7383); line-height: 1.45; }
.af-btn { width: 100%; height: 50px; border: 0; border-radius: 14px; background: #1f4f9a; color: #fff; font: 700 16px var(--tk-font, sans-serif); cursor: pointer; transition: background-color .2s; }
.af-btn:hover:not(:disabled) { background: #173d78; }
.af-btn:disabled { background: #c6d3e2; cursor: not-allowed; }
.af-btn.ghost { background: #fff; color: #1f4f9a; border: 1.5px solid #1f4f9a; }
.af-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #fff7e6; color: #7a4d00; font-size: 14px; line-height: 1.45; margin-bottom: 16px; }
.af-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.af-row + .af-row { border-top: 1px solid #edf2f6; }
.af-row small { display: block; font-size: 13px; color: var(--tk-ink-3, #5f7383); }
.af-row b { font-size: 15px; font-weight: 700; word-break: break-all; }
.af-link { flex: none; padding: 8px 14px; border-radius: 10px; border: 1.5px solid #1f4f9a; color: #1f4f9a; font-weight: 700; font-size: 14px; text-decoration: none; background: #fff; }
.af-link:hover { background: #eef4fb; }
.af-av { display: flex; align-items: center; gap: 16px; }
.af-av img, .af-av .ph { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #e3edf9; color: #1f4f9a; display: grid; place-items: center; font-weight: 800; font-size: 26px; flex: none; }
.af-otp { display: flex; gap: 10px; justify-content: center; margin: 8px 0 14px; }
.af-otp input { width: 56px; height: 62px; text-align: center; font: 700 26px var(--tk-font, sans-serif); border: 1px solid var(--tk-line, #d0dbe5); border-radius: 14px; }
.af-otp input:focus { outline: none; border-color: #1f4f9a; box-shadow: 0 0 0 3px rgba(31, 79, 154, .14); }
.af-state { padding: 36px 20px; text-align: center; background: #fff; border: 1px dashed var(--tk-line, #d9e3ea); border-radius: 18px; color: var(--tk-ink-3, #5f7383); }
@media (min-width: 992px) { .af-card { padding: 28px; } .af-btn { width: auto; padding: 0 32px; } .af-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; } }

/* Halaman pembayaran (checkout): memakai ulang komponen lama, hanya digayakan ulang */
.ck .section-payment { background: #fff !important; border: 1px solid var(--tk-line, #d9e3ea); border-radius: 18px; padding: 20px 16px !important; margin: 0 0 16px !important; text-align: left; }
.ck .section-payment .txt-body { font-size: 15px; color: var(--tk-ink-3, #5f7383); }
.ck .section-payment .txt-body-black { font-size: 15px; font-weight: 700; color: var(--tk-ink, #10283a); }
.ck .section-payment .txt-title { color: var(--tk-ink, #10283a); }
.ck .box-bordered { border: 1px solid var(--tk-line, #d9e3ea) !important; border-radius: 14px !important; padding: 14px 16px !important; background: #f7fafc !important; }
.ck .box-payment { border: 0 !important; background: none !important; }
.ck .icon-payment { height: 28px; width: auto; max-width: 90px; object-fit: contain; }
.ck .wrap-qr { display: grid; place-items: center; padding: 16px; margin-top: 8px; background: #fff; border: 1px solid var(--tk-line, #d9e3ea); border-radius: 16px; }
.ck .wrap-qr img { width: 100%; max-width: 280px; height: auto; }
.ck .btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; padding: 0 16px !important; border-radius: 14px; font-weight: 700; font-size: 16px; text-decoration: none; transition: background-color .2s; }
.ck .btn-bg-blue { background: #1f4f9a !important; color: #fff !important; border: 0; }
.ck .btn-bg-blue:hover { background: #173d78 !important; }
.ck .btn-outline-blue { background: #fff !important; color: #1f4f9a !important; border: 1.5px solid #1f4f9a !important; }
.ck .btn-outline-blue:hover { background: #eef4fb !important; }
@media (min-width: 992px) { .ck .section-payment { padding: 28px !important; } }
