.network-modal {
  padding: 0;
  background: rgba(3, 18, 50, 0.78);
  backdrop-filter: blur(12px);
}

.network-modal-content {
  width: 100%;
  max-width: 1080px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 0;
  border-radius: 0;
  overflow: hidden;
  background: #f5f8fd;
}

.network-header {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(11, 46, 122, 0.1);
}

.network-header-copy {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.network-header-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0b2e7a, #174fa8);
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 46, 122, 0.22);
}

.network-header h2 {
  margin: 0;
  color: #0b2e7a;
  font-size: 1.1rem;
  line-height: 1.15;
}

.network-header p {
  margin: 0.18rem 0 0;
  color: #667696;
  font-size: 0.72rem;
}

.network-close {
  position: static;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #edf2fb;
  color: #0b2e7a;
  font-size: 1.5rem;
}

.network-body {
  padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.network-demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(247, 148, 29, 0.14), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(247, 148, 29, 0.25);
  color: #80500d;
  font-size: 0.72rem;
  line-height: 1.45;
}

.network-demo-banner i {
  margin-top: 0.15rem;
  color: #f7941d;
}

.network-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(130px, 0.7fr)) auto;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.network-field {
  position: relative;
  display: flex;
  align-items: center;
}

.network-field > i {
  position: absolute;
  left: 0.78rem;
  color: #7890b5;
  font-size: 0.82rem;
  pointer-events: none;
}

.network-field input,
.network-field select {
  width: 100%;
  min-height: 45px;
  padding: 0.7rem 0.8rem 0.7rem 2.25rem;
  border: 1px solid rgba(11, 46, 122, 0.12);
  border-radius: 13px;
  background: #fff;
  color: #18366f;
  font-size: 0.76rem;
  outline: none;
  box-shadow: 0 5px 16px rgba(17, 40, 85, 0.04);
}

.network-field input:focus,
.network-field select:focus {
  border-color: rgba(11, 46, 122, 0.38);
  box-shadow: 0 0 0 4px rgba(11, 46, 122, 0.07);
}

.network-location-button {
  min-height: 45px;
  padding: 0 0.9rem;
  border-radius: 13px;
  background: #0b2e7a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(11, 46, 122, 0.18);
}

.network-location-button.is-active {
  background: #157647;
}

.network-location-status {
  grid-column: 1 / -1;
  margin: -0.25rem 0 0;
  color: #60708d;
  font-size: 0.68rem;
}

.network-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(360px, 1.08fr);
  gap: 0.9rem;
  align-items: start;
}

.network-map-card,
.network-results-panel {
  background: #fff;
  border: 1px solid rgba(11, 46, 122, 0.09);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(17, 40, 85, 0.08);
}

.network-map-card {
  position: sticky;
  top: 86px;
  padding: 0.85rem;
}

.network-map-heading,
.network-results-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.network-map-heading h3,
.network-results-heading h3 {
  margin: 0;
  color: #0b2e7a;
  font-size: 0.95rem;
}

.network-map-heading p,
.network-results-heading p {
  margin: 0.12rem 0 0;
  color: #71809c;
  font-size: 0.67rem;
}

.network-map-shell {
  position: relative;
  width: 100%;
  height: clamp(300px, 36vw, 390px);
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, #e9f3ff, #f7fbff);
  border: 1px solid rgba(11, 46, 122, 0.08);
  isolation: isolate;
}

.network-map-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
}

.network-map-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.network-map-shell.map-ready .network-map-image {
  opacity: 1;
}

.network-map-shell.map-error::before {
  content: "No se pudo cargar el mapa";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6c7f9d;
  font-size: 0.75rem;
  font-weight: 700;
}

.network-map-hotspots {
  position: absolute;
  inset: 3% 3% 7%;
  z-index: 3;
}

