/* FM Frequency Map */

.fmfm {
  --fmfm-blue: #3388ff;
  --fmfm-red: #cc0000;
  --fmfm-grey: #999999;
  --fmfm-muted: #5c6773;
  --fmfm-soft: #f4f6f8;
  margin: 0 0 1.5em;
}

.fmfm [hidden] {
  display: none !important;
}

/* ---- Reglage ---- */

.fmfm .fmfm-controls {
  margin-bottom: 10px;
}

.fmfm .fmfm-label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
}

.fmfm .fmfm-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Reglaget fyller ut raden, så att raden blir lika bred som kartan */
.fmfm .fmfm-slider {
  flex: 1 1 220px;
  min-width: 0;
  max-width: none;
  width: auto;
  margin: 0;
  accent-color: var(--fmfm-blue);
}

.fmfm .fmfm-step {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  text-transform: none;
  box-shadow: none;
  cursor: pointer;
}

.fmfm .fmfm-step:hover,
.fmfm .fmfm-step:focus-visible {
  background: var(--fmfm-soft);
  color: #000;
}

.fmfm .fmfm-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.fmfm .fmfm-input {
  width: 4.4em;
  margin: 0;
  padding: 4px 6px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 1.15em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
  box-shadow: none;
}

.fmfm .fmfm-input.is-invalid {
  border-color: var(--fmfm-red);
  outline-color: var(--fmfm-red);
}

.fmfm .fmfm-hint {
  margin: 6px 0 0;
  color: var(--fmfm-red);
  font-size: 0.9em;
}

.fmfm .fmfm-hint:empty {
  display: none;
}

/* ---- Antal sändare ---- */

.fmfm .fmfm-status {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 10px 0 0;
}

.fmfm .fmfm-count {
  font-weight: 700;
}

.fmfm .fmfm-zoom {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--fmfm-muted);
  font: inherit;
  font-size: 0.9em;
  text-transform: none;
  letter-spacing: normal;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  box-shadow: none;
  cursor: pointer;
}

.fmfm .fmfm-zoom:hover,
.fmfm .fmfm-zoom:focus-visible {
  background: none;
  color: var(--fmfm-blue);
  text-decoration-style: solid;
}

/* ---- Teckenförklaring ---- */

.fmfm .fmfm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  color: var(--fmfm-muted);
  font-size: 0.9em;
}

.fmfm .fmfm-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.fmfm .fmfm-legend li::before {
  content: none;
}

.fmfm .fmfm-legend img {
  width: 12px;
  height: 20px;
  margin: 0;
}

.fmfm .fmfm-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--fmfm-grey);
  border-radius: 50%;
  background: rgba(153, 153, 153, 0.25);
}

.fmfm .fmfm-legend .fmfm-note {
  flex-basis: 100%;
  font-size: 0.95em;
}

/* ---- Kartan ---- */

.fmfm .fmfm-map {
  width: 100%;
  max-width: 100%;
  height: min(var(--fmfm-map-h, 650px), 75vh);
  min-height: min(320px, var(--fmfm-map-h, 650px));
  position: relative;
  z-index: 0; /* håller Leaflets lager under temats meny */
  border-radius: 4px;
}

.fmfm .fmfm-map .leaflet-popup-content {
  line-height: 1.45;
}

/* ---- Pluginets namn och version (samma stil som FM Frequency List) ---- */

.fmfm .fmfm-credit {
  margin: 28px 0 0;
  padding: 0;
  color: #5b6879;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-align: right;
}
