/* Responsive table adjustments for mobile and tablet */

/* Ensure the table layout is set to auto to respect min-widths */
.elementor-widget-text-editor table {
    table-layout: auto !important;
    width: 100% !important;
}

/* Base structural column spacing */
.elementor-widget-text-editor table th:nth-child(1),
.elementor-widget-text-editor table td:nth-child(1) {
    width: 60px;
    min-width: 50px;
}

.elementor-widget-text-editor table th:nth-child(2),
.elementor-widget-text-editor table td:nth-child(2) {
    width: 25%;
    min-width: 140px; /* Ensures the Phase column has decent space and doesn't get squeezed */
}

@media screen and (max-width: 1024px) {
    /* Let table cells wrap and adjust padding for tablet and mobile */
    .elementor-widget-text-editor table,
    .elementor-widget-text-editor table th,
    .elementor-widget-text-editor table td {
        white-space: normal !important;
        word-break: break-word;
    }

    .elementor-widget-text-editor table th,
    .elementor-widget-text-editor table td {
        padding: 8px 10px !important;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 767px) {
    .elementor-widget-text-editor table th:nth-child(2),
    .elementor-widget-text-editor table td:nth-child(2) {
        min-width: 110px; /* Slightly smaller min-width on mobile to avoid excessive horizontal scrolling */
    }

    /* Extra responsiveness for mobile */
    .elementor-widget-text-editor table th,
    .elementor-widget-text-editor table td {
        padding: 6px 8px !important;
        font-size: 0.85rem;
    }

    /* Wrap the parent of any table in a scroll container if needed */
    .elementor-widget-text-editor {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
