/* Geo Mashup - ricerca live: barra su una riga desktop, esterna su mobile. */
.gm-search-map {
  position: relative;
  width: 100%;
}

.gm-search-map-content {
  width: 100%;
}

/* Desktop: tutti i controlli allineati su UNA sola riga, sovrapposti alla mappa. */
.gm-search-map .gm-search-form {
  position: absolute;
  z-index: 20;
  top: 15px;
  left: 15px;
  right: 15px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px max-content max-content max-content;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px;
  background: rgba(255, 255, 255, .97);
  border-radius: 10px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, .15);
  box-sizing: border-box;
}

.gm-search-map .gm-search-form > * {
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
}
.gm-search-map .gm-search-form input{
 margin:0px!important;
}
.gm-search-map .gm-search-form input[type="search"] {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  line-height: 21px;
}

.gm-search-map .gm-search-form select {
  width: 100%;
  min-height: 43px;
  padding: 10px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  line-height: 21px;
  margin:0px!important;
}

.gm-search-map .gm-search-form button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: auto;
  min-width: max-content;
  min-height: 43px;
  float: none;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: #a51920;
  color: #fff;
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.gm-search-map .gm-search-form button.gm-search-locate {
  background: #e8eaef;
  color: #1a1a1a;
}

.gm-search-map .gm-search-form button.gm-search-reset {
  background: #e8eaef;
  color: #1a1a1a;
}

.gm-search-map .gm-search-form button[hidden] {
  display: none !important;
}

.gm-search-map .gm-search-form button:disabled {
  opacity: .55;
  cursor: wait;
}

.gm-search-status {
  position: absolute;
  z-index: 20;
  bottom: 15px;
  left: 15px;
  max-width: calc(100% - 30px);
  padding: 7px 10px;
  background: rgba(255, 255, 255, .96);
  color: #222;
  border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .1);
}

.gm-search-status:empty {
  display: none;
}

.gm-search-status.is-error {
  color: #b91c1c;
}

/* Tablet e mobile: form e messaggi tornano nel flusso della pagina,
   PRIMA della mappa (nessuna sovrapposizione). */
@media (max-width: 1024px) {
  .gm-search-map .gm-search-form {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #e7e7e7;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .07);
  }

  .gm-search-map .gm-search-form input[type="search"] {
    grid-column: 1 / -1;
  }

  .gm-search-map .gm-search-form select,
  .gm-search-map .gm-search-form .gm-search-submit,
  .gm-search-map .gm-search-form .gm-search-locate,
  .gm-search-map .gm-search-form .gm-search-reset {
    width: 100%;
  }

  .gm-search-status {
    position: relative;
    bottom: auto;
    left: auto;
    z-index: 1;
    max-width: none;
    margin: 0 0 12px;
    border: 1px solid #eee;
    box-shadow: none;
  }
}

@media (max-width: 420px) {
  .gm-search-map .gm-search-form {
    gap: 8px;
    padding: 10px;
  }
  .gm-search-map .gm-search-form button {
    padding: 10px 8px;
    font-size: 13px;
  }
}

/* v1.3: modalità di ricerca + selettori amministrativi in UNA riga desktop. */
.gm-search-map .gm-search-form [hidden] { display: none !important; }
@media (min-width: 1025px) {
  .gm-search-map .gm-search-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 7px;
  }
  .gm-search-map .gm-search-form .gm-mode { flex: 0 0 145px; max-width: 145px; }
  .gm-search-map .gm-search-form input[name="gm_luogo"] { flex: 1 1 220px; width: 0; }
  .gm-search-map .gm-search-form select[name="gm_raggio"] { flex: 0 0 90px; max-width: 90px; }
  .gm-search-map .gm-search-form .gm-country { flex: 0 1 155px; max-width: 155px; }
  .gm-search-map .gm-search-form .gm-primary,
  .gm-search-map .gm-search-form .gm-secondary { flex: 1 1 145px; width: 0; }
  .gm-search-map .gm-search-form .gm-search-submit,
  .gm-search-map .gm-search-form .gm-search-locate,
  .gm-search-map .gm-search-form .gm-search-reset { flex: 0 0 auto; }
  .gm-search-map .gm-search-form button { padding-inline: 11px; }
}
@media (max-width: 1024px) {
  .gm-search-map .gm-search-form .gm-mode { grid-column: 1 / -1; }
  .gm-search-map .gm-search-form .gm-country { grid-column: 1 / -1; }
  .gm-search-map .gm-search-form .gm-primary,
  .gm-search-map .gm-search-form .gm-secondary { grid-column: 1 / -1; }
}
.gm-geo-credit {
  margin: 5px 0 0;
  font-size: 11px;
  color: #767676;
  text-align: right;
}
.gm-geo-credit a { color: inherit; text-decoration: underline; }
