:root {
  /* pastelowa, "dziecięca" paleta: miętowa zieleń + niebieski baby blue */
  --ink: #1e3a5f;
  --muted: #7189a3;
  --line: #dcebf5;
  --free: #10b981;
  --free-soft: #d7f5e9;
  --full: #f4737f;
  --full-soft: #ffe3e6;
  --unknown: #a5b8c9;
  --accent: #4aa3e8;
  --accent-soft: #e3f2fd;
  --cream: #fdfaf4;
  --panel-bg: rgba(255, 253, 250, 0.94);
  --shadow: 0 10px 30px rgba(74, 163, 232, 0.16);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  color: var(--ink);
}

#map {
  position: fixed;
  inset: 0;
  background: #eef2f6;
}

/* pastelize the OSM basemap so markers stay the loudest thing on screen */
.leaflet-tile-pane { filter: saturate(0.55) brightness(1.05) contrast(0.94); }

/* ---------- top bar ---------- */
.topbar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.brand-logo { flex: none; display: block; }

.brand h1 { font-size: 16.5px; font-weight: 800; margin: 0; letter-spacing: -0.02em; }
.brand h1 em, .page-brand em { font-style: normal; color: var(--accent); }
.brand p { font-size: 12px; color: var(--muted); margin: 1px 0 0; }

.cities {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: auto;
}

.cities button {
  border: 1px solid var(--line);
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  padding: 8px 16px;
  font: 600 13px/1 "Nunito", sans-serif;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}

.cities button:hover { border-color: var(--accent); color: var(--accent); }
.cities button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- side panel ---------- */
.panel {
  position: fixed;
  top: 84px;
  left: 16px;
  bottom: 16px;
  z-index: 1000;
  width: 340px;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  display: flex;
  gap: 8px;
  padding: 14px 14px 6px;
}

.stat {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--cream);
  border-radius: 12px;
}

.stat strong { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; }
.stat:first-child strong { color: var(--free); }
.stat span { font-size: 11px; line-height: 1.25; color: var(--muted); }

.filters { padding: 8px 14px 12px; border-bottom: 1px solid var(--line); }
.filter-row { margin-top: 8px; }
.filter-row.types { display: flex; gap: 6px; }

