/* Prevent zoom on input focus */
input,
textarea,
select {
  font-size: 16px !important; /* Prevents zoom on iOS */
  transform: none !important;
}

/* Modal segnalazione profilo - ora gestito globalmente in shared.css */

/* Stili per il bottone richiesta quando il profilo è in ferie */
.richiesta-btn.ferie-mode {
  background-color: #e0e0e0 !important;
  color: #999 !important;
  border-color: #ccc !important;
  cursor: not-allowed !important;
  opacity: 0.7;
  position: relative;
}

.richiesta-btn.ferie-mode:hover {
  background-color: #e0e0e0 !important;
  color: #999 !important;
  border-color: #ccc !important;
  transform: none !important;
  box-shadow: none !important;
}

.richiesta-btn.ferie-mode::after {
  content: "🏖️";
  position: absolute;
  top: -8px;
  right: -8px;
  font-size: 12px;
  background: #ff9800;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Stili per il pulsante "Consiglia a un amico" */
.consiglia-btn {
  position: absolute;
  top: 15px;
  left: 135px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #000000 !important;
  padding: 8px 16px;
  transition: all 0.2s ease;
  z-index: 1001;
  border-radius: 50px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.consiglia-btn i {
  color: #007bff !important;
}

.consiglia-btn:hover {
  background: #f2f2f2;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.consiglia-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

/* Stili specifici per la pagina elenco */

/* Rendere la sezione due 100% width */
#due {
  width: 100% !important;
  border-radius: 0px !important;
  overflow-y: visible !important;
  height: 100% !important;
}

.elenco-mappa {
  gap: 0px !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
}

/* Stili per i pulsanti filtri all'interno di elenco-mappa */
.elenco-mappa .reset-btn {
  margin-right: 5px;
}
.elenco-mappa {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  margin: 0px 0px 0px auto;
  height: 100%;
}
/* Container per i bottoni di vista elenco e mappa */
.view-toggle-buttons {
  display: flex;
  align-items: center;
  gap: 0px;
  margin-left: 10px;
  margin-right: 10px;
  height: 100%;
}

.attiva-elenco,
.attiva-mappa {
  margin-right: 5px;
  height: 100%;
  aspect-ratio: auto;
  font-size: 15px;
  padding: 5px 12px;
  background-color: #ffffff;
  border: none;
  border-radius: 10px;
  border: 1px solid #949494;
  z-index: 1002;
  animation: lampeggia-color 3s infinite;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.attiva-elenco:hover,
.attiva-mappa:hover {
  border: 1px solid #e60000;
}
.attiva-elenco:active,
.attiva-mappa:active {
  border: 1px solid #e60000;
  transform: scale(0.95);
}
.attiva-elenco.attiva,
.attiva-mappa.attiva {
  /*background-color: #09bd00;
  border-bottom: 2px solid #72c871;*/
  background-color: #e60000;
  border: 1px solid #e60000;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Nascondi i bottoni Elenco e Mappa su desktop */
@media (min-width: 769px) {
  .view-toggle-buttons {
    display: none !important;
  }
  .nuova-ricerca-btn {
    margin-left: 10px !important;
  }
}

/* Override del container ordina per permettere altezza completa */
.ordina-container {
  padding: 0 !important;
  height: 100% !important;
  width: fit-content !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  display: flex !important;
  gap: 0 !important;
  margin-left: 0px !important;
}

/* Pulsante toggle filtri */
.filtri-toggle-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  height: 100%;
  aspect-ratio: auto;
  margin-right: 10px; /* Maggiore distanza dal bottone attiva-elenco */
  min-width: 100px; /* Larghezza minima fissa per evitare cambi di dimensione */
  justify-content: center; /* Centra il contenuto */
  position: relative;
  z-index: 1001; /* Z-index più alto del dropdown */
}

.filtri-toggle-btn:hover {
  background: #f8f9fa;
}

.filtri-toggle-btn i {
  font-size: 12px;
  color: #007bff;
}

/* Pulsante toggle ordina - stesso stile dei bottoni attiva-elenco/attiva-mappa */
.ordina-toggle-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-right: none;
  border-radius: 10px 0px 0 10px;
  padding: 5px 5px 5px 10px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  height: 100%;
  margin-right: 0px !important;
  min-width: 100px; /* Larghezza minima aumentata per evitare cambi di dimensione */
  justify-content: center;
}

.ordina-toggle-btn:hover {
  background: #f8f9fa;
  border-right: none;
}

.ordina-toggle-btn i {
  font-size: 12px;
  color: #007bff;
}

/* Pulsante inverti ordine - stile compatto */
.inverti-toggle-btn {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 0px 10px 10px 0px;
  border-left: none;
  padding: 5px 0px 5px 0px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  height: 100%;
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
  margin-right: 10px !important;
}

.inverti-toggle-btn:hover {
  border-left: none;
  background: #f8f9fa;
}

.inverti-toggle-btn i {
  font-size: 12px;
  color: #007bff;
}

/* Dropdown dei filtri */
.filtri-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  max-width: 400px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 8px;
}

.filtri-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filtri-dropdown-content {
  padding: 0;
}

/* Header del dropdown */
.filtri-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.filtri-dropdown-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.filtri-dropdown-close {
  background: none;
  border: none;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.filtri-dropdown-close:hover {
  background: #e9ecef;
  color: #333;
}

/* Corpo del dropdown */
.filtri-dropdown-body {
  padding: 20px;
}

.filtri-dropdown-item {
  margin-bottom: 16px;
}

.filtri-dropdown-item:last-child {
  margin-bottom: 0;
}

.filtri-dropdown-item label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #555;
}

.filtri-dropdown-item select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%230080f0" height="16" viewBox="0 0 24 24" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
}

