/* ZMT Table Widget — styles */

/* Wrapper for horizontal scroll and layout */
.zmt-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* Table core */
.zmt-table {
    width: 100%;
    border-collapse: collapse; /* keep collapse so existing look stays */
    border-spacing: 0;
    background-color: #ffffff;
    margin: 0; /* avoid bottom gaps */
    box-sizing: border-box;
}

.zmt-table th,
.zmt-table td {
    padding: 10px;
    border: 1px solid #ddd; /* can be overridden by Row Styling controls */
    text-align: left;
    box-sizing: border-box;
}

.zmt-table th {
    background-color: #f2f2f2;
    color: #333333;
}

.zmt-table tr:nth-child(odd) td {
    background-color: #ffffff;
}

.zmt-table tr:nth-child(even) td {
    background-color: #f9f9f9;
}

.zmt-table td {
    color: #333333;
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .zmt-table-wrapper {
        overflow-x: scroll;
    }
    .zmt-table th,
    .zmt-table td {
        min-width: 100px;
    }
}

/* Outer container that receives radius/shadow/border */
.zmt-table-container {
    width: 100%;
    background: #ffffff;
    overflow: hidden; /* clip rounded corners & fix stray edges */
}

/* Trim outer edges when using container border as outer stroke */
.zmt-trim-edges-yes .zmt-table tr > *:first-child { border-left: 0; }
.zmt-trim-edges-yes .zmt-table tr:first-child > * { border-top: 0; }
.zmt-trim-edges-yes .zmt-table tr > *:last-child  { border-right: 0; }
.zmt-trim-edges-yes .zmt-table tr:last-child > *  { border-bottom: 0; }
.zmt-trim-edges-yes .zmt-table { margin-bottom: 0; }

/* Corner helpers for visible rounding (also used by General→Table Border Radius) */
.zmt-table thead tr:first-child th:first-child { border-top-left-radius: inherit; }
.zmt-table thead tr:first-child th:last-child  { border-top-right-radius: inherit; }
.zmt-table tbody tr:last-child  td:first-child { border-bottom-left-radius: inherit; }
.zmt-table tbody tr:last-child  td:last-child  { border-bottom-right-radius: inherit; }
