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

.flyup-container-series {
  /*height: calc(100% - 70px);*/
  height: 100%;
}

/* Barra inferior flotante */
.flyup-header-series {
    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;
}

.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;
}

/* Controles de paginación (SeriesTable) */
.pagination-controls-series {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
}

.pagination-controls-series .page-btn {
    background: none;
    border: 1px solid #d6d9dd;
    border-radius: 4px;
    width: 28px !important;
    height: 28px !important;
    padding: 0 0 0 0px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px !important;
    color: #4a4c4e;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination-controls-series .page-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
    color: #333;
}

.pagination-controls-series .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-controls-series .page-indicator {
    min-width: 48px;
    text-align: center;
    font-size: 13px !important;
    font-variant-numeric: tabular-nums;
}

/* Controles de filtro (mes/año) */
.date-filter-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
}

.month-select {
    height: 28px;
    width: 48px;
    line-height: 28px;
    border: 1px solid #d6d9dd;
    border-radius: 4px;
    background: #fff;
    color: #4a4c4e;
    padding: 0 6px;
    font-size: 12px;
    cursor: pointer;
}

.year-input-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.year-step {
    background: none;
    border: 1px solid #d6d9dd;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4a4c4e;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.year-step:hover:not(:disabled) {
    background-color: #f0f0f0;
    color: #333;
}

.year-input {
    height: 28px !important;
    line-height: 28px;
    border: 1px solid #d6d9dd;
    border-radius: 4px;
    padding: 0 0 0 10px !important;
    width: 65px !important;
    font-size: 12px !important;
    color: #4a4c4e;
}

.apply-filter-btn {
    background: none;
    border: 1px solid #d6d9dd;
    border-radius: 4px;
    width: 28px !important;
    height: 28px !important;
    padding: 0 0 0 0px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4a4c4e;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.apply-filter-btn:hover:not(:disabled) {
    background-color: #f0f0f0;
    color: #333;
}

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

/* 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);
}

.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);
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tablas individuales abiertas */
.individual-table.open .flyup-table-content-individual {
    height: 100% !important;
    max-height: calc(100vh - 130px) !important;
    overflow: auto;
}

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

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

.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;
    min-width: 10ch;
}

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

/*.flyup-table-content-individual table tbody tr {
    cursor: pointer;
}*/

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

.download-csv-series-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-series-btn i {
    font-size: 14px;
}

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

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

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

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

/* Badge clickeable con hint */
.feature-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 10px;
    background: #4a90e2;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.feature-badge:hover {
    background: #3a7ac0;
}

/* Input para filas por página: reutiliza estilo de .year-input */
.rows-per-page-input {
    margin-left: 6px;
    width: 45px !important; /* un poco más ancho que el año */
}

.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;
}

.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;
}
