.location-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  color: #24251f;
}

.location-picker > .location-field {
  grid-column: span 1;
}

.location-picker > :not(.location-field) {
  grid-column: 1 / -1;
  min-width: 0;
}

.location-picker > div,
.location-picker input,
.location-picker select {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.location-picker label {
  display: block;
  margin: 0 0 5px;
  color: #24251f;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.location-picker input,
.location-picker select {
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #68665d;
  border-radius: 3px;
  background: #fffdf7;
  color: #24251f;
  font: inherit;
}

.location-picker input::placeholder {
  color: #625f56;
  opacity: 1;
}

.location-picker select {
  appearance: auto;
  background-image: none;
  padding-right: 24px;
}

.location-picker input:disabled,
.location-picker select:disabled {
  background: #e9e5db;
  color: #55534d;
  opacity: 1;
}

.location-picker :focus-visible {
  outline: 3px solid #174d78;
  outline-offset: 2px;
}

.location-title {
  margin: 0;
  font-weight: 600;
}

.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.location-picker button {
  min-height: 44px;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #454b47;
  border-radius: 3px;
  background: #f4f0e6;
  color: #202923;
  font: inherit;
  line-height: 1.45;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.location-picker button:hover {
  background: #e7e0cf;
}

.location-picker button:disabled {
  border-color: #77766f;
  background: #e9e5db;
  color: #55534d;
  cursor: wait;
}

.location-picker [hidden] {
  display: none;
}

.location-results {
  display: grid;
  gap: 8px;
  max-height: 45vh;
  max-height: min(45vh, 24rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  min-width: 0;
}

.location-picker .location-results button {
  min-height: 44px;
  width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.location-selected {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.location-picker .sub {
  margin: 0;
  line-height: 1.6;
  color: #45463f;
  overflow-wrap: anywhere;
}

@media (width <= 480px) {
  .location-picker {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .location-picker > .location-field {
    grid-column: 1 / -1;
  }

  .location-picker .location-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .location-picker .location-actions button {
    width: 100%;
  }

  .location-results {
    max-height: 40vh;
  }
}