.filtri-dropdown-item select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.filtri-dropdown-item select:hover {
  border-color: #007bff;
}

.filtri-dropdown-item select:disabled {
  background: #f5f5f5;
  color: #999;
  border-color: #ddd;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Stili per il filtro distanza */
.distanza-slider-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.distanza-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.distanza-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.distanza-slider::-webkit-slider-thumb:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.distanza-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #007bff;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.distanza-slider::-moz-range-thumb:hover {
  background: #0056b3;
  transform: scale(1.1);
}

.distanza-slider::-webkit-slider-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    #007bff 0%,
    #007bff 50%,
    #e0e0e0 50%,
    #e0e0e0 100%
  );
}

.distanza-slider::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(
    to right,
    #007bff 0%,
    #007bff 50%,
    #e0e0e0 50%,
    #e0e0e0 100%
  );
}

.distanza-value {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #007bff;
  background: #f8f9fa;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  min-width: 60px;
}

/* Stili per il dropdown dell'ordinamento */
.ordina-dropdown {
  font-size: 16px !important;
}

.ordina-option {
  font-size: 16px !important;
  font-weight: 500;
  padding: 12px 16px !important;
}

/* Azioni del dropdown */
.filtri-dropdown-actions {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

.filtri-dropdown-actions .filtri-btn {
  width: 100%;
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filtri-dropdown-actions .filtri-btn:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .filtri-dropdown {
    min-width: 280px;
    max-width: 320px;
    right: -50px;
  }

  .filtri-toggle-btn {
    padding: 5px 10px;
    font-size: 13px;
    min-width: 90px; /* Larghezza minima ridotta su mobile */
  }

  .ordina-toggle-btn {
    padding: 5px 10px;
    font-size: 13px;
    min-width: 80px;
  }

  .inverti-toggle-btn {
    padding: 5px 6px;
    font-size: 13px;
    width: 30px;
    min-width: 30px;
  }
}

/* Stili per input con dropdown dinamico */
.searchable-input-container {
  position: relative;
  max-width: 100%;
  box-sizing: border-box;
}

/* Stili minimal per i campi del modal Richiedi contatto */
#requestModal .form-group input,
#requestModal .form-group textarea,
#requestModal .form-group select {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

#requestModal .form-group textarea {
  padding-top: 6px;
  height: 10px !important; /* altezza fissa */
  overflow: auto !important; /* abilita scroll interno */
  resize: none !important; /* evita ridimensionamento manuale */

  margin-bottom: 0px !important;
}

#requestModal .form-group input::placeholder,
#requestModal .form-group textarea::placeholder {
  color: #999;
}

#requestModal .form-group input:focus,
#requestModal .form-group textarea:focus,
#requestModal .form-group select:focus {
  border-bottom-color: #e60000 !important;
}

/* Riduci bordo attorno ai select su iOS/Safari */
#requestModal .form-group select:focus {
  outline: none !important;
}

/* Container dei form-group per evitare overflow del bordo inferiore */
#requestModal .form-group {
  box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1);
  padding: 10px 20px 20px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

#requestModal .form-group label {
  border-bottom: 1.5px solid #e60000;
  padding-bottom: 10px;
}
#requestModal .modal-content {
  top: 52.5% !important;
  max-width: 50% !important;
}

/* Scritta informativa dopo l'header */
#requestModal .modal-info-text {
  padding: 15px 25px;
  background-color: #f0f7ff;
  border-left: 4px solid #e60000;
  margin: 0;
}

#requestModal .modal-info-text p {
  margin: 0;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

#requestModal .modal-info-text i {
  color: #e60000;
  font-size: 16px;
  flex-shrink: 0;
}

