/* All widget styles are scoped; the host page keeps its own typography/layout. */
.fadn-map {
  --fadn-font: "Proxima Nova", Arial, sans-serif;
  --fadn-map-width: 620px;
  --fadn-purple: #c63bf4;
  --fadn-purple-bg: rgb(198 59 244 / 29%);
  --fadn-blue: #066fb2;
  --fadn-blue-bg: rgb(13 113 251 / 20%);
  position: relative;
  color: #1f1f1f;
  font-family: var(--fadn-font);
  font-size: 14px;
  line-height: 1.4;
}

.fadn-map *, .fadn-map *::before, .fadn-map *::after { box-sizing: border-box; }
.fadn-map [hidden] { display: none !important; }

.fadn-map__select-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(100%, 280px);
  margin: 0 auto 20px;
  font-size: 12px;
  font-weight: 700;
}

.fadn-map__select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d6e4ff;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font: 14px var(--fadn-font);
  cursor: pointer;
}

.fadn-map__stage {
  position: relative;
  width: min(100%, var(--fadn-map-width));
  margin: 0 auto;
}

.fadn-map__image { display: block; width: 100%; height: auto; }
.fadn-map__pins { position: absolute; inset: 0; pointer-events: none; }

.fadn-map__pin {
  position: absolute;
  display: block;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #0d71fb;
  transform: translate(-50%, -50%);
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.fadn-map__pin:hover, .fadn-map__pin[aria-expanded="true"] {
  box-shadow: inset 0 0 0 1.5px rgb(13 113 251 / 65%);
}

.fadn-map :is(button, a, select):focus-visible {
  outline: 2px solid #0d71fb;
  outline-offset: 3px;
}

.fadn-map__hint {
  margin: 16px 0 0;
  color: #626262;
  font-size: 12px;
  text-align: center;
}

.fadn-map__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.fadn-map__popover {
  position: fixed;
  inset: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 344px;
  max-width: calc(100vw - 24px);
  max-height: min(440px, calc(100dvh - 24px));
  padding: 20px;
  margin: 0;
  border: 0;
  border-radius: 12px 12px 12px 0;
  background: #fff;
  color: #1f1f1f;
  box-shadow: 0 4px 17px rgb(0 0 0 / 8%);
  font-family: var(--fadn-font);
  text-align: left;
  overscroll-behavior: contain;
  overflow-y: auto;
}

.fadn-map__popover-header { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.fadn-map__service { flex: 1; min-width: 0; }
.fadn-map__service-title {
  margin: 0 0 4px;
  color: inherit;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 19px;
  overflow-wrap: anywhere;
}

.fadn-map__close {
  order: 1;
  display: flex;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0 -6px 0 0;
  padding: 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.fadn-map__close:hover { background: #f3f6fb; }
.fadn-map__close img { display: block; flex: none; max-width: none; }
.fadn-map__icon { position: relative; display: block; flex: none; width: 10px; height: 10px; }
.fadn-map__icon img { position: absolute; left: -0.5px; top: -0.5px; }
.fadn-map__icon--email, .fadn-map__icon--email-secondary { height: 7.777778px; }
.fadn-map__icon--close { width: 12px; height: 12px; }
.fadn-map__icon--close img { left: -1px; top: -1px; }

.fadn-map__contacts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.fadn-map__contacts--service { gap: 12px; }
.fadn-map__contacts--paired { display: grid; grid-template-columns: minmax(0, 1fr) max-content; width: 100%; }
.fadn-map__contacts--paired .fadn-map__badge--email { width: 100%; }
.fadn-map__badge {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  max-width: 100%;
  min-height: 27px;
  padding: 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  text-decoration: none;
}
.fadn-map__badge--location, .fadn-map__badge--email { color: var(--fadn-purple); background: var(--fadn-purple-bg); }
.fadn-map__badge--phone { color: var(--fadn-blue); background: var(--fadn-blue-bg); }
.fadn-map__badge--email { width: 183px; }
.fadn-map__badge img { display: block; flex: none; max-width: none; }
.fadn-map__badge span { min-width: 0; overflow-wrap: anywhere; }
.fadn-map a.fadn-map__badge:hover { color: inherit; text-decoration: underline; }

.fadn-map__divider { flex: 0 0 0.5px; height: 0.5px; overflow: hidden; }
.fadn-map__divider img { display: block; max-width: none; }
.fadn-map__advisors { display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.fadn-map__advisors-title { margin: 0; color: inherit; font: 700 14px/17px var(--fadn-font); }
.fadn-map__advisor { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }
.fadn-map__advisor-name { margin: 0; color: inherit; font: 400 14px/17px var(--fadn-font); }
.fadn-map__advisor-fields { margin: 0; font-size: 12px; line-height: 1.4; }
.fadn-map__advisor-fields div + div { margin-top: 2px; }
.fadn-map__advisor-fields dt, .fadn-map__advisor-fields dd { display: inline; margin: 0; }
.fadn-map__advisor-fields dt { font-weight: 700; }
.fadn-map__advisor-fields dt::after { content: ": "; }

@media (max-width: 600px) {
  .fadn-map__popover { max-height: 60dvh; }
  .fadn-map__close { flex-basis: 32px; width: 32px; height: 32px; }
}
