/* =============================================================================
   POI Context Menu + Add POI Modal — Step 18B-3b
   ============================================================================= */

/* ── Right-click context menu ───────────────────────────────────────────── */
.poi-ctxmenu {
  position: fixed;
  z-index: 10000;
  min-width: 180px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  padding: 4px 0;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #e2e8f0;
  user-select: none;
}
.poi-ctxmenu[hidden] { display: none !important; }

.poi-ctxmenu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.poi-ctxmenu-item:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #fff;
}
.poi-ctxmenu-item[disabled],
.poi-ctxmenu-item.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.poi-ctxmenu-item.disabled:hover {
  background: transparent;
  color: #e2e8f0;
}

.poi-ctxmenu-icon {
  width: 18px;
  text-align: center;
  font-size: 14px;
}
.poi-ctxmenu-label { flex: 1; }

.poi-ctxmenu-divider {
  height: 1px;
  background: rgba(148, 163, 184, 0.18);
  margin: 4px 0;
}

.poi-ctxmenu-coords {
  padding: 6px 14px 8px;
  font-size: 11px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  margin-bottom: 4px;
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
}

/* ── Add POI modal ──────────────────────────────────────────────────────── */
.poi-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}
.poi-modal-backdrop[hidden] { display: none !important; }

.poi-modal {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  width: min(420px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.poi-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.poi-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f1f5f9;
}
.poi-modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.poi-modal-close:hover { color: #f1f5f9; }

.poi-modal-context {
  padding: 8px 18px;
  font-size: 11px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(30, 41, 59, 0.45);
}
.poi-modal-context.global {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}
.poi-modal-context.global strong { color: #fff; }

.poi-modal-body {
  padding: 14px 18px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.poi-field { display: flex; flex-direction: column; gap: 4px; }
.poi-field label {
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.poi-field input,
.poi-field select,
.poi-field textarea {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.poi-field input:focus,
.poi-field select:focus,
.poi-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}
.poi-field textarea {
  resize: vertical;
  min-height: 60px;
}
.poi-field input[readonly] {
  background: #0f172a;
  color: #94a3b8;
  font-family: ui-monospace, 'Cascadia Mono', Menlo, monospace;
  font-size: 12px;
}

.poi-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  margin-top: 10px;
}
.poi-btn {
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.poi-btn-cancel {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #475569;
}
.poi-btn-cancel:hover { color: #f1f5f9; border-color: #94a3b8; }
.poi-btn-save {
  background: #3b82f6;
  color: #fff;
}
.poi-btn-save:hover { background: #2563eb; }
.poi-btn-save:disabled {
  background: #475569;
  cursor: not-allowed;
}

/* ── Global POI badge on map markers ────────────────────────────────────── */
.poi-global-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #3b82f6;
  border: 1.5px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  pointer-events: none;
}

/* ── Toast (used for "Coordinates copied") ──────────────────────────────── */
.poi-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.96);
  color: #f1f5f9;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 12px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  z-index: 10001;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  animation: poiToastIn 0.2s ease-out;
}
.poi-toast[hidden] { display: none !important; }
@keyframes poiToastIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