.network-state-hotspot {
  position: absolute;
  width: 25px;
  height: 25px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(11, 46, 122, 0.3);
  color: #0b2e7a;
  font-size: 0.43rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(17, 40, 85, 0.16);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
  touch-action: manipulation;
}

.network-state-hotspot::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
}

.network-state-hotspot:hover,
.network-state-hotspot:focus-visible {
  transform: translate(-50%, -50%) scale(1.14);
}

.network-state-hotspot:not(.has-data) {
  width: 17px;
  height: 17px;
  color: transparent;
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(11, 46, 122, 0.23);
}

.network-state-hotspot:not(.has-data) .network-state-code {
  display: none;
}

.network-state-hotspot.has-data {
  width: 32px;
  height: 32px;
  background: #0b2e7a;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: 0 7px 16px rgba(11, 46, 122, 0.3);
}

.network-state-hotspot.is-selected {
  background: #f7941d;
  color: #fff;
  transform: translate(-50%, -50%) scale(1.16);
  z-index: 4;
}

.network-state-count {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f7941d;
  color: #fff;
  font-size: 0.5rem;
  border: 2px solid #fff;
}

.network-state-chips {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.7rem 0.05rem 0.15rem;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.network-state-chips::-webkit-scrollbar {
  display: none;
}

.network-state-chip {
  flex: none;
  scroll-snap-align: start;
  padding: 0.45rem 0.62rem;
  border-radius: 999px;
  background: #eef3fb;
  color: #56709c;
  font-size: 0.62rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.network-state-chip.has-data {
  background: rgba(11, 46, 122, 0.08);
  color: #0b2e7a;
}

.network-state-chip.is-selected {
  background: #0b2e7a;
  color: #fff;
}

.network-map-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: 0.6rem;
  padding: 0.7rem 0.75rem;
  border-radius: 13px;
  background: #f6f8fc;
}

.network-map-summary strong {
  display: block;
  color: #0b2e7a;
  font-size: 0.78rem;
}

.network-map-summary span {
  color: #71809c;
  font-size: 0.65rem;
}

.network-map-summary-badge {
  flex: none;
  min-width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(247, 148, 29, 0.14);
  color: #d87500;
  font-weight: 800;
}

.network-results-panel {
  min-height: 500px;
  padding: 0.85rem;
}

.network-sort {
  min-height: 38px;
  padding: 0.5rem 0.65rem;
  border-radius: 11px;
  border: 1px solid rgba(11, 46, 122, 0.12);
  background: #f7f9fc;
  color: #244477;
  font-size: 0.68rem;
}

.network-results-list {
  display: grid;
  gap: 0.7rem;
}

.network-group {
  display: grid;
  gap: 0.55rem;
}

.network-group-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 0;
  color: #0b2e7a;
  font-size: 0.75rem;
  font-weight: 800;
}

.network-group-title span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef3fb;
  color: #56709c;
  font-size: 0.6rem;
}

.agency-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.82rem;
  border: 1px solid rgba(11, 46, 122, 0.09);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #fbfcff);
  box-shadow: 0 7px 18px rgba(17, 40, 85, 0.055);
}

.agency-logo {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--agency-color, #0b2e7a);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  box-shadow: 0 8px 18px rgba(11, 46, 122, 0.2);
}

.agency-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 0.3rem;
}

.agency-main {
  min-width: 0;
}

.agency-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
}

.agency-heading h4 {
  margin: 0;
  color: #0b2e7a;
  font-size: 0.82rem;
  line-height: 1.25;
}

.agency-type {
  display: inline-flex;
  margin-top: 0.22rem;
  padding: 0.25rem 0.42rem;
  border-radius: 999px;
  background: rgba(247, 148, 29, 0.13);
  color: #b76400;
  font-size: 0.56rem;
  font-weight: 800;
}

.agency-demo-tag {
  flex: none;
  padding: 0.22rem 0.4rem;
  border-radius: 999px;
  background: #eef3fb;
  color: #647796;
  font-size: 0.52rem;
  font-weight: 700;
}

