/* RAJA STOR (2026-12-03): pelacak status Gmail, lonceng notifikasi,
 * bukti foto WD. Semua warna lewat variabel tema (var(--accent),
 * var(--ink), dll.) supaya komponen ini otomatis mengikuti tema
 * Hijau Cuan terang/gelap. Tidak ada warna hex di file ini.
 * Dial: ENERGY 2 / RHYTHM 2 / MOTION 1 (tenang, terpercaya).
 * Satu-satunya gerak: titik langkah aktif berdenyut pelan; mati di
 * prefers-reduced-motion. */

/* ---------- Pelacak status (Riwayat Stor) ---------- */
.rs-track-list {
  display: grid;
  gap: 12px;
}

.rs-track {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 14px;
}

.rs-track-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.rs-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.rs-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.rs-price {
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}

/* Garis waktu vertikal: satu kolom titik, garis penghubung dari
 * tiap titik ke titik berikutnya. */
.rs-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.rs-step {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 6px 0 6px 0;
}

.rs-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}

.rs-step.done:not(:last-child)::before,
.rs-step.done-acc:not(:last-child)::before,
.rs-step.done-rej:not(:last-child)::before {
  background: var(--success);
}

.rs-step.done-rej:not(:last-child)::before {
  background: var(--danger);
}

.rs-dot {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--border);
  z-index: 1;
}

.rs-dot svg {
  width: 16px;
  height: 16px;
}

.rs-step.done .rs-dot {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}

.rs-step.active .rs-dot {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  /* Sapu bersih (P-15): denyut loop dihapus. DESIGN.md melarang
   * animasi loop (hanya hover + satu entrance hero yang diizinkan);
   * langkah aktif tetap dikenali dari latar + border aksennya. */
}

.rs-step.done-acc .rs-dot {
  background: var(--success-soft);
  color: var(--success);
  border-color: var(--success);
}

.rs-step.done-rej .rs-dot {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger);
}

.rs-step-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 2px;
}

.rs-step-body b {
  font-size: 14px;
  color: var(--ink);
}

.rs-step.todo .rs-step-body b {
  color: var(--muted);
  font-weight: 600;
}

.rs-step-body span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.rs-reason {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.rs-reason b {
  color: var(--red-text);
}

/* ---------- Lonceng notifikasi (topbar) ---------- */
.notif-bell {
  position: relative;
  display: inline-flex;
}

.notif-bell-btn {
  position: relative;
  min-width: 44px;
  min-height: 44px;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--red-solid);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-modal, 0 8px 30px rgba(15, 23, 42, 0.18));
  overflow: hidden;
  z-index: 60;
}

/* Ronde 10.3: atribut [hidden] HARUS menyembunyikan dropdown. Tanpa
 * aturan ini, `display: flex` di atas mengalahkan `display: none`
 * bawaan browser untuk [hidden], sehingga lonceng yang sudah ditutup
 * (dropdown.hidden = true di ui.js) tetap tampil di layar. */
.notif-dropdown[hidden] {
  display: none;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.notif-head b {
  font-size: 15px;
  color: var(--ink);
}

/* Ronde 10.3: wadah kanan kepala lonceng (tombol tandai dibaca + X)
 * dan tombol tutup X, supaya di HP jelas cara menutup lonceng. */
.notif-head-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.notif-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Sapu bersih (P-16): target sentuh 44px (DESIGN.md P7). Ikon di
   * dalamnya tetap 18px; yang membesar hanya area ketuknya. */
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.notif-close:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.notif-close svg {
  width: 18px;
  height: 18px;
}

.notif-mark-read {
  flex: none;
}

.notif-body {
  overflow-y: auto;
  padding: 6px;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}

.notif-item:hover {
  background: var(--surface);
}

.notif-item.unread {
  background: var(--accent-soft);
}

.notif-item.unread:hover {
  background: var(--accent-soft-hover);
}

.notif-item .ico {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  color: var(--muted);
}

.notif-item .ico.pos {
  background: var(--success-soft);
  color: var(--success);
}

.notif-item .ico.neg {
  background: var(--danger-soft);
  color: var(--danger);
}

.notif-item .ico svg {
  width: 17px;
  height: 17px;
}

.notif-item-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.notif-item-body .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.notif-item-body .t .amt {
  font-weight: 700;
  white-space: nowrap;
}

.notif-item-body .s {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.notif-item-body .time {
  font-size: 12px;
  color: var(--muted);
}

.notif-dot {
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Bukti foto WD (Riwayat Penarikan) ---------- */
.wd-proof-slot {
  margin-top: 6px;
}

.wd-proof-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* Sapu bersih (P-16): target sentuh 44px (DESIGN.md P7). */
  min-height: 44px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.wd-proof-btn:hover {
  background: var(--accent-soft-hover);
}

.wd-proof-btn svg {
  width: 15px;
  height: 15px;
}

.wd-proof-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}

.wd-proof-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ---------- Fokus keyboard + gerak ---------- */
.notif-bell-btn:focus-visible,
.notif-item:focus-visible,
.notif-mark-read:focus-visible,
.wd-proof-btn:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Sapu bersih (P-01): di bawah 720px dropdown TIDAK lagi menempel ke
 * tombol lonceng (di 360px tombol itu di x ~170px, jadi dropdown 328px
 * terpotong ~48% di luar layar kiri). .notif-bell dibuat statis
 * sehingga jangkarnya naik ke .topbar (sticky, positioned ancestor):
 * dropdown membentang selebar topbar dikurangi margin 16px, dengan
 * top tetap 8px di bawah topbar. Badge tidak kena: ia berjangkar ke
 * .notif-bell-btn yang tetap relative. */
@media (max-width: 720px) {
  .notif-bell { position: static; }
  .notif-dropdown {
    left: 16px;
    right: 16px;
    width: auto;
  }
}

@media (max-width: 480px) {
  .rs-track {
    padding: 12px;
  }
}
