/* Contenedor absoluto en la parte inferior (para compatibilidad) */
.graph-flyup-container {
    position: fixed;
    width: 100%;
    height: 100%;
}

.graph-iframe {
    width: 100%;
    height: 100%;
}

/* Overlay de carga centrado sobre el iframe */
.graph-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    z-index: 2;
}

.graph-loader.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #cfd8dc;
    border-top-color: #607d8b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.flyup-container-g {
  height: calc(100% - 60px);
}

.flyup-table-stat{
  height:  calc(100% - 60px);
}

/* Barra inferior flotante */
.flyup-header-stat {
    background: #9fb9d3;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

/* Controles de fecha y botón en el encabezado del gráfico */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.graph-title {
    font-weight: 700;
}

.date-label {
    font-size: 12px;
    color: #2d2d2d;
}

.date-input {
    height: 28px !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    border: 1px solid #b8c4cf;
    border-radius: 4px;
    background: #fff;
    color: #333;
}

.reload-graph-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.reload-graph-btn i {
    font-size: 14px;
}

.reload-graph-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.flyup-header-indiv {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 0.3rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
}

.flyup-toggle-btn {
    all: unset;   
    background: none;
    border: none;
    font-size: 1rem;
    color: #5f6163;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.flyup-toggle-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.flyup-toggle-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

/* Clase para rotación */
.rotated i {
    transform: rotate(180deg) !important;
}

.header-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Contenido de la tabla, altura máxima y scroll */
.flyup-table-content {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: auto;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#flyupContentStats.flyup-table-content-individual {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.25rem 0.25rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    max-height: 0px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel principal abierto */
#flyupTable.open #flyupContent {
    max-height: var(--table-max-height, 400px);
    overflow-y: auto;
    transition: max-height 0.3s ease;
}

/* Tabla con tamaño reducido */
#flyupTable.resized-small #flyupContent {   
    max-height: var(--table-small-height, 200px);
    overflow-y: auto;
}

/* Asegurar que el contenedor siempre esté en la parte inferior */
.tablestat-flyup-container.resized-small {
    top: auto !important;
}

/* Tablas individuales abiertas */
#flyupTableStats.individual-table.open #flyupContentStats.flyup-table-content-individual {
    height: fit-content;
    max-height: 400px;
    overflow-y: auto;
}

/* Tabla responsive tipo Bootstrap */
#flyupContentStats.flyup-table-content-individual table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    margin: 0 0;
}

#flyupContentStats.flyup-table-content-individual table thead {
    background: #e9ecef;
}

#flyupContentStats.flyup-table-content-individual table thead th {
    font-weight: bold;
    padding: 0.25rem 1rem;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    color: #343a40;
    position: sticky;
    top: 0;
    background: #e9ecef;
    font-size: 12px;
    z-index: 2;
    width: 30%;
}

#flyupContentStats.flyup-table-content-individual table tbody td {
    padding: 0.25rem 1rem;
    border-top: 1px solid #dee2e6;
    color: #495057;
    background: white;
    font-size: 12px;
}

#flyupContentStats.flyup-table-content-individual table tbody tr {
    cursor: pointer;
}

#flyupContentStats.flyup-table-content-individual table tbody tr:hover {
    background: #333;
}

/* Tablas individuales abiertas */
#flyupTableGeneral.individual-table.open #flyupContentGeneral.flyup-table-content-individual {
    height: fit-content;
    max-height: 400px;
    overflow-y: auto;
}

/* Tabla responsive tipo Bootstrap */
#flyupContentGeneral.flyup-table-content-individual table {
    width: 100%;
    min-width: 500px;
    border-collapse: collapse;
    margin: 0 0;
}

#flyupContentGeneral.flyup-table-content-individual table thead {
    background: #e9ecef;
}

#flyupContentGeneral.flyup-table-content-individual table thead th {
    font-weight: bold;
    padding: 0.25rem 1rem;
    border-bottom: 2px solid #dee2e6;
    text-align: left;
    color: #343a40;
    position: sticky;
    top: 0;
    background: #e9ecef;
    font-size: 12px;
    z-index: 2;
    width: 30%;
}

#flyupContentGeneral.flyup-table-content-individual table tbody td {
    padding: 0.25rem 1rem;
    border-top: 1px solid #dee2e6;
    color: #495057;
    background: white;
    font-size: 12px;
}

#flyupContentGeneral.flyup-table-content-individual table tbody tr {
    cursor: pointer;
}

#flyupContentGeneral.flyup-table-content-individual table tbody tr:hover {
    background: #333;
}

.download-csv-stat-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.download-csv-stat-btn i {
    font-size: 14px;
}

.download-csv-stat-btn.visible {
    display: block;
    opacity: 1;
    visibility: visible;
}

.download-csv-stat-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* Estilos para el badge de contador de features */

.individual-table {
    margin-bottom: 2px;
}

.go-back-map-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.go-back-map-btn i {
    font-size: 14px;
}

.go-back-map-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.graphic-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.graphic-btn i {
    font-size: 14px;
}

.graphic-btn.visible {
    display: block;
    opacity: 1;
    visibility: visible;
}

.graphic-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.titulo-tabla {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.05);
    font-weight: 600;
    padding: 0.3rem 1rem;
    text-align: center;
    font-size: 14px;
}

.series-btn1 {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.series-btn1 i {
    font-size: 14px;
}

.series-btn1.visible {
    display: block;
    opacity: 1;
    visibility: visible;
}

.series-btn1:hover {
    background-color: #f0f0f0;
    color: #333;
}

.highcharts-menu-item{
    font-family: Arial, sans-serif;
    font-size: 14px !important;
}	