/* Table Widget Styles */
.inapem-table-container {
    width: 100%;
    overflow-x: auto;
    margin-bottom: 24px;
}

.inapem-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Open Sans", var(--font-primary);
    color: var(--color-primary); 
    border-left: 5px solid var(--color-secondary, #469BD3);
}

.inapem-table thead th {
    text-align: left;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
    border-bottom: 2px solid #e2e8f0;
}

.inapem-table tbody {
    border-bottom: none !important;
}

.inapem-table tbody tr {
    transition: all 0.2s ease;
    background-color: #ffffff;
}

/* Hover & Active Styles */
.inapem-table tbody tr:hover,
.inapem-table tbody tr.active-row {
    background-color: #E2EFF9; 
    cursor: pointer;
}

.inapem-table tbody td {
    padding: 16px 20px;
    font-size: 14px;
    vertical-align: middle;
}

/* Document name slightly bolder when hovered */
.inapem-table tbody tr:hover td:first-child,
.inapem-table tbody tr.active-row td:first-child {
    font-weight: 600;
    color: var(--color-primary);
}

.inapem-table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #25355C;
    border-radius: var(--Radii-Semantic_tokens-l2, 4px);
    background-color: transparent;
    color: #25355C !important;
    font-size: 12px !important;
    font-weight: 600;
    transition: all 0.2s;
}

.inapem-table-action-btn i {
    font-size: 12px !important;
    color: #25355C !important;
}

.inapem-table-action-btn:hover {
    background-color: #f1f5f9;
}

.inapem-table-empty {
    text-align: center;
    padding: 32px !important;
    color: var(--color-dark-grey);
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .inapem-table {
        display: block;
    }
    
    .inapem-table thead {
        display: none;
    }

    .inapem-table tbody {
        display: block;
    }

    .inapem-table tbody tr {
        display: flex;
        flex-direction: column;
        position: relative;
        padding: 16px 20px;
        gap: 4px;
        border-bottom: 1px solid #f1f5f9; /* Subtle separator if needed, or remove */
    }

    .inapem-table tbody tr:last-child {
        border-bottom: none;
    }

    .inapem-table tbody td {
        display: block;
        padding: 0;
        width: calc(100% - 150px); /* Space for the absolute button */
        font-size: 13px;
        color: #64748b;
        vertical-align: top;
    }

    .inapem-table tbody td:first-child {
        font-size: 14px;
        font-weight: 500;
        color: var(--color-primary, #25355C);
        margin-bottom: 6px;
    }

    .inapem-table tbody td:last-child {
        position: absolute;
        top: 16px;
        right: 20px;
        width: auto;
    }

    /* Handling the empty state gracefully on mobile */
    .inapem-table tbody td.inapem-table-empty {
        width: 100%;
        position: static;
        padding: 32px !important;
    }
}
