.winemaker-map-block {
  position: relative;
  z-index: 0;
  isolation: isolate;
  margin-top: clamp(64px, 8vw, 104px);
  padding-top: clamp(42px, 6vw, 72px);
  border-top: 1px solid var(--color-line);
}

.winemaker-map-heading {
  margin-bottom: 28px;
}

.winemaker-map-heading h3 {
  margin: 0;
  color: var(--color-burgundy);
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.13;
  letter-spacing: -0.025em;
}

.winemaker-map-locate {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
}

.winemaker-map-locate[hidden] {
  display: none;
}

.winemaker-map-locate label {
  color: var(--color-burgundy);
  font-size: 0.88rem;
  font-weight: 750;
}

.winemaker-map-combobox {
  position: relative;
  width: min(100%, 320px);
}

.winemaker-map-combobox input {
  width: 100%;
  min-height: 42px;
  padding: 7px 38px 7px 13px;
  border: 1px solid rgba(97, 18, 23, 0.25);
  border-radius: 8px;
  color: var(--color-ink);
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  text-overflow: ellipsis;
  cursor: pointer;
}

.winemaker-map-combobox input:focus-visible {
  border-color: var(--color-plum);
  outline: 2px solid var(--color-plum);
  outline-offset: 2px;
}

.winemaker-map-combobox-arrow {
  position: absolute;
  top: 16px;
  right: 17px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--color-burgundy);
  border-bottom: 2px solid var(--color-burgundy);
  pointer-events: none;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.winemaker-map-locate.is-open .winemaker-map-combobox-arrow {
  transform: translateY(4px) rotate(225deg);
}

.winemaker-map-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 10;
  max-height: 285px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(97, 18, 23, 0.2);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(54, 14, 21, 0.16);
  list-style: none;
}

.winemaker-map-options[hidden],
.winemaker-map-option[hidden],
.winemaker-map-option-empty[hidden] {
  display: none;
}

.winemaker-map-option {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: baseline;
  padding: 9px 10px;
  border-radius: 7px;
  cursor: pointer;
  line-height: 1.3;
}

.winemaker-map-option:hover,
.winemaker-map-option.is-active {
  background: rgba(224, 224, 234, 0.5);
}

.winemaker-map-option-stand {
  color: var(--color-burgundy);
  font-size: 0.73rem;
  font-weight: 800;
}

