.map-beta-control {
  position: relative;
  width: auto;
  min-height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: background .18s ease;
}

.map-beta-control:hover {
  background: rgba(18, 111, 114, .055);
}

.map-beta-control:has(input:checked) {
  background: transparent;
}

.map-beta-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.map-beta-control:has(input:focus-visible) {
  outline: 3px solid rgba(62, 130, 189, .22);
  outline-offset: 2px;
}

.map-beta-switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  border: 1px solid rgba(100, 123, 121, .25);
  border-radius: 999px;
  background: #d6e1df;
  transition: background .2s ease, border-color .2s ease;
}

.map-beta-switch i {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(23, 50, 49, .22);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}

.map-beta-control input:checked + .map-beta-switch {
  border-color: #3f8f22;
  background: linear-gradient(135deg, #3f8f22, #2d8588);
}

.map-beta-control input:checked + .map-beta-switch i { transform: translateX(-16px); }
.map-beta-label {
  color: #456360;
  font-size: 9.2px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.map-beta-label-mobile { display: none; }

.provider-option {
  margin: 11px 0;
}

.provider-option-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  direction: rtl;
}

.provider-option-heading .ent-name { min-width: 0; }
.provider-option-details { margin-top: 2px; }

.provider-map-shell {
  overflow: hidden;
  margin-top: 15px;
  border: 1px solid rgba(18, 111, 114, .18);
  border-radius: 24px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 24px 64px -42px rgba(13, 95, 98, .9);
}

.provider-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background:
    radial-gradient(circle at 12% 0, rgba(143, 222, 213, .22), transparent 34%),
    linear-gradient(120deg, #f4fbfa, #eef6fb);
  border-bottom: 1px solid rgba(18, 111, 114, .11);
}

.provider-map-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.provider-map-title-icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #126f72, #3f8f22);
  color: #fff;
  box-shadow: 0 14px 28px -18px rgba(13, 95, 98, .9);
}
.provider-map-title strong { display: block; color: #173231; font-size: 12px; line-height: 1.25; }
.provider-map-title small { display: block; margin-top: 2px; color: #647b79; font-size: 9.2px; }
.provider-map-source {
  flex: none;
  padding: 5px 9px;
  border: 1px solid rgba(63, 143, 34, .18);
  border-radius: 999px;
  background: rgba(63, 143, 34, .08);
  color: #317218;
  font-size: 8.4px;
  font-weight: 900;
}

.provider-map-disclosure { display: none; }
.provider-map-content { display: block; }

.provider-origin {
  padding: 14px 16px 15px;
  border-bottom: 1px solid rgba(18, 111, 114, .11);
  background:
    radial-gradient(circle at 92% 12%, rgba(143, 222, 213, .18), transparent 36%),
    #fff;
}

.provider-origin-agent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.provider-origin-spark {
  width: 24.8px;
  height: 24.8px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(18, 111, 114, .12), rgba(63, 143, 34, .12));
  color: #126f72;
}
.provider-origin-spark svg { width: 14.4px; height: 14.4px; }
.provider-origin-agent strong { display: block; color: #173231; font-size: 10.8px; line-height: 1.35; }
.provider-origin-agent small { display: block; margin-top: 2px; color: #647b79; font-size: 9.2px; line-height: 1.45; }

.provider-origin-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  margin-top: 12px;
}
.provider-origin-form label { min-width: 0; }
.provider-origin-label {
  display: block;
  margin: 0 3px 5px;
  color: #55716e;
  font-size: 8.4px;
  font-weight: 800;
}
.provider-origin-input-wrap {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid #bdd6d2;
  border-radius: 12px;
  background: #fbfdfc;
  color: #647b79;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.provider-origin-input-wrap:focus-within {
  border-color: #2d8588;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 111, 114, .09);
}
.provider-origin-input-wrap svg { width: 12.8px; height: 12.8px; flex: none; }
.provider-origin-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #173231;
  font: 600 10px/1.2 'Open Sans', Arial, sans-serif;
}
.provider-origin-input::placeholder { color: #8aa09d; font-weight: 600; }

.provider-origin-find,
.provider-origin-pin {
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  cursor: pointer;
  font: 800 9.2px/1.2 'Open Sans', Arial, sans-serif;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.provider-origin-find {
  border: 0;
  background: linear-gradient(145deg, #126f72, #3f8f22);
  color: #fff;
  box-shadow: 0 12px 24px -18px rgba(13, 95, 98, .92);
}
.provider-origin-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #bdd6d2;
  background: #fff;
  color: #126f72;
}
.provider-origin-pin svg { width: 12px; height: 12px; }
.provider-origin-find:hover:not(:disabled),
.provider-origin-pin:hover:not(:disabled) { transform: translateY(-1px); }
.provider-origin-pin.active {
  border-color: #126f72;
  background: #e6f3f1;
  box-shadow: 0 0 0 4px rgba(18, 111, 114, .09);
}
.provider-origin-find:focus-visible,
.provider-origin-pin:focus-visible { outline: 3px solid rgba(62, 130, 189, .2); outline-offset: 2px; }
.provider-origin-find:disabled,
.provider-origin-pin:disabled { cursor: wait; opacity: .58; }
.provider-origin-status {
  min-height: 0;
  margin: 0 3px;
  color: #647b79;
  font-size: 8.4px;
  font-weight: 700;
  line-height: 1.4;
}
.provider-origin-status:not(:empty) { margin-top: 8px; min-height: 15px; }
.provider-origin-status.busy::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-inline-end: 6px;
  border: 2px solid rgba(18, 111, 114, .22);
  border-top-color: #126f72;
  border-radius: 50%;
  animation: providerOriginSpin .8s linear infinite;
}
.provider-origin-status.success { color: #317218; }
.provider-origin-status.error { color: #9b4f48; }
@keyframes providerOriginSpin { to { transform: rotate(360deg); } }

.provider-map-canvas { height: 330px; background: #eaf2f0; direction: ltr; }
.provider-map-shell.pinning .provider-map-canvas { cursor: crosshair; }
.provider-map-canvas .leaflet-control-attribution { font-size: 7.2px; }
.provider-map-canvas .leaflet-popup-content-wrapper { border-radius: 15px; }
.provider-map-canvas .leaflet-popup-content {
  max-height: 150px;
  margin: 12px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  direction: rtl;
  font-family: 'Open Sans', Arial, sans-serif;
  scrollbar-width: thin;
}
.provider-map-canvas .leaflet-popup-content strong { display: block; color: #173231; font-size: 10.4px; }
.provider-map-canvas .leaflet-popup-content span { color: #647b79; font-size: 9.2px; }
.provider-map-popup-choose {
  min-height: 34px;
  margin-top: 8px;
  padding: 5px 10px;
  border: 0;
  border-radius: 9px;
  background: #126f72;
  color: #fff;
  cursor: pointer;
  font: 700 9.2px/1.2 'Open Sans', Arial, sans-serif;
}
.provider-map-popup-choose:hover,
.provider-map-popup-choose:focus-visible { background: #0d5f62; outline: 2px solid rgba(18, 111, 114, .16); }
.provider-map-popup-shared { display: grid; gap: 9px; }
.provider-map-popup-shared > div + div { padding-top: 9px; border-top: 1px solid #dfecea; }

.provider-map-point {
  width: 20px !important;
  height: 20px !important;
  margin: -10px 0 0 -10px !important;
  display: grid !important;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #2d8588;
  box-shadow: 0 5px 14px rgba(13, 95, 98, .32);
}
.provider-map-point > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
}
.provider-map-point-group {
  width: 32px !important;
  height: 32px !important;
  margin: -16px 0 0 -16px !important;
  background: linear-gradient(145deg, #126f72, #3f8f22);
  color: #fff;
  box-shadow: 0 0 0 5px rgba(18, 111, 114, .12), 0 8px 18px rgba(13, 95, 98, .34);
}
.provider-map-point-group > span {
  width: auto;
  height: auto;
  background: transparent;
  color: #fff;
  font: 800 9.6px/1 'Open Sans', Arial, sans-serif;
}

.provider-origin-marker {
  width: 24px !important;
  height: 24px !important;
  margin: -12px 0 0 -12px !important;
  display: grid !important;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #3e82bd;
  box-shadow: 0 0 0 6px rgba(62, 130, 189, .18), 0 8px 20px rgba(25, 84, 134, .34);
}
.provider-origin-marker span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.provider-map-explore {
  min-height: 34px;
  display: flex;
  align-items: center;
  padding: 7px 13px;
  border-top: 1px solid rgba(18, 111, 114, .08);
  background: #f3f8f7;
  color: #55716e;
  font-size: 9.2px;
  font-weight: 700;
}
.provider-map-explore::before {
  content: "";
  width: 9px;
  height: 9px;
  flex: none;
  margin-inline-end: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #2d8588;
  box-shadow: 0 0 0 1px rgba(18, 111, 114, .14);
}

.provider-map-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border-top: 1px solid rgba(18, 111, 114, .12);
  background: #fff;
}
.provider-map-selection[hidden] { display: none; }
.provider-map-selection-copy { min-width: 0; }
.provider-map-selection-copy > span {
  display: block;
  margin-bottom: 2px;
  color: #2d8588;
  font-size: 8px;
  font-weight: 900;
}
.provider-map-selection-copy strong { display: block; color: #173231; font-size: 10.8px; line-height: 1.35; }
.provider-map-selection-copy small { display: block; margin-top: 2px; color: #647b79; font-size: 9.2px; line-height: 1.35; }
.provider-map-selection-copy a { display: inline-block; margin-top: 4px; color: #126f72; font-size: 8.8px; font-weight: 800; }
.provider-map-selection-followup {
  min-height: 38px;
  padding: 7px 13px;
  border: 0;
  border-radius: 11px;
  background: #126f72;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 9.6px;
  font-weight: 800;
}
.provider-map-selection-followup:hover,
.provider-map-selection-followup:focus-visible { background: #0d5f62; outline: 3px solid rgba(18, 111, 114, .15); }
.provider-map-selection-followup:disabled { cursor: default; opacity: .62; }
.provider-map-selection.sent { background: #f7fbfa; }
.provider-map-state {
  min-height: 104px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #647b79;
  text-align: center;
  font-size: 10.4px;
  background:
    radial-gradient(circle at 50% 0, rgba(143, 222, 213, .14), transparent 58%),
    linear-gradient(180deg, rgba(247, 251, 250, .92), #fff);
}
.provider-map-loading-mark {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(18, 111, 114, .14);
  border-top-color: #126f72;
  border-radius: 50%;
  animation: providerMapLoading .72s linear infinite;
}
@keyframes providerMapLoading { to { transform: rotate(360deg); } }
/* Until the map is ready, show only a slim loading line instead of the full
   card, so a map that fails does not flash a large box before its note. */
.provider-map-shell.is-pending {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.provider-map-shell.is-pending .provider-map-head,
.provider-map-shell.is-pending .provider-map-disclosure,
.provider-map-shell.is-pending .provider-origin { display: none; }
.provider-map-shell.is-pending .provider-map-content { display: block; }
.provider-map-shell.is-pending .provider-map-state {
  min-height: 0;
  padding: 4px 0;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  background: none;
  color: #7f94a8;
  font-size: 11.2px;
  text-align: start;
}
.provider-map-shell.is-pending .provider-map-loading-mark { width: 12px; height: 12px; border-width: 2px; }

/* Calm, neutral replacement for a map that could not be shown. */
.provider-map-note {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fafafa;
  color: #647b79;
  font-size: 11.2px;
  line-height: 1.5;
}

.provider-nearest {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-top: 1px solid rgba(18, 111, 114, .12);
  background:
    radial-gradient(circle at 8% 0, rgba(143, 222, 213, .18), transparent 34%),
    linear-gradient(125deg, #f8fcfb, #f1f8f6);
  animation: providerNearestIn .34s cubic-bezier(.2, .8, .2, 1);
}
@keyframes providerNearestIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.provider-nearest-badge {
  min-width: 70px;
  padding: 8px 9px;
  border: 1px solid rgba(63, 143, 34, .19);
  border-radius: 12px;
  background: rgba(63, 143, 34, .09);
  color: #317218;
  text-align: center;
}
.provider-nearest-badge span { display: block; font-size: 7.2px; font-weight: 900; line-height: 1.2; }
.provider-nearest-badge strong { display: block; margin-top: 2px; font: 700 12.8px/1.1 'Open Sans', Arial, sans-serif; }
.provider-nearest-copy { min-width: 0; }
.provider-nearest-copy > strong { display: block; color: #173231; font-size: 10.8px; line-height: 1.35; }
.provider-nearest-copy > small { display: block; margin-top: 2px; color: #647b79; font-size: 9.2px; line-height: 1.4; }
.provider-nearest-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 5px; color: #2d8588; font-size: 8.4px; font-weight: 800; }
.provider-nearest-meta span + span::before { content: "•"; margin-inline-end: 8px; color: #8aa09d; }
.provider-nearest-actions { display: flex; align-items: center; gap: 7px; }
.provider-nearest-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid #bdd6d2;
  border-radius: 11px;
  background: #fff;
  color: #126f72;
  cursor: pointer;
  white-space: nowrap;
  font: 800 9.2px/1.2 'Open Sans', Arial, sans-serif;
}
.provider-nearest-actions a:hover { transform: translateY(-1px); }

@media (max-width: 620px) {
  .map-beta-control { min-height: 44px; gap: 5px; padding-inline: 3px; }
  .map-beta-label { font-size: 8.8px; }
  .map-beta-label-desktop { display: none; }
  .map-beta-label-mobile { display: inline; }
  .provider-option { margin-block: 10px; }
  .provider-map-shell { margin-top: 12px; border-radius: 20px; }
  .provider-map-head { gap: 10px; padding: 12px 13px; }
  .provider-map-title { gap: 9px; }
  .provider-map-title-icon { width: 36px; height: 36px; border-radius: 12px; }
  .provider-map-title strong { font-size: 11.2px; }
  .provider-map-title small { font-size: 8.8px; line-height: 1.35; }
  .provider-map-disclosure {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    border: 0;
    border-top: 1px solid rgba(18, 111, 114, .08);
    background: #fff;
    color: #126f72;
    cursor: pointer;
    font: 800 10px/1.35 'Open Sans', Arial, sans-serif;
    text-align: right;
  }
  .provider-map-disclosure svg { width: 14.4px; height: 14.4px; flex: none; transition: transform .18s ease; }
  .provider-map-disclosure[aria-expanded="true"] svg { transform: rotate(180deg); }
  .provider-map-shell:not(.expanded) .provider-map-content { display: none; }
  .provider-origin { padding: 12px; }
  .provider-origin-agent strong { font-size: 10.4px; }
  .provider-origin-form { grid-template-columns: minmax(0, 1fr) auto; }
  .provider-origin-form label { grid-column: 1 / -1; }
  .provider-origin-find,
  .provider-origin-pin { min-height: 44px; }
  .provider-map-canvas { height: 210px; }
  .provider-map-explore { min-height: 38px; padding-inline: 11px; font-size: 8.8px; }
  .provider-map-popup-choose { min-height: 44px; }
  .provider-map-source { display: none; }
  .provider-map-selection { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .provider-map-selection-copy strong { font-size: 11.2px; }
  .provider-map-selection-copy small { font-size: 9.6px; }
  .provider-map-selection-followup {
    width: 100%;
    min-height: 44px;
    padding-inline: 12px;
    border-radius: 12px;
    font-size: 9.6px;
  }
  .provider-nearest { grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 12px; }
  .provider-nearest-actions { grid-column: 1 / -1; }
  .provider-nearest-actions a { min-height: 44px; flex: 1; }
}

@media (max-width: 380px) {
  .map-beta-control { gap: 4px; padding-inline: 1px; }
  .map-beta-label { font-size: 8.4px; }
  .provider-map-canvas { height: 225px; }
  .provider-map-selection { padding: 10px; }
}

.provider-map-tooltip { direction: rtl; white-space: pre-line; width: max-content; max-width: min(280px, calc(100vw - 70px)); font: 400 11.2px/1.5 'Open Sans', Arial, sans-serif; color: #071c3b; }
.provider-map-shell { border-radius: 12px; box-shadow: none; }
.provider-map-head, .provider-origin, .provider-nearest { background: #fafafa; }
.provider-map-head { border-bottom: 1px solid #ecf0f9; }
.provider-origin-find, .provider-map-selection-followup, .provider-map-popup-choose { background: #00667d; }