.agency-location-line,
.agency-hours {
  display: flex;
  gap: 0.36rem;
  align-items: flex-start;
  margin-top: 0.48rem;
  color: #657694;
  font-size: 0.64rem;
  line-height: 1.4;
}

.agency-location-line i,
.agency-hours i {
  margin-top: 0.13rem;
  color: #2c78d5;
}

.agency-distance {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.45rem;
  padding: 0.28rem 0.42rem;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.1);
  color: #176536;
  font-size: 0.58rem;
  font-weight: 700;
}

.agency-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.52rem;
}

.agency-service {
  padding: 0.27rem 0.42rem;
  border-radius: 8px;
  background: #f1f5fb;
  color: #4d6388;
  font-size: 0.56rem;
}

.agency-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.4rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(11, 46, 122, 0.08);
}

.agency-action {
  min-height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  background: #eef3fb;
  color: #0b2e7a;
  font-size: 0.61rem;
  font-weight: 700;
}

.agency-action.primary {
  background: #0b2e7a;
  color: #fff;
}

.agency-action.whatsapp {
  background: #25d366;
  color: #fff;
}

.agency-socials {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.4rem;
}

.agency-social {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f4fa;
  color: #0b2e7a;
  font-size: 0.72rem;
}

.network-empty {
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed rgba(11, 46, 122, 0.2);
  border-radius: 17px;
  color: #6a7893;
}

.network-empty i {
  display: block;
  margin-bottom: 0.65rem;
  color: #f7941d;
  font-size: 1.6rem;
}

.network-loading {
  padding: 2rem;
  text-align: center;
  color: #62718d;
  font-size: 0.75rem;
}

.network-loading i {
  margin-right: 0.4rem;
  color: #0b2e7a;
}

.network-source-note {
  margin: 0.65rem 0 0;
  color: #8a96aa;
  font-size: 0.57rem;
  text-align: center;
}

@media (min-width: 760px) {
  .network-modal {
    padding: 1.2rem;
  }

  .network-modal-content {
    min-height: auto;
    max-height: calc(100vh - 2.4rem);
    border-radius: 28px;
    overflow-y: auto;
  }

  .network-body {
    padding: 1rem 1.15rem 1.4rem;
  }

  .network-header h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 860px) {
  .network-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .network-field-search {
    grid-column: 1 / -1;
  }

  .network-location-button {
    width: 100%;
  }

  .network-layout {
    grid-template-columns: 1fr;
  }

  .network-map-card {
    position: static;
  }

  .network-map-shell {
    height: clamp(270px, 64vw, 350px);
  }

  .network-results-panel {
    min-height: 0;
  }
}

