/**
 * Elementor Table Widget Styles
 * Responsive table with clean design
 */

.custom-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 20px 0;
    position: relative;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #ffffff;
    table-layout: auto;
}

/* Table Cells */
.custom-table th,
.custom-table td {
    text-align: left;
    vertical-align: top;
}

.custom-table th {
    font-weight: 600;
    border-style: solid;
}

.custom-table td {
    border-style: solid;
}

/* Preserve desktop table layout on tablet/mobile.
   Use horizontal scrolling for small viewports instead of stacking rows. */

/* Ensure table elements remain table-like on all devices */
.custom-table {
    table-layout: auto;
}

.custom-table thead {
    display: table-header-group;
}

.custom-table tbody tr {
    display: table-row;
}

.custom-table th,
.custom-table td {
    display: table-cell;
    padding: 12px 15px;
}

/* Slightly reduce padding on small devices while keeping layout */
@media screen and (max-width: 480px) {
    .custom-table th,
    .custom-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .custom-table-wrapper {
        overflow: visible;
    }
    
    .custom-table {
        border-collapse: collapse;
    }
    
    .custom-table th,
    .custom-table td {
        border: 1px solid #ddd;
        padding: 8px;
    }
}

/* Smooth Transitions */
.custom-table tbody tr {
    transition: background-color 0.3s ease;
}

/* Scrollbar Styling (Optional) */
.custom-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.custom-table-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-table-wrapper::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.custom-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #555;
}