.winemaker-map-option-name {
  min-width: 0;
  color: var(--color-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.winemaker-map-option-canton {
  grid-column: 2;
  color: var(--color-muted);
  font-size: 0.74rem;
}

.winemaker-map-option-empty {
  padding: 14px 10px;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.winemaker-map-results {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.winemaker-map-frame {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(97, 18, 23, 0.18);
  border-radius: 18px;
  background: #fbf8f4;
  box-shadow: 0 18px 48px rgba(76, 31, 36, 0.07);
}

.winemaker-map {
  position: relative;
  z-index: 0;
  width: 100%;
  height: clamp(390px, 49vw, 540px);
  background: #fbf8f4;
  font: inherit;
}

.winemaker-map:focus {
  outline: 0;
}

.winemaker-map-status {
  position: absolute;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 30px;
  color: var(--color-burgundy);
  background: rgba(251, 248, 244, 0.94);
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.winemaker-map-status[hidden],
.winemaker-map-reset[hidden],
.winemaker-map-touch-toggle[hidden],
.winemaker-map-info[hidden],
.winemaker-map-info-panel[hidden] {
  display: none;
}

.winemaker-map-noscript {
  color: var(--color-burgundy);
  font-weight: 650;
}

.winemaker-map-marker {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.winemaker-map-pin {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--color-burgundy);
  box-shadow: 0 2px 8px rgba(54, 14, 21, 0.32);
  font-size: 0.69rem;
  font-weight: 800;
  line-height: 1;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.winemaker-map-marker:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 2px;
}

.winemaker-map-venue-marker {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.winemaker-map-venue-pin {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 8px;
  color: #fff;
  background: var(--color-burgundy);
  box-shadow: 0 2px 8px rgba(54, 14, 21, 0.32);
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.winemaker-map-venue-marker:focus-visible {
  outline: 2px solid var(--color-burgundy);
  outline-offset: 2px;
}

.leaflet-tooltip.winemaker-map-leaflet-tooltip {
  max-width: min(250px, calc(100vw - 60px));
  padding: 13px 15px;
  border: 1px solid rgba(97, 18, 23, 0.15);
  border-radius: 12px;
  color: var(--color-ink);
  background: #fff;
  box-shadow: 0 8px 26px rgba(54, 14, 21, 0.17);
  font-family: inherit;
  white-space: normal;
  cursor: text;
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}

.winemaker-map-tooltip {
  display: grid;
  gap: 5px;
  min-width: 130px;
  line-height: 1.3;
}

.winemaker-map-tooltip-stand {
  color: var(--color-burgundy);
  font-size: 0.76rem;
  font-weight: 800;
}

.winemaker-map-tooltip-name {
  font-size: 0.95rem;
  font-weight: 800;
  white-space: normal;
}

.winemaker-map-tooltip-origin {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 4px;
  font-size: 0.88rem;
}

.winemaker-map-tooltip-origin img {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.winemaker-map-tooltip-locality {
  color: var(--color-muted);
  font-size: 0.8rem;
}

.winemaker-map .leaflet-control-zoom {
  overflow: hidden;
  margin: 16px 16px 0 0;
  border: 1px solid rgba(97, 18, 23, 0.18);
  border-radius: 9px;
  box-shadow: 0 3px 14px rgba(54, 14, 21, 0.12);
}

.winemaker-map .leaflet-control-zoom a {
  width: 38px;
  height: 38px;
  color: var(--color-burgundy);
  background: #fff;
  font-family: inherit;
  font-size: 1.45rem;
  line-height: 36px;
}

.winemaker-map .leaflet-control-zoom a:hover,
.winemaker-map .leaflet-control-zoom a:focus-visible {
  color: #fff;
  background: var(--color-burgundy);
}

.winemaker-map-reset,
.winemaker-map-touch-toggle {
  position: absolute;
  z-index: 500;
  padding: 9px 13px;
  border: 1px solid rgba(97, 18, 23, 0.22);
  border-radius: 999px;
  color: var(--color-burgundy);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(54, 14, 21, 0.11);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
}

.winemaker-map-reset {
  top: 16px;
  left: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border-radius: 10px;
}

.winemaker-map-reset svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.winemaker-map-touch-toggle {
  bottom: 14px;
  right: 14px;
}

.winemaker-map-info {
  position: absolute;
  bottom: 14px;
  left: 14px;
  z-index: 500;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 9px 4px 4px;
  border: 1px solid rgba(97, 18, 23, 0.2);
  border-radius: 999px;
  color: var(--color-burgundy);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 14px rgba(54, 14, 21, 0.11);
}

.winemaker-map-info-button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--color-burgundy);
  cursor: pointer;
}

.winemaker-map-info-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.winemaker-map-info-button:focus-visible,
.winemaker-map-info-button[aria-expanded="true"] {
  background: var(--color-plum);
}

.winemaker-map-info-button:focus-visible,
.winemaker-map-info-credit:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 2px;
}

.winemaker-map-info-credit {
  color: var(--color-burgundy);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.winemaker-map-info-credit:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.winemaker-map-info-panel {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(330px, calc(100vw - 56px));
  padding: 14px 16px;
  border: 1px solid rgba(97, 18, 23, 0.16);
  border-radius: 11px;
  color: var(--color-ink);
  background: #fff;
  box-shadow: 0 10px 28px rgba(54, 14, 21, 0.18);
  font-size: 0.81rem;
  line-height: 1.5;
}

.winemaker-map-info-panel p {
  margin: 0;
}

.winemaker-map-info-panel p + p {
  margin-top: 8px;
  color: var(--color-muted);
}

.winemaker-map-reset:hover,
.winemaker-map-reset:focus-visible,
.winemaker-map-touch-toggle:hover,
.winemaker-map-touch-toggle:focus-visible,
.winemaker-map-touch-toggle[aria-pressed="true"] {
  color: #fff;
  background: var(--color-burgundy);
}

.winemaker-map-reset:focus-visible,
.winemaker-map-touch-toggle:focus-visible {
  outline: 2px solid var(--color-plum);
  outline-offset: 3px;
}

@media (max-width: 700px) {
  .winemaker-map-block {
    margin-top: 64px;
    padding-top: 44px;
  }

  .winemaker-map-heading {
    margin-bottom: 20px;
  }

  .winemaker-map-heading h3 {
    font-size: clamp(1.55rem, 6vw, 2rem);
  }

  .winemaker-map-locate {
    display: block;
  }

  .winemaker-map-locate label {
    display: block;
    margin-bottom: 7px;
  }

  .winemaker-map-combobox {
    width: 100%;
  }

  .winemaker-map {
    height: min(108vw, 400px);
    min-height: 315px;
  }

  .winemaker-map-reset {
    top: 11px;
    left: 11px;
  }

  .winemaker-map .leaflet-control-zoom {
    margin: 11px 11px 0 0;
  }

  .winemaker-map-touch-toggle {
    right: 11px;
    bottom: 11px;
    padding: 8px 10px;
    font-size: 0.73rem;
  }

  .winemaker-map-info {
    bottom: 11px;
    left: 11px;
  }
}

@media (max-width: 780px) {
  .leaflet-tooltip.winemaker-map-leaflet-tooltip,
  .winemaker-map-desktop-help {
    display: none;
  }

  .winemaker-map-marker,
  .winemaker-map-venue-marker {
    cursor: default;
  }
}

@media (min-width: 781px) and (hover: hover) and (pointer: fine) {
  .leaflet-tooltip.winemaker-map-leaflet-tooltip::after {
    position: absolute;
    top: 50%;
    width: 8px;
    height: 44px;
    content: "";
    transform: translateY(-50%);
  }

  .leaflet-tooltip-right.winemaker-map-leaflet-tooltip::after {
    right: 100%;
  }

  .leaflet-tooltip-left.winemaker-map-leaflet-tooltip::after {
    left: 100%;
  }

  .winemaker-map-marker:hover .winemaker-map-pin,
  .winemaker-map-marker:focus-visible .winemaker-map-pin {
    background: var(--color-plum);
    box-shadow: 0 3px 11px rgba(54, 14, 21, 0.35);
    transform: scale(1.15);
  }

  .winemaker-map-venue-marker:hover .winemaker-map-venue-pin,
  .winemaker-map-venue-marker:focus-visible .winemaker-map-venue-pin {
    background: var(--color-plum);
    box-shadow: 0 3px 11px rgba(54, 14, 21, 0.35);
    transform: scale(1.15);
  }

  .winemaker-map-info-button:hover {
    background: var(--color-plum);
  }
}

@media (prefers-reduced-motion: reduce) {
  .winemaker-map-pin,
  .winemaker-map-venue-pin,
  .winemaker-map-combobox-arrow {
    transition: none;
  }
}
