/* ============================================================
   Alur pesan paket (pf-*) — modal pilih durasi + ringkasan.
   Mengikuti halaman "Paket Saya" di dashboard.
   Dipakai oleh js/pricing-flow.js.
   ============================================================ */

body.pf-terkunci {
  overflow: hidden;
}

.pf-overlay {
  position: fixed;
  inset: 0;
  z-index: 1080;
  background: rgba(8, 23, 45, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
}

.pf-overlay[hidden] {
  display: none;
}

.pf-dialog {
  position: relative;
  width: 100%;
  max-width: 880px;
  background: #F8FAFC;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(4, 81, 170, 0.25);
  padding: 26px 26px 30px;
  animation: pf-naik 0.25s ease;
}

@keyframes pf-naik {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.pf-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #EFF6FF;
  color: #0451AA;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pf-close:hover {
  background: #DBEAFE;
}

/* --- kepala: paket yang sedang dipesan --- */
.pf-head {
  padding-right: 44px;
  margin-bottom: 18px;
}

.pf-tier {
  display: inline-block;
  background: #EFF6FF;
  color: #0451AA;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 50px;
}

.pf-nama {
  font-size: 26px;
  font-weight: 700;
  color: #0451AA;
  margin: 8px 0 4px;
}

.pf-quota {
  font-size: 13px;
  color: #64748B;
  font-weight: 500;
}

/* --- stepper empat langkah --- */
.pf-steps {
  display: flex;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: 18px;
}

.pf-step {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  row-gap: 6px;
  min-width: 0;
}

.pf-step-garis {
  height: 2px;
  background: #E2E8F0;
}

.pf-step-garis.is-kosong {
  background: transparent;
}

.pf-step.is-done .pf-step-garis,
.pf-step.is-now .pf-step-garis {
  background: #16A34A;
}

/* Garis kanan langkah yang sedang aktif belum boleh hijau — yang di
   depannya belum dilewati. */
.pf-step.is-now .pf-line-kanan {
  background: #E2E8F0;
}

.pf-step-bulat {
  width: 28px;
  height: 28px;
  margin: 0 6px;
  border-radius: 50%;
  border: 2px solid #E2E8F0;
  background: #FFFFFF;
  color: #94A3B8;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-step.is-done .pf-step-bulat,
.pf-step.is-now .pf-step-bulat {
  background: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
}

.pf-step.is-now .pf-step-bulat {
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}

.pf-step-nama {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: #94A3B8;
  line-height: 1.3;
}

.pf-step.is-done .pf-step-nama,
.pf-step.is-now .pf-step-nama {
  color: #16A34A;
}

/* --- panel putih --- */
.pf-panel {
  background: #FFFFFF;
  border: 1px solid #E8EEF6;
  border-radius: 16px;
  padding: 20px;
}

.pf-panel-judul {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.pf-panel-sub {
  font-size: 12px;
  color: #94A3B8;
  margin: 4px 0 16px;
}

.pf-note {
  font-size: 11px;
  color: #94A3B8;
  margin: 14px 0 0;
  line-height: 1.6;
}

.pf-note-tengah {
  text-align: center;
}

/* --- kartu durasi --- */
.pf-durasi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.pf-durasi {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 16px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pf-durasi:hover {
  border-color: #0451AA;
  box-shadow: 0 6px 18px rgba(4, 81, 170, 0.1);
}

.pf-durasi.is-unggulan {
  border-color: #16A34A;
  background: rgba(22, 163, 74, 0.04);
}

.pf-badge-hemat {
  position: absolute;
  top: -10px;
  left: 14px;
  background: #16A34A;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 50px;
  box-shadow: 0 3px 8px rgba(22, 163, 74, 0.3);
}

.pf-durasi-atas {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pf-durasi-bulan {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
}

.pf-durasi-coret {
  font-size: 11px;
  color: #94A3B8;
  text-decoration: line-through;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.pf-durasi-harga {
  font-size: 20px;
  font-weight: 700;
  color: #0F172A;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.pf-durasi-coret + .pf-durasi-harga {
  margin-top: 0;
}

.pf-durasi.is-unggulan .pf-durasi-harga {
  color: #16A34A;
}

.pf-durasi-catatan {
  font-size: 10.5px;
  color: #94A3B8;
  margin-top: 3px;
  line-height: 1.5;
}

.pf-durasi-hemat {
  display: block;
  color: #16A34A;
  font-weight: 600;
}

.pf-pilih {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 50px;
  border: 1.5px solid #0451AA;
  color: #0451AA;
  background: #FFFFFF;
  transition: all 0.2s ease;
}

.pf-durasi:hover .pf-pilih {
  background: #0451AA;
  color: #FFFFFF;
}

.pf-durasi.is-unggulan .pf-pilih {
  background: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
}

.pf-durasi.is-unggulan:hover .pf-pilih {
  background: #15803D;
  border-color: #15803D;
}

/* --- ringkasan pembayaran --- */
.pf-kembali {
  border: none;
  background: none;
  color: #64748B;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  padding: 0 0 12px;
  cursor: pointer;
}

.pf-kembali:hover {
  color: #0451AA;
}

.pf-ringkasan {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
  align-items: start;
}

.pf-rincian-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-top: 16px;
  border-bottom: 1px solid #E8EEF6;
}

.pf-rincian-nama {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0;
}

.pf-rincian-gb {
  font-size: 12px;
  color: #64748B;
  margin: 4px 0 0;
}

.pf-chip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 50px;
  white-space: nowrap;
}

.pf-chip-hijau {
  background: rgba(22, 163, 74, 0.12);
  color: #16A34A;
}

.pf-chip-biru {
  background: #EFF6FF;
  color: #0451AA;
}

.pf-chip-populer {
  background: #16A34A;
  color: #FFFFFF;
}

.pf-dl {
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pf-dl > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pf-dl dt {
  font-size: 13px;
  font-weight: 400;
  color: #64748B;
}

.pf-dl dd {
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin: 0;
  text-align: right;
}

.pf-dl-angka dd {
  font-variant-numeric: tabular-nums;
}

.pf-dt-kecil {
  display: block;
  font-size: 10px;
  color: #94A3B8;
}

.pf-hijau {
  color: #16A34A !important;
}

.pf-total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed #CBD5E1;
}

.pf-total-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94A3B8;
  margin: 0 0 4px;
}

.pf-total-angka {
  font-size: 28px;
  font-weight: 700;
  color: #0451AA;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.pf-aman {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: rgba(22, 163, 74, 0.06);
  border-radius: 12px;
  padding: 12px;
  margin-top: 16px;
}

.pf-aman i {
  color: #16A34A;
  font-size: 13px;
  margin-top: 2px;
}

.pf-aman p {
  font-size: 11px;
  color: #64748B;
  line-height: 1.6;
  margin: 0;
}

.pf-cta {
  display: block;
  text-align: center;
  margin-top: 16px;
  padding: 13px 24px;
  border-radius: 50px;
  background: linear-gradient(to top, #0451AA 0%, #0357B5 20%, #0563C8 60%, #3B82F6 100%);
  color: #FFFFFF !important;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.pf-cta:hover {
  opacity: 0.9;
}

/* Tombol kartu harga kini <button>, bukan <a> — samakan tampilannya. */
button.btn-pricing {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 767px) {
  .pf-overlay {
    padding: 12px 10px;
  }

  .pf-dialog {
    padding: 22px 16px 24px;
    border-radius: 16px;
  }

  .pf-nama {
    font-size: 22px;
  }

  .pf-durasi-grid,
  .pf-ringkasan {
    grid-template-columns: 1fr;
  }

  .pf-step-nama {
    font-size: 9.5px;
  }
}

/* --- formulir data pemesan (langkah 3) --- */
.pf-form {
  display: block;
}

.pf-field {
  margin-bottom: 14px;
}

.pf-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0F172A;
  margin-bottom: 6px;
}

.pf-wajib {
  color: #DC2626;
}

.pf-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 14px;
  color: #0F172A;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pf-input::placeholder {
  color: #CBD5E1;
}

.pf-input:focus {
  outline: none;
  border-color: #0563C8;
  box-shadow: 0 0 0 3px rgba(5, 99, 200, 0.12);
}

.pf-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #FEF2F2;
  color: #B91C1C;
  font-size: 12px;
  line-height: 1.5;
}

.pf-error[hidden] {
  display: none;
}

/* Tombol lanjut memakai rupa .pf-cta, tapi wujudnya <button> — samakan yang
   tidak diwarisi dari elemen <a>. */
button.pf-cta-lanjut {
  width: 100%;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

button.pf-cta-lanjut:disabled {
  opacity: 0.6;
  cursor: default;
}

/* --- permintaan khusus (opsional) --- */
.pf-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 13px;
  color: #0F172A;
  cursor: pointer;
  user-select: none;
}

.pf-check input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: #0563C8;
  cursor: pointer;
}

