/**
 * Modern styles for S24 address form with single input field
 */

.search-from-address {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  color: white;
}

.search-from-address__title {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  margin-bottom: 1.5rem !important;
  text-align: center !important;
  color: white !important;
}

.search-from-address__body {
  margin-bottom: 1rem !important;
}

.search-from-address__input-container {
  position: relative !important;
  width: 100% !important;
  margin-bottom: 1.5rem !important;
}

.search-from-address__autocomplete {
  width: 100% !important;
  padding: 16px 50px 16px 20px !important;
  font-size: 16px !important;
  border: none !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
  display: block !important;
  box-sizing: border-box !important;
  color: #333 !important;
  font-weight: 500 !important;
}

.search-from-address__autocomplete::placeholder {
  color: #666 !important;
  font-weight: 400 !important;
}

.search-from-address__autocomplete:focus {
  outline: none !important;
  background: white !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-2px) !important;
}

.search-from-address__icon {
  position: absolute !important;
  right: 16px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #666 !important;
  pointer-events: none !important;
}

.search-from-address__submit {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 16px 32px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  color: white !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 12px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  text-transform: none !important;
}

.search-from-address__submit:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.search-from-address__submit:active {
  transform: translateY(0) !important;
}

.search-from-address__submit.loading {
  pointer-events: none !important;
  opacity: 0.8 !important;
}

.search-from-address__submit.loading .search-from-address__button-icon {
  animation: spin 1s infinite linear !important;
}

.search-from-address__button-text {
  font-weight: 600 !important;
}

.search-from-address__button-icon {
  display: flex !important;
  align-items: center !important;
  transition: transform 0.3s ease !important;
}

.search-from-address__submit:hover .search-from-address__button-icon {
  transform: translateX(4px) !important;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.search-from-address__msg {
  min-height: 24px !important;
  text-align: center !important;
  font-weight: 500 !important;
}

.search-from-address__error {
  color: #ff6b6b !important;
  background: rgba(255, 107, 107, 0.1) !important;
  border: 1px solid rgba(255, 107, 107, 0.3) !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  margin-top: 1rem !important;
  font-weight: 500 !important;
}

.search-from-address__success {
  color: #51cf66 !important;
  background: rgba(81, 207, 102, 0.1) !important;
  border: 1px solid rgba(81, 207, 102, 0.3) !important;
  padding: 12px 16px !important;
  border-radius: 8px !important;
  margin-top: 1rem !important;
  font-weight: 500 !important;
}

.search-from-address__loading {
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 12px 16px !important;
  margin-top: 1rem !important;
  text-align: center !important;
  font-weight: 500 !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .search-from-address {
    margin: 1rem !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
  }

  .search-from-address__title {
    font-size: 1.5rem !important;
    margin-bottom: 1rem !important;
  }

  .search-from-address__autocomplete {
    padding: 14px 45px 14px 16px !important;
    font-size: 16px !important;
  }

  .search-from-address__submit {
    padding: 14px 24px !important;
    font-size: 15px !important;
  }
}

/* Google Places Autocomplete dropdown styling */
.pac-container {
  z-index: 9999 !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  border: none !important;
  margin-top: 4px !important;
}

.pac-item {
  padding: 12px 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  transition: background-color 0.2s ease !important;
}

.pac-item:hover {
  background-color: #f8f9fa !important;
}

.pac-item-selected {
  background-color: #e3f2fd !important;
}

.pac-matched {
  font-weight: 600 !important;
  color: #1976d2 !important;
}
