/* css/address-search.css */
.address-search-form {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

  .form-item:not(.js-webform-type-fieldset):not(.fieldgroup):not(.checkboxes--wrapper):not(.radios--wrapper):not(.js-form-item-markup) {
    width: 100% !important;
    margin-bottom: 0 !important;
  }
}

.address-search-form h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.address-search-form p {
  margin-bottom: 20px;
  color: #666;
  font-size: 16px;
}

/* Style du champ d'adresse */
.form-item-address-input {
  margin-bottom: 20px;
  position: relative;
}

.form-item-address-input .description {
  display: none;
}

.address-autocomplete {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #f9fafb;
  font-size: 16px;
  color: #333;
  transition: all 0.2s ease;
}

.address-autocomplete:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #ffffff;
}

.address-autocomplete::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* Styles pour les suggestions */
.address-suggestions,
.webform-address-suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  position: absolute;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.address-suggestions li,
.webform-address-suggestions li {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #e5e7eb;
  transition: background-color 0.15s ease;
}

.address-suggestions li:last-child,
.webform-address-suggestions li:last-child {
  border-bottom: none;
}

.address-suggestions li:hover,
.address-suggestions li.active,
.webform-address-suggestions li:hover,
.webform-address-suggestions li.active {
  background-color: #f3f4f6;
}

/* Style pour le message "aucun résultat" */
.address-suggestions li.no-results,
.webform-address-suggestions li.no-results {
  cursor: default;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.address-suggestions li.no-results:hover,
.webform-address-suggestions li.no-results:hover {
  background-color: transparent;
}

/* Style spécifique pour le champ webform */
.webform-address-autocomplete {
  position: relative;
}

.webform-address-autocomplete-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background-color: #f9fafb;
  font-size: 16px;
  color: #333;
  transition: all 0.2s ease;
}

.webform-address-autocomplete-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background-color: #ffffff;
}

/* Style du bouton */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.15s ease;
}

/* Styles des messages de résultat */
.address-search-result {
  margin-top: 15px;
}

.messages {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 10px;
  border-left: 4px solid;
}

.address-notice {
  border: 0 !important;
  background-color: #fdf6d3 !important;
  text-align: center;
}

.messages--status {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.messages--warning {
  background-color: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.messages--error {
  background-color: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}

.loading {
  padding: 16px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Exemple d'adresse */
.example-text {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .address-search-form {
    margin: 10px;
    padding: 15px;
  }

  .address-autocomplete {
    padding: 10px 12px;
  }
}
