.ftlm-map-shell {
  display: grid;
  gap: 16px;
  margin: 20px 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.ftlm-map-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ftlm-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.ftlm-chip,
.ftlm-nearby-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.ftlm-chip {
  background: #fff;
  color: #111;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.ftlm-chip.is-active,
.ftlm-nearby-button {
  background: #fdbc0c;
  color: #111;
  box-shadow: 0 8px 20px rgba(253,188,12,0.35);
}

.ftlm-chip:hover,
.ftlm-nearby-button:hover {
  transform: translateY(-1px);
}

.ftlm-nearby-button.is-loading {
  opacity: .7;
  pointer-events: none;
}

.ftlm-map-wrapper {
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.ftlm-map {
  width: 100%;
  max-width: 100%;
  min-height: 420px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.ftlm-results {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.ftlm-results-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
}

.ftlm-results-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.ftlm-location-card {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 100%;
  max-width: 100%;
  text-align: left;
  border: 0 !important;
  outline: 0;
  background: linear-gradient(135deg, #fdbc0c, #ffd84d) !important;
  color: #222 !important;
  border-radius: 18px;
  padding: 18px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.ftlm-location-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.28), transparent 42%);
  pointer-events: none;
}

.ftlm-location-card:hover,
.ftlm-location-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16);
  filter: saturate(1.02);
}

.ftlm-card-title {
  position: relative;
  font-weight: 800;
  font-size: 20px;
  color: #111 !important;
  margin-bottom: 8px;
  line-height: 1.25;
  word-break: break-word;
}

.ftlm-card-address,
.ftlm-card-meta,
.ftlm-card-distance {
  position: relative;
  font-size: 14px;
  line-height: 1.6;
  color: #2f2f2f !important;
  margin-top: 6px;
  word-break: break-word;
}

.ftlm-card-meta strong,
.ftlm-card-distance strong {
  color: #111;
}

.ftlm-empty {
  padding: 16px;
  border-radius: 14px;
  background: #fafafa;
  color: #666;
}

.ftlm-popup {
  min-width: 220px;
  max-width: 280px;
}

.ftlm-popup h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
}

.ftlm-popup-subtitle {
  font-size: 13px;
  color: #666;
  margin: 0 0 10px;
}

.ftlm-popup-row {
  margin: 0 0 8px;
  line-height: 1.5;
  word-break: break-word;
}

.ftlm-popup-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff5d1;
  color: #6e5200;
  font-size: 12px;
  font-weight: 700;
}

.ftlm-route-link {
  color: #0b67c2;
  text-decoration: none;
  font-weight: 600;
  word-break: break-word;
}

.ftlm-route-link:hover {
  text-decoration: underline;
}

.ftlm-popup-actions {
  margin-top: 12px;
}

.ftlm-route-button {
  display: inline-block;
  background: #fdbc0c;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
}

.ftlm-route-button:hover {
  opacity: 0.92;
}

.ftlm-marker-wrap {
  background: transparent;
  border: 0;
}

.ftlm-marker-pin {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #fdbc0c;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
  border: 2px solid #111;
}

.ftlm-marker-pin span {
  transform: rotate(45deg);
  font-size: 16px;
  line-height: 1;
}

.ftlm-marker-wrap.is-nearest .ftlm-marker-pin {
  background: #111;
  border-color: #fdbc0c;
}

.ftlm-results-list .ftlm-location-card,
.ftlm-results-list .ftlm-location-card:hover,
.ftlm-results-list .ftlm-location-card:focus,
.ftlm-results-list .ftlm-location-card:active {
  text-decoration: none;
}

.ftlm-results-list .ftlm-location-card strong {
  color: #111 !important;
}

@media (max-width: 767px) {
  .ftlm-map-shell {
    gap: 14px;
    margin: 16px 0;
  }

  .ftlm-map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .ftlm-filter-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ftlm-chip,
  .ftlm-nearby-button {
    width: 100%;
    min-height: 44px;
    padding: 12px 14px;
    text-align: center;
    white-space: normal;
  }

  .ftlm-nearby-button {
    justify-content: center;
  }

  .ftlm-map {
    min-height: 320px;
    border-radius: 16px;
  }

  .ftlm-results {
    padding: 14px;
    border-radius: 16px;
  }

  .ftlm-results-title {
    font-size: 17px;
  }

  .ftlm-results-list {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ftlm-location-card {
    padding: 16px;
    border-radius: 16px;
  }

  .ftlm-card-title {
    font-size: 18px;
  }

  .ftlm-popup {
    min-width: 0;
    max-width: min(240px, calc(100vw - 70px));
  }

  .ftlm-popup h3 {
    font-size: 18px;
  }

  .ftlm-route-button {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  .leaflet-popup-content {
    margin: 12px 14px;
    max-width: calc(100vw - 80px);
  }
}

@media (max-width: 480px) {
  .ftlm-filter-group {
    grid-template-columns: 1fr;
  }

  .ftlm-map {
    min-height: 280px;
  }

  .ftlm-card-address,
  .ftlm-card-meta,
  .ftlm-card-distance,
  .ftlm-popup-row {
    font-size: 13px;
  }
}