@media (max-width: 520px) {
  .network-header {
    padding: 0.72rem 0.8rem;
  }

  .network-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .network-header h2 {
    font-size: 0.95rem;
  }

  .network-header p {
    font-size: 0.62rem;
  }

  .network-body {
    padding: 0.75rem 0.68rem 1.3rem;
  }

  .network-demo-banner {
    margin-bottom: 0.65rem;
    padding: 0.62rem 0.7rem;
    font-size: 0.65rem;
  }

  .network-toolbar {
    grid-template-columns: 1fr;
    gap: 0.48rem;
    margin-bottom: 0.68rem;
  }

  .network-field-search,
  .network-location-status {
    grid-column: auto;
  }

  .network-field input,
  .network-field select,
  .network-location-button {
    min-height: 42px;
  }

  .network-map-card,
  .network-results-panel {
    border-radius: 18px;
  }

  .network-map-card {
    padding: 0.7rem;
  }

  .network-map-heading {
    align-items: center;
    margin-bottom: 0.5rem;
  }

  .network-map-heading p {
    display: none;
  }

  .network-map-shell {
    height: 255px;
    max-height: 255px;
    border-radius: 15px;
  }

  .network-map-image {
    padding: 0.08rem;
  }

  .network-map-hotspots {
    inset: 3% 2% 8%;
  }

  .network-state-hotspot {
    width: 20px;
    height: 20px;
    font-size: 0.36rem;
  }

  .network-state-hotspot:not(.has-data) {
    width: 12px;
    height: 12px;
  }

  .network-state-hotspot.has-data {
    width: 28px;
    height: 28px;
  }

  .network-state-chip {
    padding: 0.4rem 0.55rem;
    font-size: 0.58rem;
  }

  .network-map-summary {
    margin-top: 0.5rem;
    padding: 0.6rem 0.65rem;
  }

  .network-source-note {
    margin-top: 0.48rem;
  }

  .agency-card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.72rem;
  }

  .agency-logo {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .agency-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .network-map-heading,
  .network-results-heading {
    align-items: flex-start;
  }

  .network-results-heading {
    flex-direction: column;
  }

  .network-sort {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .network-map-shell {
    height: 225px;
    max-height: 225px;
  }

  .network-state-hotspot.has-data {
    width: 26px;
    height: 26px;
  }
}


/* Mapa interactivo nacional basado en Leaflet y OpenStreetMap */
.network-map-shell {
  position: relative !important;
  width: 100% !important;
  height: clamp(360px, 45vw, 470px) !important;
  min-height: 360px !important;
  max-height: 470px !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, #dceaf6, #eef5fa) !important;
  border: 1px solid rgba(11, 46, 122, 0.12) !important;
  isolation: isolate;
}

.network-map-shell::after,
.network-map-shell.map-error::before {
  display: none !important;
}

.network-map-image,
.network-map-hotspots {
  display: none !important;
}

.network-leaflet-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.network-map-shell .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: inherit;
  background: #dfeaf3;
  outline: none;
}

.network-map-shell .leaflet-control-zoom {
  border: 0;
  border-radius: 13px;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(17, 40, 85, 0.2);
}

.network-map-shell .leaflet-control-zoom a {
  width: 34px;
  height: 34px;
  line-height: 34px;
  border: 0;
  color: #0b2e7a;
  font-weight: 800;
}

.network-map-shell .leaflet-control-attribution {
  max-width: calc(100% - 12px);
  padding: 2px 6px;
  border-radius: 8px 0 0 0;
  background: rgba(255, 255, 255, 0.88);
  color: #60708d;
  font-size: 0.54rem;
}

.network-map-legend {
  display: grid;
  gap: 0.28rem;
  padding: 0.48rem 0.58rem;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 7px 18px rgba(17, 40, 85, 0.18);
  color: #4f6385;
  font-size: 0.56rem;
  font-weight: 700;
}

