/**
 * Google Places Autocomplete CSS
 * Consistent styling for all pages
 */

/* Custom styling for Google Places Autocomplete dropdown */
.pac-container {
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
  margin-top: 5px;
  padding: 5px 0;
  z-index: 1050;
  background-color: #fff;
}

.pac-item {
  padding: 12px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: center;
}

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

.pac-item:hover {
  background-color: rgba(255, 191, 0, 0.08);
  transform: translateX(2px);
}

.pac-item-selected,
.pac-item-selected:hover {
  background-color: rgba(255, 191, 0, 0.15);
  transform: translateX(4px);
}

.pac-icon {
  color: #ffbf00;
  margin-right: 12px;
  font-size: 16px;
  width: 16px;
  text-align: center;
}

.pac-item-query {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  line-height: 1.4;
}

.pac-matched {
  font-weight: 700;
  color: #e6ac00;
}

.pac-logo:after {
  margin-right: 8px;
  margin-bottom: 8px;
  padding-top: 8px;
  height: 20px;
}

/* Loading indicator for autocomplete inputs */
.places-loading-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  color: #ccc;
  font-size: 14px;
  z-index: 10;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: translateY(-50%) rotate(0deg); }
  100% { transform: translateY(-50%) rotate(360deg); }
}

/* Enhanced input styling for autocomplete */
.autocomplete-input {
  position: relative;
}

.autocomplete-input input {
  width: 100%;
  padding-right: 35px; /* Make room for loading indicator */
  transition: all 0.3s ease;
}

.autocomplete-input input:focus {
  box-shadow: 0 0 0 3px rgba(255, 191, 0, 0.15);
  border-color: #ffbf00;
}

.autocomplete-input input.loading {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23ccc" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 12a9 9 0 1 1-6.219-8.56"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .pac-container {
    border-radius: 6px;
    margin-top: 3px;
  }
  
  .pac-item {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .pac-item-query {
    font-size: 13px;
  }
  
  .pac-icon {
    margin-right: 10px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .pac-container {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .pac-item {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .pac-item-query {
    font-size: 12px;
  }
}

/* Error states */
.autocomplete-error {
  border-color: #f44336 !important;
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.15) !important;
}

/* Success states */
.autocomplete-success {
  border-color: #4caf50 !important;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15) !important;
}

/* Animation for place selection */
.place-selected {
  animation: placeSelected 0.5s ease;
}

@keyframes placeSelected {
  0% { 
    background-color: rgba(255, 191, 0, 0);
    transform: scale(1);
  }
  50% { 
    background-color: rgba(255, 191, 0, 0.2);
    transform: scale(1.02);
  }
  100% { 
    background-color: rgba(255, 191, 0, 0);
    transform: scale(1);
  }
} 