:root {
  --navy: #0C2340;
  --deep: #020B16;
  --dark: #06182D;
  --orange: #E87722;
  --teal: #6BCABA;
  --grey: #D7D2CB;
  --white: #F4F7FA;
  --glass: rgba(4, 18, 34, 0.88);
  --border: rgba(215, 210, 203, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.62);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  background: var(--deep);
}

#map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  background: var(--deep);
  filter: brightness(var(--map-brightness, 0.72))
          contrast(var(--map-contrast, 1.08))
          saturate(var(--map-saturate, 1.18))
          hue-rotate(0deg);
  transition: filter 0.25s ease;
}

.map-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 50%, rgba(107, 202, 186, 0.075) 0%, rgba(12, 35, 64, 0.08) 34%, rgba(2, 11, 22, 0.62) 100%),
    linear-gradient(to bottom, rgba(2, 11, 22, 0.18), rgba(2, 11, 22, 0.02) 44%, rgba(2, 11, 22, 0.26));
}

/* HEADER */

.app-header {
  position: fixed;
  top: 10px;
  left: 14px;
  right: 14px;
  z-index: 50;
  height: 86px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(12, 35, 64, 0.96), rgba(2, 11, 22, 0.92));
  border: 1px solid var(--border);
  border-radius: 30px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--orange);
  background: var(--navy);
  box-shadow:
    0 0 0 5px rgba(232, 119, 34, 0.08),
    0 0 28px rgba(232, 119, 34, 0.30),
    0 16px 34px rgba(0, 0, 0, 0.50);
}

.brand-title {
  color: var(--white);
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.brand-subtitle {
  color: var(--teal);
  font-size: 14px;
  margin-top: 4px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.round-button {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  border: 1px solid rgba(215,210,203,0.18);
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 38px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.08);
}

.round-button svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.15;
}

.has-dot::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 12px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 16px rgba(232,119,34,0.9);
}

/* SIDE TOOLS */

.side-tools {
  position: fixed;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  width: 76px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(5, 20, 38, 0.78);
  border: 1px solid var(--border);
  border-radius: 26px;
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}

