#map {
  /* map - navbar */
  /* height: calc(100vh - 4.375rem) !important; */
  height: 100vh;
  position: relative;
}

.legend {
  opacity: 0.7;
}

.btn-uss {
  color: #fff;
  background-color: #888e96;
  opacity: 0.9;
}

.btn-uss:hover {
  color: #fff;
  background-color: #5b626c;
  border-color: #58616e;
}

.active-color {
  background-color: #C19A00 !important;
  color: #fff;
}

.active-color-days {
  background-color: #C19A00 !important;
}

.leaflet-control-wms-legend  {
  bottom: 20px !important;
  background-color: #fff !important;
  border-radius: 10px !important;
  transition: margin-right 0.55s !important;
  padding: 1rem !important;
  width: 100% !important;
  max-width: 350px !important;
  max-height: 500px !important;
  overflow-y: auto !important;
}

.leaflet-container {
  font: 12px/1.5 var(--bs-body-font-family)!important;
}

@media (max-width: 767px) {
  .calendar{
    left: 0px !important;
  }
  .dfl1, .dfl2, .dfl3, .dfl4, .dfl5, .dfl6{
    font-size: 0;
  }
  .dfl1:first-letter, .dfl2:first-letter, .dfl3:first-letter, .dfl4:first-letter, .dfl5:first-letter, .dfl6:first-letter{
    font-size: 12px;
  }
}

@media (max-width: 1200px) {
  .dfl1, .dfl2, .dfl3, .dfl4, .dfl5, .dfl6{
    font-size: 0;
  }
  .dfl1:first-letter, .dfl2:first-letter, .dfl3:first-letter, .dfl4:first-letter, .dfl5:first-letter, .dfl6:first-letter{
    font-size: 12px;
  }
}

.leaflet-center {
  left: 50%;
  transform: translate(-50%, 0%);
}

.leaflet-middle {
  top: 50%;
  position: absolute;
  z-index: 1000;
  pointer-events: none;
  transform: translate(0%, -50%);
}

.leaflet-center.leaflet-middle {
  transform: translate(-50%, -50%);
}

.leaflet-control-wms-legend:hover{
  background-color: #F4F4F4;
}

input[type="number"] {
  width: 40px;
  padding: 4px 5px;
  border: 1px solid #bbb;
  border-radius: 3px;
}

.btn-sidebar {
  position: absolute;
  top: 80px;
  right: 30px;
  padding: 10px;
  z-index: 400;
}

.btn-check {
  display: none;
}

/* .labelstyle {
  text-shadow: -1px 0 white, 0 1px white, 1px 0 white, 0 -1px white;
  font-size:9px;
  background: none;
  border: none;
  box-shadow: none;
  margin: 0px;
} */

.labelstyle {
  font-size: 10px;
  font-weight: 600;
  color: white;
  text-shadow:
    0 0 1px black,
    0 0 2px black,
    1px 1px 1px rgba(0,0,0,0.4);
  background: none;
  border: none;
  box-shadow: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
  user-select: none;
}

.pixel_value{
  color: black;
  font-size: 8px;
}

.btn-calendar {
  color: #fff;
  background-color: #1b3860;
  border-color: #C3C5CA;
}

.btn-calendar:hover {
  color: #fff;
  background-color: #888e96;
  border-color: #58616e;
}

.popup-400 {
  width: 400px !important;
}

.popup-cw {
  width: 450px!important;
  height: 500;
}

.btn-info {
  color: #fff !important;
}

.btn-uss-primary {
  background-color: #C19A00;
  color: #fff;
}

.btn-uss-primary:hover {
  background-color: #C5CDF9;
}

@media (min-width: 768px) {
  .sidebar.toggled .nav-item .collapse, .sidebar.toggled .nav-item .collapsing {
    z-index: 2000;
  }
}

.basemapImg {
  border-radius: 50px;
  background-color: #1b3860;
}

.basemapImg div {
  border-radius: 50px;
}

/* For details template */
.header-uss {
  background-color: #836100;
}

/* popup */