/* Modal Richiedi contatto - Desktop: una colonna con scroll */
@media (min-width: 769px) {
  #requestModal .modal-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 40px;
  }

  #requestModal #requestForm > div[style*="grid-template-columns"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0px !important;
  }
}

.searchable-input-container input {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  transition: all 0.2s ease;
}

.searchable-input-container input:focus {
  outline: none;
  border-color: #e60000;
  box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.1);
}

.searchable-input-container input:hover {
  border-color: #ccc;
}

.searchable-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
  overflow-y: auto;
  z-index: 1002;
  display: none;
  margin-top: 2px;
}

.searchable-dropdown.active {
  display: block;
}

.searchable-dropdown-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
}

.searchable-dropdown-option:last-child {
  border-bottom: none;
}

.searchable-dropdown-option:hover {
  background-color: #f8f9fa;
}

.searchable-dropdown-option.selected {
  background-color: #e60000;
  color: #fff;
}

.searchable-dropdown-option.highlighted {
  background-color: #f0f0f0;
}

/* Nascondi il bottone ricerca mobile su desktop */
.mobile-search-btn {
  display: none;
}

/* Stili per i campi di ricerca modificabili in elenco.html */
.search-fields-container {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  margin-left: 10px;
  padding: 0px;
  background: transparent;
  border-radius: 10px;
  flex-wrap: wrap;
}

.search-field {
  position: relative;
  flex: 1;
  min-width: 150px;
  max-width: 150px;
}

.search-field i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #007bff;
  font-size: 14px;
  z-index: 1;
}

.elenco-search-input {
  width: 100%;
  padding: 10px 12px 10px 35px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.elenco-search-input:focus {
  outline: none;
  border-color: #e60000;
  box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.1);
}

.elenco-search-input:hover {
  border-color: #ccc;
}

.elenco-search-btn {
  background: #e60000;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.elenco-search-btn:hover {
  background: #cc0000;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(230, 0, 0, 0.3);
}

.elenco-search-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(230, 0, 0, 0.2);
}

.elenco-search-btn i {
  font-size: 12px;
}

/* Responsive per i campi di ricerca */
@media (max-width: 768px) {
  .search-fields-container {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .search-field {
    min-width: 100%;
  }

  .elenco-search-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Stili migliorati per il dropdown dell'autocomplete Google Places */
.pac-container {
  z-index: 9999 !important;
  border-radius: 15px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15) !important;
  border: 2px solid rgb(208, 207, 207) !important;
  font-family: inherit !important;
  margin-top: 4px !important;
  margin-left: 0px !important;
  overflow: hidden !important;
  background: white !important;
}

.pac-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0px;
  padding: 6px 16px !important;
  font-size: 16px !important;
  border-bottom: 1px solid #f0f0f0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  color: #333 !important;
  line-height: 1.5 !important;
}

/* Forza lo stesso font-size per tutti gli elementi all'interno di pac-item */
.pac-item *,
.pac-item span,
.pac-item div,
.pac-item strong {
  font-size: 16px !important;
}

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

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

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

.pac-item-selected:hover {
  background-color: #cc0000 !important;
  color: white !important;
}

.pac-item-query {
  font-weight: 500 !important;
  color: inherit !important;
  font-size: 16px !important;
}

.pac-item-query:hover {
  background-color: transparent !important;
}

.pac-icon {
  margin-right: 8px !important;
  width: 20px !important;
  height: 20px !important;
}

.pac-matched {
  font-weight: 600 !important;
  color: inherit !important;
  font-size: 16px !important;
}
.new-folder-btn {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.new-folder-btn:hover {
  background: #0056b3;
}

/* Stili per il modal di autenticazione */
.auth-modal-content {
  max-width: 500px;
  width: 90vw;
  top: 52.5%;

  max-height: 85vh;
  overflow-y: auto;
}

.auth-screen {
  display: none;
}

.auth-screen.active {
  display: block;
}

/* La schermata di scelta è visibile solo quando è attiva */
#auth-choice-screen {
  display: none;
}

#auth-choice-screen.active {
  display: block;
}

.auth-choice-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
}

.auth-choice-btn:hover {
  background: #e9ecef;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.auth-choice-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.auth-choice-btn i {
  font-size: 18px;
  width: 20px;
  text-align: center;
}

.auth-choice-btn.active i {
  color: white;
}

.forgot-password-link {
  background: none;
  border: none;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  margin: 0;
}

.forgot-password-link:hover {
  color: #0056b3;
}

.auth-messages {
  margin-top: 16px;
  padding: 12px;
  border-radius: 8px;
  display: none;
}

.auth-messages.success {
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  display: block;
}

