/* css/right-sidebar.css  el html esta en components/sidebar.html */


/* Contenedor Principal (Posicionamiento Absoluto) */
.right-sidebar {
    position: absolute;
    top: 0;
    right: -320px; /* Oculto inicialmente por su propio ancho */
    width: 320px;
    height: 100%;
    z-index: 1040; /* Por encima del mapa, debajo de modales top */
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ddd;
}

/* Estado activo (Despliegue a la vista) */
.right-sidebar.activo {
    right: 0;
}

/* Botón flotante para abrir/cerrar */
.btn-toggle-right {
    position: absolute;
    left: -42px;
    top: 80px; /* Altura cómoda para clics */
    width: 42px;
    height: 42px;
    background-color: #343a40;
    color: white;
    border: none;
    border-radius: 8px 0 0 8px;
    box-shadow: -3px 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.btn-toggle-right:hover {
    background-color: #C68A2C; /* Dorado Institucional */
}

/* Áreas de contenido interno */
.right-sidebar-body {
    flex-grow: 1;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}

.tab-content {
    flex-grow: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Estilo para cada fila de obra generada */
.obra-item-list {
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    transition: all 0.2s;
}

.obra-item-list:hover {
    background-color: #f8f9fa;
    padding-left: 12px !important; /* Pequeña animación al pasar el mouse */
    border-left: 3px solid #C68A2C;
}

/* Ajuste sutil a las pestañas nativas de Bootstrap */
.custom-tabs .nav-link {
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 4px 4px 0 0;
}

/* === Dashboard Demográfico de Colonias (Pob. 2020) === */
.quick-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat-mini-card {
    background-color: #f8f9fa;
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border: 1px solid #eef2f5;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stat-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    border-color: #C68A2C; /* Highlight con Dorado */
}

.stat-mini-card .label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 700;
}

.stat-mini-card .value {
    font-size: 13px;
    font-weight: 700;
    color: #343a40;
}

/* Educación: distribución por nivel */
.educ-card {
    grid-column: 1 / -1;
    padding: 10px 12px 8px;
    gap: 4px;
}
.educ-card .educ-title {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 700;
    margin-bottom: 6px;
}
.educ-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.educ-label {
    width: 95px;
    flex-shrink: 0;
    color: #495057;
    font-weight: 600;
    font-size: 9px;
    line-height: 1.3;
}
.educ-bar-track {
    flex: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}
.educ-bar-fill {
    height: 100%;
    border-radius: 5px;
    background: #C68A2C;
    transition: width 0.4s ease;
}
.educ-count {
    width: 42px;
    text-align: right;
    font-weight: 700;
    color: #343a40;
    font-size: 11px;
}

/* Gráficos del panel */
.chart-wrapper {
    transition: transform 0.25s ease;
}
.chart-wrapper:hover {
    transform: translateY(-2px);
}

/* === Sugerencias de Búsqueda === */
.aprob-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
}

.aprob-suggestions.active {
    display: block;
}

.aprob-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    color: #333;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.15s;
}

.aprob-suggestion-item:last-child {
    border-bottom: none;
}

.aprob-suggestion-item:hover {
    background-color: #f8f9fa;
    padding-left: 16px;
}

.aprob-suggestion-item small {
    color: #6c757d;
    font-size: 10px;
}