/* Contenedor general de la tabla */
.tabla-documentos {
    padding: 20px;
}

/* Contenedor para hacer la tabla responsive */
.tabla-responsive {
    overflow-x: auto;
    width: 100%;
}

/* Estilo base de la tabla */
table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Ayuda a distribuir bien el ancho */
}

/* Celdas */
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ccc;
    word-wrap: break-word; /* Evita que el texto se desborde */
}

/* Encabezado */
th {
    background-color: #621132;
    color: #fff;
}

/* Botón dentro de la celda */
td button {
    padding: 6px 12px;
    background-color: #4c0d26;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

td button:hover {
    background-color: #3b0a1e;
}

/* Modal PDF */
.modalpdf {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal-content.pdf {
    background-color: #fff;
    margin: 5% auto;
    padding: 10px;
    border-radius: 10px;
    max-width: 90%;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.modal-content.pdf iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex-grow: 1;
    border-radius: 8px;
}

/* Botón de cierre */
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Botón de descarga */
.boton-descarga {
    display: inline-block;
    margin: 10px;
    padding: 8px 16px;
    background-color: #621132;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/* Responsivo: tablets y móviles */
@media (max-width: 600px) {
    table {
        table-layout: auto; /* Mejor ajuste en pantallas pequeñas */
    }

    /* Primera columna ocupa más espacio */
    td:first-child, th:first-child {
        width: 75%;   /* Texto más ancho */
    }

    /* Segunda columna (botón) ocupa menos */
    td:last-child, th:last-child {
        width: 25%;   /* Botón ajustado */
        text-align: center;
    }

    /* Texto más pequeño para que quepa mejor */
    td, th {
        font-size: 14px;
    }

    /* Botón ocupa el ancho disponible de su columna */
    td button {
        width: 100%;
        max-width: 120px; /* Evita que se estire demasiado */
    }
}

/* Centrar el texto y botones de la segunda columna */
table td:nth-child(2),
table th:nth-child(2) {
    text-align: center;
    white-space: nowrap; /* Evita que se corte el texto o el botón */
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 600px) {
    table td:first-child,
    table th:first-child {
        width: 75%;   /* Más espacio para el texto */
    }

    table td:nth-child(2),
    table th:nth-child(2) {
        width: 25%;   /* Ajusta la columna de acciones */
        text-align: center;
    }
}