.pf-opsional {
  color: #94A3B8;
  font-weight: 400;
}

.pf-textarea {
  resize: vertical;
  min-height: 78px;
  line-height: 1.5;
}

.pf-custom-isi[hidden] {
  display: none;
}

.pf-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #94A3B8;
  line-height: 1.5;
}

/* --- tombol bayar & pilihan WhatsApp (langkah 4) --- */
button.pf-cta-bayar {
  width: 100%;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

button.pf-cta-bayar:disabled {
  opacity: 0.6;
  cursor: default;
}

.pf-error-bayar {
  margin-top: 10px;
}

/* --- layar hasil setelah pulang dari DOKU --- */
.pf-hasil {
  text-align: center;
  padding-top: 26px;
  padding-bottom: 26px;
}

.pf-hasil-ikon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #FFFFFF;
  background: #94A3B8;
}

.pf-hasil-sukses .pf-hasil-ikon {
  background: #16A34A;
}

.pf-hasil-gagal .pf-hasil-ikon {
  background: #DC2626;
}

.pf-hasil-tunggu .pf-hasil-ikon {
  background: #F59E0B;
}

.pf-hasil-pesan {
  margin: 8px auto 0;
  max-width: 420px;
  font-size: 13.5px;
  line-height: 1.65;
  color: #64748B;
}

button.pf-cta-tutup {
  width: auto;
  min-width: 220px;
  margin-left: auto;
  margin-right: auto;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

/* --- data pemesan yang ditampilkan ulang di ringkasan --- */
.pf-data {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #E2E8F0;
}

.pf-data-judul {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748B;
}

/* Tautan, bukan tombol penuh: mengubah data adalah jalan keluar, bukan
   tindakan yang ingin kita dorong di layar pembayaran. */
.pf-data-ubah {
  border: none;
  background: none;
  padding: 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: #0563C8;
  cursor: pointer;
}

.pf-data-ubah:hover {
  text-decoration: underline;
}

.pf-data-catatan {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #F8FAFC;
}

.pf-data-catatan-label {
  margin: 0 0 3px;
  font-size: 11px;
  font-weight: 600;
  color: #94A3B8;
}

.pf-data-catatan-isi {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