.network-map-legend span {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.network-map-legend i {
  display: inline-block;
  flex: none;
}

.network-map-legend .state-symbol {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #0b2e7a;
  box-shadow: 0 2px 5px rgba(11, 46, 122, 0.3);
}

.network-map-legend .agency-symbol {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  background: #f7941d;
  box-shadow: 0 2px 5px rgba(247, 148, 29, 0.35);
}

.network-map-status {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.2rem;
  text-align: center;
  background: linear-gradient(145deg, #e8f2fb, #f7fbff);
  color: #536a8d;
  font-size: 0.74rem;
  font-weight: 700;
}

.network-map-status[hidden] {
  display: none !important;
}

.network-map-status i {
  color: #0b2e7a;
  font-size: 1.5rem;
}

.network-map-shell.is-error .network-map-status i,
.network-map-status-error i {
  color: #f7941d;
}

.network-state-map-icon,
.network-agency-map-icon,
.network-user-map-icon {
  background: transparent !important;
  border: 0 !important;
}

.network-state-map-marker {
  position: relative;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.94);
  color: #476187;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  box-shadow: 0 5px 14px rgba(17, 40, 85, 0.22);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.network-state-map-marker:hover {
  transform: scale(1.12);
}

.network-state-map-marker.has-data {
  width: 35px;
  height: 35px;
  background: #0b2e7a;
  color: #fff;
  box-shadow: 0 7px 18px rgba(11, 46, 122, 0.34);
}

.network-state-map-marker.is-selected {
  background: #f7941d;
  color: #fff;
  transform: scale(1.14);
  box-shadow: 0 7px 19px rgba(247, 148, 29, 0.42);
}

.network-state-map-marker b {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #f7941d;
  color: #fff;
  font-size: 0.52rem;
  line-height: 1;
}

.network-agency-map-pin {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #fff;
  background: var(--pin-color, #0b2e7a);
  box-shadow: 0 9px 20px rgba(17, 40, 85, 0.4);
}

.network-agency-map-pin span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: rotate(45deg);
  background: rgba(255, 255, 255, 0.96);
  color: var(--pin-color, #0b2e7a);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.network-user-map-marker {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #137ad4;
  color: #fff;
  box-shadow: 0 0 0 7px rgba(19, 122, 212, 0.2), 0 8px 18px rgba(17, 40, 85, 0.28);
}

.network-map-shell .leaflet-tooltip {
  padding: 0.34rem 0.5rem;
  border: 0;
  border-radius: 9px;
  background: rgba(9, 35, 83, 0.94);
  color: #fff;
  font-family: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(17, 40, 85, 0.25);
}

.network-map-shell .leaflet-tooltip-top::before {
  border-top-color: rgba(9, 35, 83, 0.94);
}

.network-map-shell .leaflet-popup-content-wrapper {
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(17, 40, 85, 0.2);
}

.network-map-shell .leaflet-popup-content {
  margin: 0.78rem 0.85rem;
  font-family: inherit;
}

.network-map-popup {
  min-width: 190px;
}

.network-map-popup strong {
  display: block;
  color: #0b2e7a;
  font-size: 0.76rem;
  line-height: 1.25;
}

.network-map-popup > span {
  display: block;
  margin-top: 0.28rem;
  color: #647694;
  font-size: 0.62rem;
  line-height: 1.4;
}

.network-map-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.38rem;
  margin-top: 0.62rem;
}

.network-map-popup-actions button,
.network-map-popup-actions a {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.48rem;
  border-radius: 9px;
  background: #eef3fb;
  color: #0b2e7a;
  font-size: 0.58rem;
  font-weight: 800;
  text-align: center;
}

.network-map-popup-actions a {
  background: #0b2e7a;
  color: #fff;
}

.agency-card {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.agency-card.is-map-highlighted {
  border-color: rgba(247, 148, 29, 0.72);
  box-shadow: 0 0 0 4px rgba(247, 148, 29, 0.12), 0 12px 28px rgba(17, 40, 85, 0.12);
  transform: translateY(-2px);
}

.network-map-heading > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(11, 46, 122, 0.08);
  color: #0b2e7a;
}

@media (max-width: 860px) {
  .network-map-shell {
    height: 380px !important;
    min-height: 380px !important;
    max-height: 380px !important;
  }
}

@media (max-width: 520px) {
  .network-map-shell {
    height: 330px !important;
    min-height: 330px !important;
    max-height: 330px !important;
    border-radius: 15px !important;
  }

  .network-state-map-marker {
    width: 27px;
    height: 27px;
    font-size: 0.46rem;
  }

  .network-state-map-marker.has-data {
    width: 31px;
    height: 31px;
  }

  .network-state-map-marker b {
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    font-size: 0.46rem;
  }

  .network-agency-map-pin {
    width: 34px;
    height: 34px;
  }

  .network-agency-map-pin span {
    width: 21px;
    height: 21px;
    font-size: 0.43rem;
  }

  .network-map-shell .leaflet-control-attribution {
    font-size: 0.48rem;
  }
}

@media (max-width: 390px) {
  .network-map-shell {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
  }
}
