.map-page {
  padding-block: 24px 30px;
}

.map-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.map-page-head h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.045em;
}

.map-page-head p:not(.eyebrow) {
  max-width: 720px;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.map-page-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.map-search {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(170px, .8fr) minmax(160px, .7fr) auto auto;
  gap: 9px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.map-search label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.map-search .field-control,
.map-city-filter select {
  min-height: 46px;
}

.map-search-reset {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 9px;
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 800;
}

.map-mobile-switch {
  display: none;
}

.map-workspace {
  min-height: 650px;
  height: calc(100vh - 270px);
  max-height: 820px;
  display: grid;
  grid-template-columns: minmax(390px, .88fr) minmax(500px, 1.12fr);
  gap: 12px;
  margin-top: 12px;
}

.map-results,
.map-surface {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.map-results {
  display: grid;
  grid-template-rows: auto 1fr;
}

.map-results-head {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.map-results-head h2 {
  margin: 0;
  font-size: 18px;
}

.map-results-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.map-city-filter select {
  max-width: 160px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 700;
}

.map-job-list {
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.map-job-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.map-job-card + .map-job-card {
  margin-top: 9px;
}

.map-job-card[data-selected="true"] {
  border-color: #e7a28f;
  box-shadow: 0 7px 22px rgba(189, 63, 37, .1);
}

.map-job-photo {
  min-height: 112px;
  overflow: hidden;
  position: relative;
  border-radius: 11px;
  background: linear-gradient(135deg, #edeff3, #d9dde4);
}

.map-job-photo img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.map-job-photo span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #6d717c;
  font-family: "Montserrat", sans-serif;
  font-size: 30px;
  font-weight: 900;
}

.map-job-body {
  min-width: 0;
  padding-right: 4px;
}

.map-job-company {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-job-card h3 {
  margin: 4px 0 5px;
  font-size: 15px;
  line-height: 1.25;
}

.map-job-card h3 a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.map-job-card h3 a:hover {
  color: var(--coral-dark);
}

.map-job-meta {
  color: #5f626c;
  font-size: 11px;
}

.map-job-salary {
  margin-top: 6px;
  color: var(--coral-dark);
  font-size: 13px;
  font-weight: 900;
}

.map-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.map-job-chip {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 7px;
  background: #f1f2f4;
  color: #4f525a;
  font-size: 9px;
  font-weight: 750;
}

.map-job-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 850;
}

.map-surface {
  position: relative;
  background: #e8eaed;
}

.map-canvas {
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.map-status-note,
.map-tile-error {
  position: absolute;
  z-index: 500;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 11px;
  background: rgba(37, 38, 45, .9);
  box-shadow: 0 8px 25px rgba(31, 35, 48, .18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.map-status-note strong,
.map-status-note span {
  display: block;
}

.map-status-note strong {
  font-size: 12px;
}

.map-status-note span {
  margin-top: 2px;
  color: #d7d9df;
  font-size: 10px;
}

.map-tile-error {
  bottom: 74px;
  border-color: #f2d39d;
  background: rgba(86, 57, 5, .94);
  font-size: 11px;
  font-weight: 750;
}

.praca-map-marker {
  width: 46px !important;
  height: 46px !important;
  display: grid !important;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 15px 15px 15px 5px;
  background: var(--coral);
  box-shadow: 0 8px 22px rgba(31, 35, 48, .28);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 900;
  transform: rotate(-4deg);
}

.praca-map-marker span {
  transform: rotate(4deg);
}

.praca-map-marker.is-selected {
  border-color: var(--coral);
  background: #fff;
  color: var(--coral-dark);
}

.leaflet-marker-icon:focus {
  outline: 4px solid #25262d;
  outline-offset: 3px;
}

.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 42px !important;
}

.leaflet-control-attribution {
  max-width: calc(100% - 110px);
  font-size: 10px !important;
}

.map-loading {
  display: grid;
  gap: 9px;
}

.map-loading span {
  height: 132px;
  border-radius: 14px;
  background: linear-gradient(100deg, #eef0f3 25%, #f7f8fa 38%, #eef0f3 54%);
  background-size: 200% 100%;
  animation: map-loading 1.2s linear infinite;
}

.map-empty {
  padding: 50px 22px;
  text-align: center;
}

.map-empty h3 {
  margin: 0 0 8px;
}

.map-empty p {
  margin: 0 0 16px;
  color: var(--muted);
}

.map-noscript {
  margin-top: 12px;
}

@keyframes map-loading {
  to { background-position-x: -200%; }
}

@media (max-width: 900px) {
  .map-page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-search {
    grid-template-columns: 1fr 1fr auto;
  }

  .map-search label:first-child {
    grid-column: span 2;
  }

  .map-workspace {
    grid-template-columns: minmax(330px, .9fr) minmax(400px, 1.1fr);
  }
}

@media (max-width: 720px) {
  .map-page {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .map-page-head {
    gap: 14px;
  }

  .map-page-head p:not(.eyebrow) {
    font-size: 13px;
  }

  .map-page-actions {
    width: 100%;
  }

  .map-page-actions .button {
    flex: 1;
    padding-inline: 10px;
  }

  .map-search {
    grid-template-columns: 1fr;
    padding: 11px;
  }

  .map-search label:first-child {
    grid-column: auto;
  }

  .map-mobile-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 10px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .map-mobile-switch button {
    min-height: 44px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    font-weight: 850;
  }

  .map-mobile-switch button.active {
    background: var(--ink);
    color: #fff;
  }

  .map-workspace {
    min-height: 610px;
    height: calc(100vh - 215px);
    max-height: none;
    display: block;
    margin-top: 8px;
  }

  .map-results,
  .map-surface {
    height: 100%;
  }

  .map-workspace[data-mobile-view="list"] .map-surface,
  .map-workspace[data-mobile-view="map"] .map-results {
    display: none;
  }

  .map-job-card {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .map-job-photo {
    min-height: 118px;
  }

  .map-canvas {
    min-height: 610px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-loading span {
    animation: none;
  }
}
