.container-reporte {
      padding: 10px;
    }

#editor_container img, div.richText img, #report_container img {
    max-width: 100%;
}

#editor_container img.mapa, div.richText img.mapa, #report_container img.mapa {
    /* width: 333px; */
    width: 100%;
    height: auto;
}

#editor_container img.plot, div.richText img.plot, #report_container img.plot {
    /* max-width: 714px; */
    clip-path: inset(0% 3% 0% 1%);
    width: 100%;
    height: auto;
}

.richText .richText-editor .table-wrapper, #report_container .table-wrapper {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin; /* Firefox */
}

.richText .richText-editor table.tabla-hidro, #report_container table.tabla-hidro {
    /* width: 714px;  */
    margin: 10px 0;
    border-collapse: collapse;
    width: max-content;
    margin-left: auto;
    margin-right: auto;
}

.richText .richText-editor table.tabla-hidro-semanal, #report_container table.tabla-hidro-semanal {
    width: auto;
}

.richText .richText-editor table.tabla-hidro td, .richText .richText-editor table.tabla-hidro th, #report_container table.tabla-hidro td, #report_container table.tabla-hidro th {
    padding: 5px;
    border: #EFEFEF solid 2px;
    text-align: center;
}

.richText .richText-editor table.tabla-hidro thead, #report_container table.tabla-hidro thead {
    background-color: darkgray;
}

.richText .richText-editor table.leyenda-tabla-hidro, #report_container table.leyenda-tabla-hidro {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.richText .richText-editor table.leyenda-tabla-hidro td, #report_container table.leyenda-tabla-hidro td {
    padding: 1px 4px;
    text-align: center;
}


.richText .richText-editor, .richText .richText-initial {
    height: 600px;
}

#report_container { 
    margin: 0 auto;
    /* padding: 10px; */
    background: white;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

#report_container table {
    width: 714px; 
    margin: 10px 0;
}
#report_container table td, #report_container table th {
    padding: 15px;
    border: #EFEFEF solid 1px;
}

#report_container .paragraph {
    font-size: 18px;
}

#report_container #lista-notas {
    font-size: 16px;
}

html {
  scroll-behavior: smooth;
}

.mapas-flex-grid {
    display: flex; 
    flex-wrap: wrap;
    /* max-width: 714px; */
}

.mapas-flex-item {
  flex: 0 0 50%;  /* 2 items per row */
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 5px;
  text-align: center;
}

#mapa-condicion {
      position: relative;
      margin: 0;
      padding: 0;
      max-width: 400px;
      min-width: 300px;
      height: 400px;
      /* flex: 1; */
}
.ol-legend {
      position: absolute;
      bottom: 10px;
      left: 10px;
      background: white;
      border: 1px solid #ccc;
      padding: 5px;
      z-index: 1;
}

#report_container .ol-legend img {
      max-width: 125px;
}

.text-box {
    width: 300px;
    padding: 1em;
    background: #f8f8f8;
    border-left: 1px solid #ccc;
    /* display: flex; */
    align-items: center; /* vertical centering */
    justify-content: center; /* optional: horizontal centering */
    overflow-y: auto;
}

.text-box p, .text-box div {
    font-size: 14px;
    font-style: italic;
}

.text-box-caudales p, .text-box-caudales div {
    font-size: 14px;
    font-style: italic;
}



#mapa-row {
    display: flex;
    /* height: 100vh; */
    max-width: 100%;
    justify-content: center;
    align-items: center;
}

#map-modal-container {
    display: none;
    position: absolute;
    /* top: 20%; */
    /* left: 50%; */
    /* transform: translateX(-50%); */
    background: white;
    border: 1px solid #ccc;
    padding: 12px;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-size: 14px;
}

#map-modal-container button {
    margin-top: 10px;
}

table tbody a[data-bs-toggle=tooltip] {
    cursor: pointer;
    color: #141414;
    text-decoration: none;
}

#map-viewer-legend {
    position: absolute;
    z-index: 1000;
    right: 1rem;
    bottom: 1rem;
    max-width: 220px;
    padding: .5rem;
    background: rgba(255, 255, 255, .92);
    border: 1px solid #aaa;
    border-radius: .25rem;
}

#map-viewer-legend img {
    display: block;
    max-width: 200px;
    max-height: 300px;
}
.slider-width50 {
    width: 50px;
}

