/* --- Estilos sólo para la página de PMP --- */

.pmp-section {
    margin-top: 1.5rem;
}

/* Contenedor de la tabla */
.pmp-section .tabla-pmp-resultado {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    background: #020617;
    border-radius: 12px;
    overflow: hidden;            /* redondeo en toda la tabla */
    font-size: 0.9rem;
}

/* Encabezados (fila de semanas) */
.pmp-section .tabla-pmp-resultado thead th {
    background: #e2f0ff;
    color: #1f2933;
    text-align: center;
    padding: 0.7rem 0.9rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(15, 23, 42, 0.2);
}

/* Primera columna (nombres de fila) */
.pmp-section .tabla-pmp-resultado tbody th {
    background: #0b1628;
    color: #e5e7eb;
    font-weight: 600;
    text-align: right;
    padding: 0.5rem 1.2rem;
    border-right: 1px solid rgba(15, 23, 42, 0.6);
}

/* Celdas de datos */
.pmp-section .tabla-pmp-resultado tbody td {
    padding: 0.5rem 0.9rem;
    text-align: center;
    color: #e5e7eb;
    border-bottom: 1px solid rgba(15, 23, 42, 0.8);
}

/* Rayado de filas */
.pmp-section .tabla-pmp-resultado tbody tr:nth-child(odd) td {
    background: #020617;
}

.pmp-section .tabla-pmp-resultado tbody tr:nth-child(even) td {
    background: #050b19;
}

/* Colores especiales para BDP, DPP y PMP (texto de la primera columna) */
.pmp-section .tabla-pmp-resultado tbody tr:nth-child(4) th {
    color: #f97373;   /* BDP rojo */
}

.pmp-section .tabla-pmp-resultado tbody tr:nth-child(5) th {
    color: #818cf8;   /* DPP violeta */
}

.pmp-section .tabla-pmp-resultado tbody tr:nth-child(6) th {
    color: #3b82f6;   /* PMP azul */
}

/* Celdas donde sí hay producción PMP (ya tienes class="celda-pmp") */
.pmp-section .tabla-pmp-resultado td.celda-pmp {
    background: #fee2e2 !important;
    color: #b91c1c;
    font-weight: 700;
}

/* Para que la celda PMP resalte aún más al pasar el mouse */
.pmp-section .tabla-pmp-resultado td.celda-pmp:hover {
    filter: brightness(1.03);
}

/* Responsive: en pantallas pequeñas reducimos un poco la fuente */
@media (max-width: 768px) {
    .pmp-section .tabla-pmp-resultado {
        font-size: 0.8rem;
    }

    .pmp-section .tabla-pmp-resultado thead th,
    .pmp-section .tabla-pmp-resultado tbody td,
    .pmp-section .tabla-pmp-resultado tbody th {
        padding: 0.45rem 0.5rem;
    }
}
/* === Desactivar el tooltip flotante anterior (por si quedó algo) === */
.pmp-section .tabla-pmp-resultado td.tooltip::after,
.pmp-section .tabla-pmp-resultado td.tooltip::before {
    content: none !important;
}

/* === Modal para detalle de celdas PMP === */

.pmp-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease-in-out;
}

.pmp-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.pmp-modal-dialog {
    background: #020617;
    border-radius: 14px;
    padding: 1.2rem 1.4rem 1.4rem;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 18px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(148, 163, 184, 0.35);
    position: relative;
}

.pmp-modal-dialog h4 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: #e5e7eb;
}

.pmp-modal-text {
    margin: 0;
    white-space: pre-wrap;
    font-family: "JetBrains Mono", "Fira Code", Consolas, monospace;
    font-size: 0.85rem;
    color: #e5e7eb;
    line-height: 1.3rem;
}

/* Botón cerrar */
.pmp-modal-close {
    position: absolute;
    top: 0.35rem;
    right: 0.55rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.pmp-modal-close:hover {
    color: #f9fafb;
}

/* Cursor en las celdas con detalle */
.pmp-section .tabla-pmp-resultado td.tooltip {
    cursor: pointer;
}