.tool-button {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  border: 1px solid rgba(215,210,203,0.15);
  background: rgba(255,255,255,0.045);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-button.active {
  background: linear-gradient(135deg, rgba(107,202,186,0.95), rgba(38,143,154,0.90));
  box-shadow: 0 0 28px rgba(107,202,186,0.40);
}

.tool-button svg {
  width: 29px;
  height: 29px;
  stroke-width: 2.25;
}

/* PLACE CARD */

.place-card {
  position: fixed;
  right: 24px;
  top: 150px;
  z-index: 46;
  width: 365px;
  display: none;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(5,18,34,0.98), rgba(3,13,26,0.96));
  border: 1px solid rgba(215,210,203,0.23);
  color: var(--white);
  backdrop-filter: blur(28px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.place-card.visible {
  display: block;
}

.card-close {
  position: absolute;
  top: 13px;
  right: 13px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(215,210,203,0.16);
  background: rgba(4,18,34,0.88);
  color: white;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.place-image {
  height: 126px;
  background:
    linear-gradient(rgba(2,11,22,0.05), rgba(2,11,22,0.05)),
    url("https://images.unsplash.com/photo-1589287707310-213624549c88?auto=format&fit=crop&w=900&q=80");
  background-size: cover;
  background-position: center;
}

.place-content {
  padding: 22px;
}

.place-card h2 {
  margin: 0;
  color: var(--orange);
  font-size: 33px;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.place-card p {
  margin: 6px 0 18px;
  font-size: 15px;
  color: rgba(244,247,250,0.92);
}

.stats {
  border-top: 1px solid rgba(215,210,203,0.12);
  border-bottom: 1px solid rgba(215,210,203,0.12);
}

.stat-row {
  min-height: 47px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(215,210,203,0.08);
  color: var(--grey);
  font-size: 14px;
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row strong {
  color: white;
  font-weight: 900;
}

.stat-icon.orange {
  color: var(--orange);
}

.stat-icon.teal {
  color: var(--teal);
}

.more-link {
  margin: 15px 0 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--grey);
  font-size: 13px;
}

.more-link::before {
  content: "⌄ ";
  color: var(--teal);
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.card-actions button {
  min-height: 80px;
  border-radius: 18px;
  border: 1px solid rgba(215,210,203,0.14);
  background: linear-gradient(160deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025));
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.card-actions span {
  display: block;
  font-size: 27px;
  margin-bottom: 8px;
  color: var(--teal);
}

.card-actions button:first-child span {
  color: var(--orange);
}

/* BOTTOM NAV */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 50;
  width: min(820px, calc(100vw - 48px));
  height: 86px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  background: linear-gradient(145deg, rgba(5,18,34,0.96), rgba(3,13,26,0.94));
  border: 1px solid rgba(215,210,203,0.22);
  border-radius: 32px;
  backdrop-filter: blur(30px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.08);
}

.nav-item {
  position: relative;
  height: 100%;
  border: 0;
  background: transparent;
  color: rgba(244,247,250,0.84);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
}

.nav-item svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.25;
}


.nav-item.active::after {
  content: "";
  position: absolute;
  bottom: 13px;
  width: 44px;
  height: 2px;
  border-radius: 99px;
  background: var(--teal);
  box-shadow: 0 0 22px rgba(107,202,186,0.85);
}

.nav-search {
  top: -25px;
}

.search-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #ffb05d 0%, #f28a2e 36%, var(--orange) 72%);
  color: white;
  border: 1px solid rgba(255,255,255,0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 20px 46px rgba(232,119,34,0.48),
    0 0 0 10px rgba(232,119,34,0.09);
}

.search-circle svg {
  width: 38px;
  height: 38px;
}

.status {
  display: none;
}

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right,
.mapboxgl-popup {
  display: none;
}

.mapboxgl-user-location-dot {
  background-color: var(--teal);
  box-shadow: 0 0 0 7px rgba(107,202,186,0.22), 0 0 32px rgba(107,202,186,0.78);
}

@media (max-width: 900px) {
  .header-actions .round-button:nth-child(1),
  .header-actions .round-button:nth-child(2) {
    display: none;
  }

  .place-card {
    left: 12px;
    right: 12px;
    bottom: 108px;
    top: auto;
    width: auto;
  }

  .place-image {
    display: none;
  }
}

@media (max-width: 768px) {
  .app-header {
    top: 10px;
    left: 10px;
    right: 10px;
    height: 76px;
    border-radius: 25px;
  }

  .brand-logo {
    width: 54px;
    height: 54px;
  }

  .brand-title {
    font-size: 20px;
  }

  .brand-subtitle {
    font-size: 12px;
  }

  .side-tools {
    left: 14px;
    width: 64px;
    padding: 7px;
  }

  .tool-button {
    width: 50px;
    height: 50px;
  }

  .bottom-nav {
    bottom: 10px;
    width: calc(100vw - 20px);
    height: 78px;
    border-radius: 27px;
  }

  .nav-item {
    font-size: 10.5px;
  }

  .nav-item svg {
    width: 23px;
    height: 23px;
  }

  .search-circle {
    width: 68px;
    height: 68px;
  }
}
/* PUNKT POI — URZĄD GMINY */

.poi-marker {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E87722;
  border: 3px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 8px rgba(232, 119, 34, 0.16),
    0 0 28px rgba(232, 119, 34, 0.85);
  cursor: pointer;
}

.poi-marker::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(232, 119, 34, 0.35);
}

.place-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.place-badge {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6BCABA;
  font-size: 28px;
  background: rgba(107, 202, 186, 0.10);
  border: 1px solid rgba(107, 202, 186, 0.45);
  box-shadow: 0 0 24px rgba(107, 202, 186, 0.18);
}

.office-image {
  background:
    linear-gradient(rgba(2,11,22,0.08), rgba(2,11,22,0.08)),
    url("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Blonie_Ratusz.jpg/800px-Blonie_Ratusz.jpg");
  background-size: cover;
  background-position: center;
}

.office-details {
  border-top: 1px solid rgba(215, 210, 203, 0.12);
  border-bottom: 1px solid rgba(215, 210, 203, 0.12);
  margin-top: 8px;
}

.office-row {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(215, 210, 203, 0.08);
  color: #D7D2CB;
  font-size: 15px;
  line-height: 1.4;
}

.office-row:last-child {
  border-bottom: none;
}

.office-row span {
  color: #6BCABA;
  font-size: 20px;
}

.office-row strong {
  color: #F4F7FA;
  font-weight: 700;
}

.office-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.office-actions button {
  height: 54px;
  border-radius: 18px;
  border: 1px solid rgba(215, 210, 203, 0.18);
  color: white;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.office-main-btn {
  background: linear-gradient(135deg, rgba(107, 202, 186, 0.95), rgba(38, 143, 154, 0.90));
  box-shadow: 0 0 26px rgba(107, 202, 186, 0.22);
}

.office-orange-btn {
  background: linear-gradient(135deg, #f28a2e, #E87722);
  box-shadow: 0 0 26px rgba(232, 119, 34, 0.28);
}
@media (max-width: 768px) {
  .place-card {
    left: 10px;
    right: 10px;
    bottom: calc(94px + env(safe-area-inset-bottom));
    top: auto;
    width: auto;
    max-height: 62dvh;
    overflow-y: auto;
    border-radius: 24px;
  }

  .place-content {
    padding: 16px;
  }

  .place-card h2 {
    font-size: 24px;
  }

  .place-card p {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .place-heading {
    gap: 10px;
    margin-bottom: 12px;
  }

  .place-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 22px;
  }

  .office-row {
    padding: 9px 0;
    font-size: 13px;
  }

  .office-actions button {
    height: 46px;
    font-size: 13px;
  }

  .card-close {
    width: 38px;
    height: 38px;
    top: 10px;
    right: 10px;
    font-size: 26px;
  }

  .office-image {
    height: 82px;
  }

  .office-row a,
  .office-row strong,
  .office-row span {
    color: inherit;
    text-decoration: none;
  }
}