/* General reset y comportamiento responsivo */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.bg-1{
  background-color: #F7F5F5;
}
.bg-2{
  background-color: #E2E1E1;
}
.wine-locator {
  width: 100%;
  font-family: "urw-din-condensed", Sans-serif;
  color: #002554;
}

/* Header */
.wine-locator-header {
  width: 100%;
  color: #fff;
  background-color: #002554;
  padding: 1rem;
  text-align: center;
  padding-top: 60px;
}

.wine-locator-title {
  color: #fff !important;
  font-size: 1.5rem;
}

/* Filtros */
.filter-title {
  width: 100%;
  padding: 1rem;
  background-color: #f5f5f5;
}

.wine-locator-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wine-locator-form input,
.wine-locator-form button {
  padding: 0.75rem;
  font-size: 1rem;
  width: 100%;
}

/* Resultados (sidebar + mapa) */
.results {
  display: flex;
  flex-direction: column;
}

/* Mapa */
.mapcontent {
  width: 100%;
  order: -1;
}

#map {
  width: 100%;
  height: 500px; 
}

/* Sidebar (debajo del mapa en móvil) */
.cards-container-sidebar {
  width: 100%;
  padding: 1rem;
  background-color: #fafafa;
  overflow-y: auto;
  max-height: 100vh;
}

/* ⬆️ Mobile-first termina aquí */

/* cards*/
.popup-location-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  padding: 0px 20px 20px 20px;
  max-width: 300px;
}

.popup-location-container .popup-title {
  font-family: "urw-din-condensed", Sans-serif;
  font-size: 22px;
  font-weight: bold;
  color: #1f3c88;
  margin-bottom: 5px;
}

.popup-location-container .popup-distance,
.popup-location-container .popup-address,
.popup-location-container .popup-phone {
  font-family: "apertura", Sans-serif;
  margin: 5px 0;
  font-size: 14px;
}

.popup-location-container .popup-phone a {
  color: #4CAF50;
  font-weight: bold;
  text-decoration: none;
}

.popup-location-container .popup-products {
  margin-top: 10px;
  font-size: 14px;
}

.popup-location-container .popup-products .popup-products-label {
  font-weight: 600;
  /*color: #555;*/
  display: block;
  margin-bottom: 3px;
}

.popup-location-container .popup-products .popup-products-list {
  /*color: #333;*/
  font-family: "apertura", Sans-serif;
}

.popup-location-container .popup-directions {
  display: inline-block;
  margin-top: 15px;
  background-color: #4CAF50;
  color: white;
  padding: 10px 15px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.3s;
}

.popup-location-container .popup-directions:hover {
  background-color: #45a049;
}

.popup-phone a {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

.popup-phone a:focus {
  outline: none !important;
}
/* fin cards*/

/* sidebar */
/*
#wine-select-container{
  display: none;
  position: sticky;
  z-index: 10;
  top:0;
}
*/

.select2-selection .select2-selection--multiple{
  display: inline-flex;
}
.select2-search__field{
  padding: 10px !important; /* Añade espacio interno al select */
 /*margin-bottom: 20px; /* Espacio debajo del select */
 display: none;
}


.location-card {
  font-family: "urw-din-condensed", Sans-serif;
  /*border: 2px solid #002e6d;
  border-radius: 6px;*/
  /*background: #fff;*/
  padding: 16px;
  /*
  margin-bottom: 16px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.05);*/
}
.location-card:hover{
  background-color: #ffffff;
}
.select2-dropdown.select2-dropdown--below{
  margin-top: 2rem;
}
.select2-dropdown .select2-dropdown--above{

}
.location-card .card-body a{
  margin-bottom: 1rem;
}

.wine-select-card {
  font-family: "urw-din-condensed", Sans-serif;
  border: 2px solid #002e6d;
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}


.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 1.1em;
  color: #002e6d;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.location-title {
  flex: 1;
}
.location-divider{
  border-color: #002554;
  border-width: 1px;
  width: 100%;
}

.icon-circle {
  background-color: #007ca8;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon {
  width: 16px;
  height: 16px;
  display: block;
}

.card-body {
  font-size: 0.95em;
  /*color: #333;*/
  line-height: 1.4em;
}

.card-body strong {
  color: #002e6d;
}

.directions-link {
  display: inline-flex;
  align-items: center;
  color: #2b8f32;
  font-weight: bold;
  margin-top: 10px;
  text-decoration: none;
}

.icon-inline {
  width: 16px;
  height: 16px;
  margin-left: 5px;
  fill: currentColor;
}

/* fin sidebar */

.select2.select2-container.select2-container--default.select2-container--above.select2-container--focus.select2-container--open{
  border: none !important;
}

/* ⬅️ Para pantallas más grandes (ej: escritorio) */
@media (min-width: 768px) {
  .wine-locator-form{
      flex-direction: row;
      justify-content: center;
      align-items: center;
  }
  #wine-select-container{
    height: 3rem;
  }
  .minw20{
    min-width: 20%;
  }
  .wine-locator-header{
      height: 15rem;
  }
  .wine-locator-title{
      padding-top: 5%;
  }
  #map {
    height: 300px; 
  }
  #zip-search{
      width: 15%;
      height: 3rem;
  }
  #wine-locator-search-button{
      width: 10%;
      height: 3rem;
  }

  .results {
    flex-direction: row;
    margin-top: 10px;
    margin-bottom: 30px;
    
  }

  .mapcontent {
    order: 1;
    flex: 2;
    height: 80vh;
    max-height: 80vh;
    margin-right: 1rem;
  }

  .cards-container-sidebar {
    flex: 1;
    height: auto;
    overflow-y: auto;
    padding-top: 0px;
  }

  .maplink.card-header .location-title{
    cursor: pointer;
  }
  
  #results_sidebar .card-body .distance,
  #results_sidebar .card-body .address,
  #results_sidebar .card-body .phone,
  #results_sidebar .card-body .wines{
    cursor: pointer;
  }
  
  #map {
    height: 100%;
  }
}
