.location-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

.location-modal.hidden {
  display: none;
}

.location-modal__overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  top: 0;
  left: 0;
}

.location-modal__content {
  position: relative;
  max-width: 500px;
  margin: 10% auto;
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.location-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.location-modal__close:hover {
  background: #f5f5f5;
  color: #333;
}

.location-modal__title {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.location-modal__section {
  margin-bottom: 20px;
}

.location-modal__section-title {
  font-weight: 600;
  margin-bottom: 12px;
  color: #374151;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.location-modal__field {
  margin-bottom: 16px;
}

.location-modal__field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #374151;
  font-size: 14px;
}

.location-modal__field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.location-modal__field input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.location-modal__buttons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.location-modal__primary-btn {
  background: #3b82f6;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
  flex: 1;
}

.location-modal__primary-btn:hover {
  background: #2563eb;
}

.location-modal__secondary-btn {
  background: #10b981;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
  flex: 1;
}

.location-modal__secondary-btn:hover {
  background: #059669;
}

.location-modal__outline-btn {
  background: white;
  color: #374151;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  flex: 1;
}

.location-modal__outline-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.location-modal__outline-btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

.location-modal__geolocation-status {
  font-size: 13px;
  color: #6b7280;
  min-height: 20px;
  margin-top: 8px;
  line-height: 1.4;
}

.location-modal__geolocation-status.success {
  color: #10b981;
}

.location-modal__geolocation-status.error {
  color: #ef4444;
}

.location-modal__geolocation-status.info {
  color: #6b7280;
}

/* Saved addresses styles */
.location-modal__saved-addresses {
  margin-top: 24px;
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
}

.location-modal__address-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.location-modal__address-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.location-modal__address-item:hover {
  background: #f9fafb;
}

.location-modal__address-item:last-child {
  border-bottom: none;
}

.location-modal__address-text {
  flex: 1;
  margin-right: 12px;
  font-size: 14px;
  color: #374151;
}

.location-modal__address-actions {
  display: flex;
  gap: 8px;
}

.location-modal__small-btn {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
}

.location-modal__small-btn:hover {
  background: #e5e7eb;
}

.location-modal__small-btn.primary {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.location-modal__small-btn.primary:hover {
  background: #2563eb;
}

.location-modal__small-btn.danger {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.location-modal__small-btn.danger:hover {
  background: #dc2626;
}

/* Autocomplete dropdown */
.modal-autocomplete-dropdown {
  position: absolute;
  z-index: 9999;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  display: none;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 2px;
}

.modal-autocomplete-dropdown div {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  transition: background-color 0.2s;
}

.modal-autocomplete-dropdown div:hover {
  background-color: #f3f4f6;
}

.modal-autocomplete-dropdown div:last-child {
  border-bottom: none;
}

/* Responsive design */
@media (max-width: 640px) {
  .location-modal__content {
    margin: 5%;
    max-width: none;
  }

  .location-modal__buttons {
    flex-direction: column;
  }

  .location-modal__address-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .location-modal__address-actions {
    align-self: flex-end;
  }
}