/* div.as-link {
} */

div.region-hidro.is-visible div.as-link {
    cursor: pointer;                         
}

.leaflet-tooltip.info-estacion { 
    font-size: 11px; 
    line-height: 1.0; 
    color: #333; 
    min-width: 134px;
    white-space: break-spaces;
}

.leaflet-tooltip.info-estacion b { 
    color: #004488; 
    font-size: 15px; 
}

@media (pointer: coarse) and (hover: none) {
    table tbody a[data-bs-toggle=tooltip] {
        color: #0767A7;
        text-decoration: underline;
    }
}

@media (max-width: 660px) {
    .container-reporte p {
        max-width: 95vw;
        min-width: 300px;
    }

    .richText .richText-editor table.leyenda-tabla-hidro, #report_container table.leyenda-tabla-hidro {
        max-width: 674px;
    }

    #report_container table.tabla-hidro th:nth-child(1), #report_container table.tabla-hidro td:nth-child(1), #report_container table.tabla-hidro th:nth-child(6), #report_container table.tabla-hidro td:nth-child(6) {
        overflow-wrap: break-word;
        font-size: 17px;
        max-width: 140px;
    }

    #report_container div.paragraph {
        font-size: 16px;
    }

    #report_container #lista-notas {
        font-size: 15px;
    }
}

.mapa-row-semanal {
    display: flex;
    gap: 16px;
    width: 100%;
    /* height: 450px; */
    margin-bottom: 16px;
}

.mapa-row-caudales {
    width: 100%;
    margin-bottom: 16px;
}

#mapa { 
    min-width: 487px;
    max-height: 406px;
    width: 487px;
    height: 406px;
    float: left;
    margin: 0 15px 10px 0;
}

.media-container {
  flex: 1 1 0;
  min-width: 0; /* Prevents intrinsic content size from overflowing */
  height: 100%;
  flex-direction: column;
  position: relative;
}

.mapa_caption_it {
  padding-top: .5rem;
  padding-bottom: .5rem;
  color: #000000;
  text-align: left;
  font-style: italic;
}

.mapa_caption {
  padding-top: .5rem;
  padding-bottom: .5rem;
  color: #6c757d;
  text-align: left;
}

.pmad-tabs {
    display: flex;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
}

.pmad-tabs-top {
    border-bottom: 1px solid #d5dadd;
}

.pmad-tabs-bottom {
    border-top: 1px solid #d5dadd;
}

.pmad-tab {
    position: relative;
    flex: 0 0 auto;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: #4b5560;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

.pmad-tab:hover {
    background-color: #f1f5f6;
    color: #075985;
}

.pmad-tab[aria-selected="true"] {
    color: #075985;
}

.pmad-tabs-top .pmad-tab[aria-selected="true"]::after {
    position: absolute;
    right: 12px;
    bottom: 0;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #087e8b;
    content: "";
}

.pmad-tabs-bottom .pmad-tab[aria-selected="true"]::after {
    position: absolute;
    right: 12px;
    top: 0;
    left: 12px;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: #087e8b;
    content: "";
}


.pmad-tab:focus-visible,
.pmad-text:focus-visible {
    outline: 2px solid #087e8b;
    outline-offset: -2px;
}

.region-hidro, .pmad-text {
    grid-area: 1 / 1; /* Places all panels in the exact same grid slot */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.region-hidro {
    min-width: 0;
    max-width: 100%;
}

.region-hidro.is-visible, .pmad-text.is-visible {
    grid-template-rows: 1fr;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.region-hidro-content, .text-box-content {
    overflow: hidden;
}

.pmad-text[hidden],
.region-hidro[hidden] {
    display: none;
}

.pmad-text-container {
    display: grid;
    min-width: 0;
    flex: 0 0 auto;
}

.region-hidro-container {
    display: grid;
    min-width: 0;
    width: 100%;
}

.media-container img,
#mapa_pmad {
  width: 100%;
  /* height: 100%; */
  object-fit: cover; /* Keeps image aspect ratio clean */
  display: block;
}

#mapa_pmad {
    min-height: 450px;
}

@media (max-width: 600px) {
  #mapa-row {
    flex-direction: column; /* stack vertically on small screens */
  }
  .mapa-row-semanal {
    flex-direction: column;
  }
}

@media (min-width: 1200px) {
  .container-reporte {
    width: 1170px;
  }
}