/* Pocitová mapa – vizuální styl SMS služby s.r.o. */
:root {
  --brand: #7b8f24;
  --brand-600: #687a1c;
  --brand-700: #556416;
  --brand-300: #a8c230;
  --brand-50: #f3f6e6;
  --ink: #26292b;
  --grey: #535759;
  --muted: #7a7f82;
  --line: #e4e6df;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --pos: #4c9a2a;
  --pos-50: #ecf6e6;
  --neg: #d1453b;
  --neg-50: #fbeceb;
  --neu: #8c9295;
  --neu-50: #f0f1f2;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(38,41,43,.06), 0 8px 24px rgba(38,41,43,.08);
  --shadow-lg: 0 2px 4px rgba(38,41,43,.06), 0 18px 48px rgba(38,41,43,.16);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.serif { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font); padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #cfd3c7; background: #fafbf7; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(123,143,36,.35); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(38,41,43,.05); border-color: transparent; }
.btn-danger { color: var(--neg); }
.btn-danger:hover { background: var(--neg-50); border-color: #f1c9c5; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-icon { width: 38px; height: 38px; padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Formuláře ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--grey); }
.hint { font-size: 12.5px; color: var(--muted); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=search], input[type=url], select, textarea {
  width: 100%; font: 15px/1.4 var(--font); color: var(--ink);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(123,143,36,.18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; padding: 6px 0; }
.check input { margin-top: 3px; accent-color: var(--brand); width: 16px; height: 16px; }

/* ---------- Puntíky ---------- */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.positive { background: var(--pos); } .dot.negative { background: var(--neg); } .dot.neutral { background: var(--neu); }
.pm-marker { width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); transition: transform .15s; }
.pm-marker.positive { background: var(--pos); } .pm-marker.negative { background: var(--neg); } .pm-marker.neutral { background: var(--neu); }
.pm-marker.other { width: 14px; height: 14px; border-width: 2px; opacity: .75; }
.pm-marker.pending { animation: pulse 1.2s infinite; }
.pm-marker.dim { opacity: .35; }
.leaflet-marker-icon:hover .pm-marker { transform: scale(1.18); }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(38,41,43,.35); } 50% { box-shadow: 0 0 0 9px rgba(38,41,43,0); } }

/* ---------- Typové přepínače ---------- */
.type-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: var(--radius); border: 1.5px solid var(--line); background: #fff;
  font: 600 15px/1.25 var(--font); color: var(--ink); cursor: pointer; transition: all .15s;
}
.type-btn small { display: block; font-weight: 500; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.type-btn .swatch { width: 30px; height: 30px; border-radius: 50%; flex: none; border: 3px solid #fff; box-shadow: 0 0 0 1.5px currentColor; }
.type-btn.positive { color: var(--pos); } .type-btn.positive .swatch { background: var(--pos); }
.type-btn.negative { color: var(--neg); } .type-btn.negative .swatch { background: var(--neg); }
.type-btn.neutral { color: var(--neu); } .type-btn.neutral .swatch { background: var(--neu); }
.type-btn span.t { color: var(--ink); }
.type-btn:hover { border-color: currentColor; }
.type-btn.active.positive { background: var(--pos-50); border-color: var(--pos); }
.type-btn.active.negative { background: var(--neg-50); border-color: var(--neg); }
.type-btn.active.neutral { background: var(--neu-50); border-color: var(--neu); }
/* obecné kategorie legendy – barva v proměnné --c */
.type-btn[style*="--c"] { color: var(--c); }
.type-btn[style*="--c"] .swatch { background: var(--c); }
.type-btn.active[style*="--c"] { background: color-mix(in srgb, var(--c) 11%, #fff); border-color: var(--c); }
.type-btn[disabled] { opacity: .45; cursor: not-allowed; }

.seg { display: inline-flex; background: #eef0ea; padding: 4px; border-radius: 999px; gap: 2px; }
.seg button { border: 0; background: transparent; font: 600 13px/1 var(--font); padding: 8px 12px; border-radius: 999px; cursor: pointer; color: var(--grey); display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* ---------- Modální okna ---------- */
.overlay { position: fixed; inset: 0; background: rgba(28,31,32,.45); backdrop-filter: blur(2px); z-index: 3000; display: none; align-items: center; justify-content: center; padding: 16px; }
.overlay.open { display: flex; animation: fade .15s; }
.dialog { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; padding: 22px; animation: rise .18s ease-out; }
.dialog.wide { max-width: 760px; }
.dialog h3 { font-size: 20px; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.dialog .actions .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }
@media (max-width: 640px) {
  .overlay.sheet { align-items: flex-end; padding: 0; }
  .overlay.sheet .dialog { border-radius: 20px 20px 0 0; max-height: 88vh; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 4000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); animation: rise .2s; }
.toast.error { background: var(--neg); }
.toast.ok { background: var(--brand-700); }

/* ---------- Leaflet úpravy ---------- */
.leaflet-container { font-family: var(--font); background: #eef0ea; }
.leaflet-control-zoom a, .leaflet-bar a { color: var(--ink) !important; }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-control-layers { border: 0 !important; box-shadow: var(--shadow) !important; border-radius: 12px !important; }
.leaflet-control-layers-expanded { padding: 10px 14px !important; font-size: 13.5px; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.45; }
.tiles-soft { filter: saturate(.45) brightness(1.05) contrast(.92); }
.map-crosshair, .map-crosshair .leaflet-interactive { cursor: crosshair !important; }

.logo { height: 38px; width: auto; display: block; align-self: flex-start; object-fit: contain; }