.chip {
  flex: 1;
  display: block;
  cursor: pointer;
}
.chip input { display: none; }
.chip span {
  display: block;
  text-align: center;
  padding: 7px 4px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  transition: all 0.15s;
}
.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.switch { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 500; }
.switch input { display: none; }
.switch .track {
  width: 34px; height: 20px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.switch input:checked + .track { background: var(--free); }
.switch input:checked + .track::after { transform: translateX(14px); }

.fee-label { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.fee-label select {
  font: 600 13px "Nunito", sans-serif;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}

.list-head { padding: 10px 16px 4px; }
.list-head h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0; }

.list {
  list-style: none;
  margin: 0;
  padding: 6px 10px 12px;
  overflow-y: auto;
  flex: 1;
}

.card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.card:hover { background: #edf5fb; }
.card .c-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.card .c-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.card .c-free {
  flex: none;
  align-self: center;
  min-width: 46px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 8px;
  border-radius: 10px;
}
.c-free.free { background: var(--free-soft); color: var(--free); }
.c-free.full { background: var(--full-soft); color: var(--full); }
.c-free.unknown { background: #edf5fb; color: var(--unknown); }

.empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- legend, toggle ---------- */
.legend {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1000;
  display: flex;
  gap: 14px;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
}
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.dot-free { background: var(--free); }
.dot-full { background: var(--full); }
.dot-unknown { background: var(--unknown); }

.panel-toggle { display: none; }

/* ---------- search ---------- */
.search {
  position: relative;
  display: flex;
  gap: 6px;
  padding: 12px 14px 0;
}
.search input {
  flex: 1;
  font: 500 13px "Nunito", sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search button {
  flex: none;
  width: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 17px;
  color: var(--accent);
  cursor: pointer;
}
.search button:hover { border-color: var(--accent); }
.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 14px;
  right: 14px;
  z-index: 1100;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
}
.search-results li {
  padding: 8px 10px;
  font-size: 12.5px;
  border-radius: 8px;
  cursor: pointer;
}
.search-results li:hover { background: #edf5fb; }
.search-results li.muted { color: var(--muted); cursor: default; }

.panel-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.panel-footer a { font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
.panel-footer a:hover { color: var(--accent); }

.noscript {
  position: fixed;
  inset: 80px 16px auto;
  z-index: 2000;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

/* ---------- content pages (city / district / facility) ---------- */
body.page {
  background: var(--cream);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.page-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.page-nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.page-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 4px 0;
}
.page-nav a:hover { color: var(--accent); }
.page-nav .nav-map { color: var(--accent); }

.page-main {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  flex: 1;
}
.page-main h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 6px; }
.page-main h2 { font-size: 18px; font-weight: 700; margin: 28px 0 10px; }
.lead { font-size: 15px; line-height: 1.6; color: #334155; }
.crumbs { font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.fac-meta { color: var(--muted); font-size: 13.5px; margin-top: -2px; }
.ok { color: var(--free); }

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  font-size: 13.5px;
}
.data-table th, .data-table td { padding: 10px 14px; text-align: left; }
.data-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr + tr td { border-top: 1px solid #eef6fc; }
.data-table a { color: var(--accent); font-weight: 600; text-decoration: none; }
.data-table a:hover { text-decoration: underline; }

.fac-list { list-style: none; margin: 16px 0; padding: 0; }
.fac-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.fac-name { font-size: 14.5px; font-weight: 700; color: var(--ink); text-decoration: none; }
.fac-name:hover { color: var(--accent); }
.fac-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.badge {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.free { background: var(--free-soft); color: var(--free); }
.badge.full { background: var(--full-soft); color: var(--full); }
.badge.unknown { background: #edf5fb; color: var(--unknown); }
.badge.warn { background: #fef3c7; color: #b45309; }

.hero-free {
  margin: 14px 0;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.hero-free strong { font-size: 26px; font-weight: 800; }
.hero-free.free { background: var(--free-soft); color: var(--free); }
.hero-free.full { background: var(--full-soft); color: var(--full); }
.hero-free.unknown { background: #edf5fb; color: #475569; }
.hero-date { font-size: 12px; font-weight: 500; opacity: 0.75; margin-left: auto; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 14px; margin: 18px 0; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.facts a { color: var(--accent); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  margin-right: 8px;
}
.btn:hover { background: #3892dc; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

.page-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px 20px;
  font-size: 12.5px;
  color: var(--muted);
}
.page-footer a { color: var(--muted); }
.page-footer p { max-width: 860px; margin: 0 auto; }

/* ---------- popup ---------- */
.leaflet-popup-content-wrapper {
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-family: "Nunito", sans-serif;
}
.leaflet-popup-content { margin: 14px 16px; min-width: 230px; }

.pop-type {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 2px 7px;
}
.pop-name { font-size: 15px; font-weight: 700; margin: 6px 0 2px; line-height: 1.3; }
.pop-addr { font-size: 12px; color: var(--muted); }

.pop-free {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0;
  padding: 8px 12px;
  border-radius: 10px;
}
.pop-free.free { background: var(--free-soft); color: var(--free); }
.pop-free.full { background: var(--full-soft); color: var(--full); }
.pop-free.unknown { background: #edf5fb; color: var(--unknown); }
.pop-free strong { font-size: 22px; font-weight: 800; }
.pop-free span { font-size: 12px; font-weight: 600; }

.pop-rows { font-size: 12.5px; line-height: 1.7; }
.pop-rows b { font-weight: 600; }
.pop-links { margin-top: 8px; font-size: 12.5px; display: flex; gap: 12px; }
.pop-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pop-links a:hover { text-decoration: underline; }
.pop-suspended {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border-radius: 8px;
  padding: 4px 8px;
}

/* ---------- cluster ---------- */
.cluster-badge {
  background: rgba(30, 58, 95, 0.88);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 12px "Nunito", sans-serif;
  box-shadow: 0 0 0 5px rgba(74, 163, 232, 0.25);
}

/* ---------- mobile ---------- */
@media (max-width: 760px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .cities {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .cities button { flex: none; }
  .panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-height: 55vh;
    border-radius: var(--radius) var(--radius) 0 0;
    transform: translateY(calc(100% - 0px));
    transition: transform 0.2s;
  }
  .panel.open { transform: none; }
  .panel-toggle {
    display: block;
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 1001;
    border: 1px solid var(--line);
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 10px 20px;
    font: 600 13px "Nunito", sans-serif;
    box-shadow: var(--shadow);
  }
  .legend { display: none; }
}

/* ---------- alerts & payment demo ---------- */
.alert-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 14px;
  padding: 14px 18px;
  background: linear-gradient(105deg, #f59e0b, #fbbf24);
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.35;
  color: #422e00;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  transition: transform 0.12s, box-shadow 0.12s;
  flex: none;
}
.alert-cta:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(245, 158, 11, 0.45); }
.alert-cta small { font-size: 11.5px; opacity: 0.85; font-weight: 600; }
.alert-cta b { font-weight: 800; }
.cta-bell { font-size: 21px; flex: none; }
.cta-arrow { margin-left: auto; font-size: 18px; font-weight: 800; flex: none; }


.demo-badge {
  display: inline-block;
  background: #fff3cd;
  color: #8a6d1a;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.plans { display: flex; gap: 16px; margin: 20px 0; flex-wrap: wrap; }
.plan {
  flex: 1;
  min-width: 250px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.plan.featured { border: 2px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.plan-tag {
  position: absolute;
  top: -11px; left: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
}
.plan h2 { margin: 4px 0 2px; font-size: 17px; }
.plan-price { font-size: 28px; font-weight: 800; margin: 4px 0 10px; }
.plan-price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.plan ul { margin: 0 0 16px; padding-left: 18px; font-size: 13.5px; line-height: 1.8; }
.btn:disabled, .btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.alert-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 24px 0;
}
.alert-form h2 { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 14px; }
.form-grid label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 5px; }
.form-grid input, .form-grid select {
  font: 500 14px "Nunito", sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.form-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

.pay-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin: 18px 0; }
.pay-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.pay-card h2 { margin-top: 0; font-size: 15px; }
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 14px; }
.pay-row small { color: var(--muted); }
.pay-row.total { border-top: 1px solid var(--line); font-size: 16px; font-weight: 800; }
.pay-method {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13.5px;
  cursor: not-allowed;
}
.pay-method.selected { border-color: var(--accent); background: var(--accent-soft); }
.pay-method small { color: var(--muted); }
.blik-input { display: flex; gap: 8px; margin: 6px 0 14px; }
.blik-input input {
  width: 40px; height: 48px;
  text-align: center;
  font: 800 20px "Nunito", sans-serif;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.pay-btn { width: 100%; text-align: center; border: none; font-size: 15px; padding: 13px; cursor: pointer; }
.page-nav .nav-alerts { color: #d97706; }

@media (max-width: 640px) {
  .form-grid, .pay-layout { grid-template-columns: 1fr; }
}


.alert-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
  background: linear-gradient(105deg, #f59e0b, #fbbf24);
  color: #422e00;
  font: 800 13px "Nunito", sans-serif;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}
@media (min-width: 761px) {
  .alert-fab { display: none; }
}

/* ---------- lead form ---------- */
.lead-form-box {
  background: #fff;
  border: 2px solid var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 26px 0;
}
.lead-form-box h2 { margin: 0 0 4px; }
.lead-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-top: 12px; }
.lead-form label { font-size: 13px; font-weight: 700; display: flex; flex-direction: column; gap: 5px; }
.lead-form label.wide, .lead-form label.consent, .lead-form button { grid-column: 1 / -1; }
.lead-form input, .lead-form textarea {
  font: 500 14px "Nunito", sans-serif;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
}
.lead-form input:focus, .lead-form textarea:focus { outline: 2px solid var(--accent); }
.lead-form .consent { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 12px; color: var(--muted); }
.lead-form .consent input { margin-top: 2px; }
.lead-form button { border: none; cursor: pointer; font-size: 14.5px; padding: 12px; }
.lead-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-ok { font-size: 15px; font-weight: 700; color: var(--free); padding: 8px 0; }
.lead-err { font-size: 13px; font-weight: 700; color: var(--full); background: var(--full-soft); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
@media (max-width: 640px) { .lead-form { grid-template-columns: 1fr; } }

.context {
  font-size: 14px;
  line-height: 1.6;
  color: #46617e;
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 12px 16px;
}
