/* Address Dropdown — seamless input continuation
   Tokens sourced from moremunich.webflow.css (dark mode body overrides) */

.address-dropdown {
  position: fixed;
  z-index: 999999;
  background-color: #0e0e0e;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  font-family: Montserrat, sans-serif;
}

.address-dropdown.is-open {
  opacity: 1;
  visibility: visible;
}

/* When dropdown is open, morph the input: remove bottom radius */
input.address-input-open {
  border-radius: 2rem 2rem 0 0 !important;
  border-bottom-color: transparent !important;
}

/* Scrollable options area */
.address-dropdown__list {
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
}

/* Custom scrollbar */
.address-dropdown__list::-webkit-scrollbar {
  width: 4px;
}
.address-dropdown__list::-webkit-scrollbar-track {
  background: transparent;
}
.address-dropdown__list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

/* Group header */
.address-dropdown__group {
  padding: 0.5rem 0.875rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  user-select: none;
}

/* Option */
.address-dropdown__option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: background 0.1s ease;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.35;
}

.address-dropdown__option:hover,
.address-dropdown__option.is-highlighted {
  background: rgba(255, 255, 255, 0.08);
}

.address-dropdown__option:active {
  background: rgba(255, 255, 255, 0.12);
}

/* Option icon */
.address-dropdown__icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.4;
}

/* Option text */
.address-dropdown__label {
  flex: 1;
  min-width: 0;
}

.address-dropdown__label-main {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.address-dropdown__label-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 0.05rem;
}

/* Separator between predefined and search results */
.address-dropdown__separator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.875rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  user-select: none;
}

.address-dropdown__separator::before,
.address-dropdown__separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

/* Loading spinner */
.address-dropdown__loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

.address-dropdown__spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: address-spin 0.6s linear infinite;
}

@keyframes address-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.address-dropdown__empty {
  padding: 0.75rem 0.875rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}
