.location-autocomplete {
  position: relative;
  display: inline-block;
  font: 14px "PT Sans", sans-serif;
  width: auto;
}

.location-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: var(--text-primary, #333);
  font-size: 14px;
}

.location-input-wrapper {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 8px;
  border: 1px solid #BCC7DD;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
  min-width: 100px;
  width: auto;
  max-width: 160px;
  position: relative;
}

.location-input-wrapper.selected {
  background: #FEF3C1;
  border-color: #FFC800;
}

.location-input {
  height: 18px;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0 24px 0 8px;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  flex: 1;
}

.location-input:focus {
  outline: none;
}

.location-input:disabled {
  background: #f5f5f5;
  color: #8D92A5;
  cursor: not-allowed;
}

.location-input-wrapper:has(.location-input:disabled) {
  background: #f5f5f5;
  border-color: #BCC7DD;
  opacity: 0.6;
}

.clear-button:disabled {
  color: #ccc;
  cursor: not-allowed;
}

.clear-button:disabled:hover {
  background-color: transparent;
}

.clear-button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: #B0B0B0;
  border: none;
  font-size: 10px;
  color: white;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: background-color 0.2s ease;
  z-index: 1;
  width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-button:hover {
  background-color: #9A9A9A;
}

.location-autocomplete .suggestions-dropdown {
  position: absolute;
  top: calc(100% - 8px);
  left: 0;
  padding: 6px;
  width: 280px;
  overscroll-behavior: contain;
  background: #fff;
  border: none;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 1000;
  max-height: 320px;
  overflow: auto;
}

.suggestion {
  padding: 6px 8px;
  margin: 2px 0px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  display: flex;
  align-items: center;
  min-width: 0;
}

.suggestion:hover,
.suggestion.selected {
  background: #F5F5F5;
}

.suggestion.selected {
  font-weight: 600;
}

.suggestion.current-selection {
  background: #F5F5F5;
  font-weight: 600;
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.suggestion-item .address {
  font-weight: 500;
  color: #000000;
  font-size: 14px;
}

.suggestion-item .company {
  color: #000000;
  font-size: 12px;
  font-weight: normal;
}

.suggestion-item .contact {
  color: var(--text-tertiary, #888);
  font-size: 11px;
}

.suggestion-item .secondary {
  color: var(--text-secondary, #666);
  font-size: 12px;
}

.suggestion-item.existing .address {
  color: #000000;
}

.suggestion span.adr {
  color: #000000;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}

.suggestion span.comp {
  color: #666;
  font-size: 12px;
  margin-left: 8px;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion span.contact {
  color: #888;
  font-size: 11px;
  margin-left: 8px;
}

.loading,
.no-results {
  display: block;
  min-height: 0;
  padding: 8px 10px;
  line-height: 18px;
  white-space: nowrap;
  color: #8D92A5;
  background: transparent;
}
