.address-map-picker {
  margin: 0 0 18px;
}

.address-map-picker-frame {
  margin-top: 0;
}

.address-map-picker-canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  background: #e8e2d8;
}

.address-map-toolbar {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: stretch;
  gap: 8px;
  max-width: 480px;
}

.address-map-search {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(43, 26, 13, 0.18);
  font: inherit;
  font-size: 0.95rem;
  color: var(--text, #2b1a0d);
}

.address-map-search:focus {
  outline: 2px solid rgba(201, 146, 63, 0.55);
  outline-offset: 1px;
}

.address-map-locate {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(43, 26, 13, 0.18);
  color: var(--text, #2b1a0d);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.address-map-locate:hover {
  background: #f7f3ec;
}

.address-map-locate:focus-visible {
  outline: 2px solid rgba(201, 146, 63, 0.55);
  outline-offset: 1px;
}

.address-map-locate:disabled {
  opacity: 0.7;
  cursor: wait;
}

.address-map-locate-icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff;
  background: radial-gradient(circle at center, currentColor 0 2px, transparent 2.5px);
  position: relative;
}

.address-map-locate-icon::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.55;
}

.address-map-locate.is-busy .address-map-locate-icon {
  animation: address-map-locate-pulse 0.9s ease-in-out infinite;
}

@keyframes address-map-locate-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.92);
  }
}

.address-map-suggest-list {
  position: absolute;
  z-index: 6;
  top: 56px;
  left: 12px;
  right: 12px;
  max-width: 480px;
  max-height: min(220px, 40vh);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  background: #fff;
  box-shadow: 0 10px 24px rgba(43, 26, 13, 0.14);
}

.address-map-suggest-list.hidden {
  display: none;
}

.address-map-suggest-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text, #2b1a0d);
}

.address-map-suggest-item:hover,
.address-map-suggest-item:focus {
  background: #f7f3ec;
}

.address-map-picker-canvas {
  width: 100%;
  height: min(360px, 58vh);
}

.address-map-picker-canvas.is-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(232, 226, 216, 0.95)),
    repeating-linear-gradient(
      -12deg,
      rgba(166, 116, 47, 0.05),
      rgba(166, 116, 47, 0.05) 12px,
      transparent 12px,
      transparent 24px
    );
}

.address-map-fallback-panel {
  max-width: 28rem;
  padding: 1.25rem 1.5rem;
  text-align: center;
}

.address-map-fallback-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text, #2b1a0d);
}

.address-map-fallback-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted, #7a6550);
}

.address-map-picker-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 0.82rem;
  color: var(--muted, #7a6550);
}

.address-map-picker-status.is-valid {
  color: var(--success, #15803d);
}

.address-map-picker-status.is-warning {
  color: var(--danger, #b44a3f);
}

.address-map-picker-status.is-busy {
  color: var(--muted, #7a6550);
}

.address-block {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, rgba(166, 116, 47, 0.1));
}

.address-block:last-of-type {
  border-bottom: 0;
}

.address-map-field-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.address-map-selected {
  margin: 0 0 14px;
}

.address-map-selected input[readonly] {
  background: #f7f3ec;
  color: var(--text, #2b1a0d);
}

@media (max-width: 640px) {
  .address-map-picker-canvas {
    height: min(300px, 50vh);
  }

  .address-map-toolbar {
    max-width: none;
  }

  .address-map-locate-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .address-map-locate {
    width: 44px;
    padding: 0;
  }
}

/* Pac container (Google Places dropdown) above map chrome */
.pac-container {
  z-index: 10000 !important;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  box-shadow: 0 10px 24px rgba(43, 26, 13, 0.14);
  font-family: inherit;
}
