/* Styles pour la recherche prédictive et les suggestions */

/* Styles pour l'affichage hiérarchique */
.main-city-suggestion {
  background: linear-gradient(135deg, #17507b 0%, #17507b 100%);
  color: #94a3b8;
  font-weight: 600;
  border-left: 4px solid #94a3b8;
}

.main-city-suggestion:hover {
  background: linear-gradient(135deg, #17507b 0%, #17507b 100%);
  transform: translateX(2px);
}

.main-city-suggestion .location-name.main-city {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
}

.main-city-suggestion .location-name.main-city .highlight {
  color: #fff !important;
}

.main-city-suggestion .admin-info {
  color: #fff;
}

.sub-freguesia-suggestion {
  background: #f8fafc;
  border-left: 3px solid #e2e8f0;
  margin-left: 10px;
  font-size: 13px;
  color: #64748b;
}

.sub-freguesia-suggestion:hover {
  background: #f1f5f9;
  border-left-color: #17507b;
  color: #1e293b;
}

.sub-freguesia-suggestion .location-name.sub-freguesia {
  font-family: 'Courier New', monospace;
  color: #475569;
}

.sub-freguesia-suggestion .admin-info {
  color: #94a3b8;
  font-size: 12px;
}

/* Style pour le bouton "plus de résultats" */
.more-results {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  font-weight: 600;
  border-left: 4px solid #2563eb;
  cursor: pointer;
  transition: all 0.3s ease;
}

.more-results:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.more-results .suggestion-icon {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  padding: 2px 6px;
  margin-right: 8px;
  font-weight: bold;
}

.more-results small {
  opacity: 0.8;
  font-style: italic;
}

/* Conteneur des suggestions */
.location-suggestions,
#homepage-search-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
  padding: 12px 0;
  border: 1px solid rgba(26, 127, 55, 0.15);
}

/* Afficher le conteneur quand il est actif */
.location-suggestions.active,
#homepage-search-suggestions.active {
  display: block;
  animation: fadeInDown 0.2s ease;
}

/* Animation d'apparition */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Élément de suggestion */
.suggestion-item {
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  margin: 0 5px;
}

.suggestion-item:hover {
  background-color: rgba(23, 80, 123, 0.08);
  transform: translateX(2px);
}

/* Ajouter plus d'espace entre les éléments de suggestion */
.suggestion-item + .suggestion-item {
  margin-top: 4px;
}

/* Option de dessin sur la carte */
.suggestion-item.draw-option {
  font-weight: 600;
  color: #17507b;
  padding: 12px 15px;
}

.suggestion-item.draw-option:hover {
  background-color: #e6f0fa;
}

/* Icône dans les suggestions */
.suggestion-icon {
  margin-right: 10px;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mise en évidence des caractères correspondants */
.suggestion-item .highlight {
  color: #17507b;
  font-weight: 700;
  background-color: rgba(23, 80, 123, 0.15);
  border-radius: 4px;
  padding: 0 3px;
  display: inline-block;
}

/* Suggestion de recherche exacte */
.suggestion-item.search-exact {
  border-top: 1px solid #eaeaea;
  margin-top: 5px;
  padding-top: 12px;
  color: #17507b;
  font-weight: 500;
}

/* Séparateur entre les sections */
.suggestion-separator {
  height: 1px;
  background-color: #eaeaea;
  margin: 8px 0;
}

/* Titre de catégorie */
.suggestion-category {
  padding: 8px 15px;
  font-size: 13px;
  color: #17507b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0;
}

/* Titre avec sélecteur de pays */
.suggestion-category.with-selector {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 15px;
  transition: background-color 0.2s;
}

.suggestion-category.with-selector:hover {
  background-color: #f5f9f6;
}

/* Pays actuel */
.current-country {
  margin-left: auto;
  color: #17507b;
  font-weight: 700;
}

/* Flèche du sélecteur */
.selector-arrow {
  margin-left: 5px;
  font-size: 10px;
  color: #17507b;
}

/* Menu déroulant des pays */
.country-dropdown {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 0 15px 10px;
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

/* Option de pays */
.country-option {
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.country-option:hover {
  background-color: #f5f9f6;
}

.country-option.selected {
  background-color: #e6f0fa;
  color: #17507b;
  font-weight: 600;
}

/* Message quand aucun résultat */
.suggestion-no-result {
  padding: 10px 15px;
  color: #888;
  font-style: italic;
  font-size: 14px;
}

/* Assurer que le conteneur d'entrée est en position relative */
.location-input-container {
  position: relative;
}

/* Indicateur de recherche supplémentaire */
.searching-more {
  padding: 5px 10px;
  text-align: center;
  color: #666;
  font-style: italic;
  font-size: 0.8em;
  background-color: #f5f5f5;
}

/* Styles pour les informations administratives */
.location-name {
  font-weight: 600;
  display: inline-block;
  color: #333;
  font-size: 15px;
}

.admin-info {
  margin-left: 8px;
  font-size: 0.85em;
  color: #666;
  font-weight: 500;
  background-color: rgba(23, 80, 123, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
}

/* Ajuster la largeur du conteneur de suggestions pour les informations administratives */
.location-suggestions {
  min-width: 300px;
  width: auto;
  max-width: 450px;
}

/* Améliorer le style des éléments de suggestion */
.suggestion-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 12px;
}
