/* =========================================================================
 * Tanda Kamera — css/modals.css
 * Modal pratinjau foto, modal peta besar, dan toast.
 * ========================================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease;
}

.modal-card {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: 92vh;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  animation: pop-in 0.22s ease;
}
.modal-card--wide { width: min(920px, 100%); }

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.modal-head h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-head h2 i { color: var(--brand-soft); }

.icon-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #cbd5e1;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  cursor: pointer;
}
.icon-btn:hover { background: rgba(239, 68, 68, 0.22); color: #fff; }

.modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  background: rgba(2, 6, 23, 0.5);
}
.modal-body img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 12px;
  margin: 0 auto;
}

.modal-foot {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}
.meta { margin: 0; font-size: 10.5px; color: #94a3b8; text-align: center; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(148, 163, 184, 0.14);
  color: #e2e8f0;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { background: rgba(148, 163, 184, 0.22); }
.btn:active { transform: scale(0.97); }
.btn.primary {
  color: #0b1220;
  background: linear-gradient(150deg, var(--brand-soft), var(--brand));
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}
.btn.primary:hover { filter: brightness(1.05); }
.btn--tiny { padding: 6px 10px; font-size: 10.5px; flex: 0 0 auto; }

.big-map {
  width: 100%;
  height: min(62vh, 520px);
  border-radius: 0 0 20px 20px;
  background: #0f172a;
}

/* -------------------------------- Toast -------------------------------- */

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(420px, calc(100vw - 24px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-left-width: 3px;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: slide-up 0.25s ease;
}
.toast i { margin-top: 2px; font-size: 12px; }
.toast--info { border-left-color: var(--aqua); }
.toast--info i { color: var(--aqua); }
.toast--ok { border-left-color: #22c55e; }
.toast--ok i { color: #4ade80; }
.toast--warn { border-left-color: var(--brand); }
.toast--warn i { color: var(--brand-soft); }
.toast--err { border-left-color: #ef4444; }
.toast--err i { color: #fca5a5; }
.toast--out { animation: fade-out 0.3s ease forwards; }