/* Estilo del contenedor del popup */
.leaflet-popup-content-wrapper {
  background-color: #1b3860;
  color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Estilo de la punta del popup */
.leaflet-popup-tip-container {
  width: 40px;
  height: 20px;
}

.leaflet-popup-tip {
  background: #333;
}

/* Estilo del contenido del popup */
.popup-content {
  font-family: 'Arial', sans-serif;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
}

.popup-content h4 {
  margin-top: 0;
  font-size: 18px;
  color: #C19A00;
}

.popup-content p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

/* end popup */

.divider-leaflet-sidebar {
  border-top: 5px solid #888e96 !important;
  border-radius: 5px;
}
.popover {
  z-index: 2000 !important;
}

.leaflet-sidebar {
  width: 260px;
}

.leaflet-sidebar > .leaflet-control {
  background: linear-gradient(180deg,#1b3860 50%,#1b3860 100%);
  opacity: 0.9;
  border: 1px solid #e0e0e0;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
}

.leaflet-sidebar > .leaflet-control {
  padding: 8px 3px !important;
}

@media (min-width: 768px) and (max-width: 991px) {
  .leaflet-sidebar {
    width: 250px;
  }
  .leaflet-sidebar.left.visible ~ .leaflet-left {
    left: 250px;
  }
  .leaflet-sidebar.right.visible ~ .leaflet-right {
      right: 250px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .leaflet-sidebar {
    width: 250px;
  }
  .leaflet-sidebar.left.visible ~ .leaflet-left {
    left: 250px;
  }
  .leaflet-sidebar.right.visible ~ .leaflet-right {
    right: 250px;
  }
}

@media (min-width: 1200px) {
  .leaflet-sidebar {
    width: 250px;
  }
  .leaflet-sidebar.left.visible ~ .leaflet-left {
    left: 250px;
  }
  .leaflet-sidebar.right.visible ~ .leaflet-right {
    right: 250px;
  }
}

.leaflet-touch .leaflet-sidebar > .leaflet-control {
  border-radius: 8px;
}

.leaflet-buttons-control-button {
  background-color: #fff;
  /* padding: 5px 5px; */
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
 }

 .leaflet-buttons-control-img {
  width: 35px;
  height: 35px;
  padding: 5px 5px;
 }

.justify-content-between {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.5rem;
}

.opacity {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.opacity .text-warning {
  color: #ffc107;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 5px;
  outline: none;
  transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: #1b3860;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: #0f1f36;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #1b3860;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
  background: #1b3860;
}

input[type="range"]:hover {
  background: #cccccc;
}

.variables {
  font-size: 1.2rem;
}

.settings-label {
  font-size: 14px;
}

/* Nueva versión de pronóstico */
.maplibregl-popup-content {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  width: 620px !important;
}

.popup-weather-content {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.popup-weather-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../assets/img/forecast-weather.28d237ea7913.png");
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.popup-weather-content::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, rgba(54, 103, 47, 0.3), rgba(250, 192, 16, 0.2));
  z-index: -1;
}

/* Tarjetas de cada día */
.weather-card {
  border-radius: 1rem;
  border: none;
  background: rgba(248, 249, 250, 0.8);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  width: 5.5rem;
  height: 180px;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(2px);
}

.weather-card .card-body {
  padding: 8px;
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  flex: 1;
}

.weather-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.card-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: #333;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px !important;
}

.card-subtitle {
  font-size: 0.75rem;
  color: #888;
  height: 15px;
  margin-bottom: 8px !important;
}

.weather-icon {
  width: 50px !important;
  height: 50px !important;
  object-fit: contain;
  flex-shrink: 0;
  margin: 4px 0;
}

/* Temperaturas */
.temp-range {
  font-size: 0.85rem;
  margin: 6px 0;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  white-space: nowrap;
}

.slash-temp {
  color: gray;
}

.temp-min {
  color: #3498db;
  font-weight: bold;
  display: inline-block;
  min-width: 25px;
  text-align: right;
}

.temp-max {
  color: #e74c3c;
  font-weight: bold;
  display: inline-block;
  min-width: 25px;
  text-align: left;
}

/* Precipitación */
.precipitation {
  font-size: 0.75rem;
  color: #414141;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Viento */
.wind {
  font-size: 0.75rem;
  color: #666;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.weather-icon-custom-popup {
  color: #888e96;
  font-size: 2.5em;
}

.wind-dir-icon {
  color: #666;
  font-size: 1.2rem;
}