/* ============================================================
   prayer.css — kartu jadwal shalat & modal notifikasi lonceng
   ============================================================ */

/* ---------- Kartu jadwal shalat ---------- */
.prayer-card {
  padding: 16px 18px 14px;
}

.prayer-location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: var(--fs-11);
  font-weight: 650;
  line-height: 1.3;
}
.prayer-location .ico { color: var(--emerald); flex-shrink: 0; }

.prayer-refresh {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--muted-2);
  transition: transform .12s ease, color .12s ease, background .12s ease;
}
.prayer-refresh:active { transform: rotate(30deg); color: var(--emerald); }
.prayer-refresh:disabled { opacity: .5; cursor: progress; }
@media (hover: hover) {
  .prayer-refresh:hover { background: var(--surface-3); color: var(--emerald); }
}

/* Grid 7 kolom */
.prayer-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.prayer-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 62px;
  padding: 6px 1px;
  border-radius: 12px;
  background: var(--surface-2);
  text-align: center;
  transition: background .18s ease;
}

.prayer-item span {
  color: var(--muted);
  font-size: var(--fs-10);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.1px;
}

.prayer-item b {
  color: var(--ink-2);
  font-size: var(--fs-10);
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

/* Highlight: waktu berikutnya */
.prayer-item.is-next {
  background: var(--mint-soft-2);
}
.prayer-item.is-next b {
  color: var(--emerald);
}
.prayer-item.is-next span {
  color: var(--emerald-2);
}

/* State: loading / error */
.prayer-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
}
.prayer-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  color: var(--danger);
  font-size: var(--fs-12);
  font-weight: 500;
}

/* ---------- Modal Notifikasi (bottom sheet style) ---------- */
.notif-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.notif-modal[hidden] { display: none; }

.notif-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 15, .45);
}

.notif-sheet {
  position: relative;
  width: min(100%, 430px);
  max-height: 85dvh;
  padding: 22px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-deep);
  overflow-y: auto;
  animation: notif-sheet-in .22s ease-out both;
}

@keyframes notif-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.notif-sheet-handle {
  width: 40px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--line);
}

.notif-sheet h2 {
  font-size: var(--fs-17);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.notif-sheet > p {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.5;
  margin-bottom: 18px;
}

.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.notif-toggle-label {
  min-width: 0;
}

.notif-toggle-label b {
  display: block;
  font-size: var(--fs-14);
  font-weight: 700;
  line-height: 1.3;
}

.notif-toggle-label small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: var(--fs-11);
  line-height: 1.4;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 32px;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-track {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background .18s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}

.toggle-switch input:checked + .toggle-track {
  background: var(--emerald);
}

.toggle-switch input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 3px solid rgba(18, 113, 90, .32);
  outline-offset: 2px;
}

.notif-sheet .btn {
  margin-top: 20px;
}

/* Sembunyikan modal notif saat body ada sheet lain */
body.is-modal-open .notif-modal { display: none; }

/* ---------- Tombol nama kota (klik untuk pilih lokasi) ---------- */
.prayer-loc-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: var(--fs-11);
  font-weight: 650;
  line-height: 1.3;
  cursor: pointer;
  transition: background .15s ease;
}
.prayer-loc-btn svg {
  flex-shrink: 0;
  color: var(--muted-2);
}
.prayer-loc-btn:active { background: var(--surface-3); }
@media (hover: hover) {
  .prayer-loc-btn:hover { background: var(--surface-3); }
}

/* ---------- Modal Pilih Lokasi ---------- */
.lokasi-modal {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.lokasi-modal[hidden] { display: none; }

.lokasi-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 20, 15, .45);
}

.lokasi-sheet {
  position: relative;
  width: min(100%, 430px);
  max-height: 85dvh;
  padding: 22px var(--gutter) calc(20px + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-deep);
  overflow-y: auto;
  animation: lokasi-sheet-in .22s ease-out both;
}

@keyframes lokasi-sheet-in {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.lokasi-sheet-handle {
  width: 40px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: var(--line);
}

.lokasi-sheet h2 {
  font-size: var(--fs-17);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 4px;
}

.lokasi-sheet > p {
  color: var(--muted);
  font-size: var(--fs-12);
  line-height: 1.5;
  margin-bottom: 18px;
}

.lokasi-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lokasi-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: inherit;
  font-size: var(--fs-14);
  font-weight: 500;
  outline: none;
  transition: border-color .15s ease;
}
.lokasi-input::placeholder { color: var(--muted); }
.lokasi-input:focus { border-color: var(--emerald); }

.lokasi-btn-cari {
  flex-shrink: 0;
  height: 48px;
  padding: 0 20px;
  white-space: nowrap;
}

.lokasi-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 600;
}
.lokasi-divider::before,
.lokasi-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.lokasi-btn-gps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
}