.auth-messages.error {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  display: block;
}

.auth-messages.info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
  display: block;
}

/* Stili per gli input del modal di autenticazione */
#authModal .form-group input:not([type="checkbox"]),
#authModal .form-group textarea,
#authModal .form-group select {
  background: transparent !important;
  background-image: none !important;
  border: none !important;
  border-bottom: 1px solid #ccc !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

#authModal .form-group input::placeholder,
#authModal .form-group textarea::placeholder {
  color: #999;
}

#authModal .form-group input:focus,
#authModal .form-group textarea:focus,
#authModal .form-group select:focus {
  border-bottom-color: #e60000 !important;
}

#authModal .form-group select:focus {
  outline: none !important;
}

#authModal .form-group {
  padding-bottom: 8px;
}

/* Stili specifici per il checkbox e il suo label */
#authModal .form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
}

#authModal .form-group input[type="checkbox"] {
  margin: 0;
  flex-shrink: 0;
  width: auto !important;
  height: auto !important;
  border: 1px solid #ccc !important;
  border-radius: 3px !important;
  background: white !important;
  appearance: checkbox !important;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
}

#authModal .form-group input[type="checkbox"]:checked {
  background: #e60000 !important;
  border-color: #e60000 !important;
}

#authModal .form-group label a {
  color: #007bff;
  text-decoration: underline;
}

#authModal .form-group label a:hover {
  color: #0056b3;
}

/* Stili per i feedback di validazione */
#authModal .phone-validation-feedback,
#authModal .password-validation-feedback {
  margin-top: 4px;
  font-size: 0.85em;
  line-height: 1.4;
}

#authModal input.phone-valid {
  border-bottom-color: #1ca21c !important;
}

#authModal input.phone-invalid {
  border-bottom-color: #e60000 !important;
}

#authModal input.password-valid {
  border-bottom-color: #1ca21c !important;
}

#authModal input.password-invalid {
  border-bottom-color: #e60000 !important;
}

/* Responsive per il modal di autenticazione */
@media (max-width: 768px) {
  .auth-modal-content {
    max-width: 95vw;
    margin: 20px auto;
  }

  .auth-choice-btn {
    padding: 14px 16px;
    font-size: 15px;
  }

  .auth-choice-btn i {
    font-size: 16px;
  }
}

/* Bottone Nuova ricerca */
.nuova-ricerca-btn {
  height: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  box-sizing: border-box;
  background: #e60000;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0px;
  white-space: nowrap;
  z-index: 1001;
}

.nuova-ricerca-btn:hover {
  background: #c00000;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.nuova-ricerca-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nuova-ricerca-btn i {
  font-size: 16px;
}

/* Modal Nuova ricerca */
.pre-filtri {
  position: relative;
}

.nuova-ricerca-modal {
  position: absolute;
  top: calc(100% + 0px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 0px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  padding: 15px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nuova-ricerca-modal-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nuova-ricerca-modal-content .search-field {
  flex: 1;
  min-width: 150px;
  max-width: 300px;
}

.nuova-ricerca-modal-content .search-field:first-child {
  flex: 2;
  max-width: 400px;
}

.nuova-ricerca-modal-content .elenco-search-btn {
  flex-shrink: 0;
}

/* Stili per il container del slider dell'elenco */
.slider-elenco-container {
  position: fixed;
  top: calc(50% + 60px);
  left: 45%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: #eaeaea;
  border: 1px solid #cccccc;
  opacity: 1;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.2s ease;
}

.slider-elenco-container.due {
  display: none;
  left: 1px !important;
  background: #e60000;
}
.slider-elenco-container.due:hover {
  background: #c00000;
  border: 1px solid #747474;
  transition: all 0.2s ease;
}
.slider-elenco-container.due i {
  color: white;
}
.slider-elenco-container:hover {
  background: #d1d1d1;
  border: 1px solid #747474;
  transition: all 0.2s ease;
}
.slider-elenco-btn {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  cursor: pointer;
  color: #4f4f4f;
  font-size: 20px;
  transition: all 0.2s ease;
}
.slider-elenco-btn:hover {
  color: #2f2f2f;
  transition: all 0.2s ease;
}
/* Responsive per modal nuova ricerca */
@media (max-width: 768px) {
  .nuova-ricerca-modal-content {
    flex-direction: column;
    gap: 10px;
  }

  .nuova-ricerca-modal-content .search-field {
    min-width: 100%;
    max-width: 100%;
  }

  .nuova-ricerca-modal-content .elenco-search-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Stili per risultati-titolo con ellipsis */
#risultati-titolo {
  max-width: 500px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Stili per la scheda profilo sono ora in scheda-profilo.css */
