/* ================================================
   ZSQUARE Data Table PRO — Base Styles
   ================================================ */

/* ── Wrapper ─────────────────────────────────── */
.zsq-table-wrap {
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-sizing: border-box;
    width: 100%;
    /* overflow is handled by the inner responsive div,
       not here — so the scrollbar is always visible */
    overflow: hidden;
}

/* When responsive scroll is on, let the inner div handle overflow */
.zsq-table-wrap.zsq-has-scroll {
    overflow: visible;
    padding-bottom: 2px; /* tiny breathing room for scrollbar on some browsers */
}

.zsq-table-wrap.zsq-has-scroll .zsq-table-responsive {
    border-radius: 12px;
    overflow-x: auto;
}

/* ── Table ───────────────────────────────────── */
.zsq-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    table-layout: auto;
}

/* ── Header ──────────────────────────────────── */
.zsq-table thead tr {
    background-color: #1E2D4A;
}

.zsq-table thead th {
    padding: 18px 24px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
    letter-spacing: 0.01em;
    border: none;
}

/* ── Body Rows ───────────────────────────────── */
.zsq-table tbody tr {
    background-color: #ffffff;
    border-bottom: 1px solid #E2E8F0;
    transition: background-color 0.18s ease;
}

.zsq-table tbody tr:last-child {
    border-bottom: none;
}

.zsq-table tbody tr:hover {
    background-color: #F8F5F1;
}

/* ── First Column ────────────────────────────── */
.zsq-table tbody td.zsq-col-first {
    padding: 22px 24px;
    color: #1E2D4A;
    font-size: 15px;
    vertical-align: middle;
}

.zsq-table tbody td.zsq-col-first strong {
    font-weight: 700;
}

/* ── Other Cells ─────────────────────────────── */
.zsq-table tbody td {
    padding: 22px 24px;
    color: #3D4B60;
    font-size: 15px;
    line-height: 1.6;
    vertical-align: middle;
    text-align: left;
}

/* ── Highlighted Row ─────────────────────────── */
.zsq-table tbody tr.zsq-row-highlight {
    background-color: #F0F4FA;
}

/* ── Responsive horizontal scroll ───────────────
   The wrapper scrolls; the table never collapses.
   ─────────────────────────────────────────────── */
.zsq-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* show a subtle scroll shadow hint on mobile */
    background:
        linear-gradient(to right, #fff 30%, rgba(255,255,255,0)),
        linear-gradient(to right, rgba(255,255,255,0), #fff 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.08), transparent),
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.08), transparent) 100% 0;
    background-repeat: no-repeat;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

/* Table always renders at its natural full width — never wraps */
.zsq-table {
    min-width: 600px; /* prevents collapse; adjust if you have fewer columns */
}

@media (max-width: 768px) {
    .zsq-table thead th,
    .zsq-table tbody td,
    .zsq-table tbody td.zsq-col-first {
        padding: 14px 16px;
        font-size: 13px;
        white-space: normal; /* allow text wrap inside cells, just not the table itself */
    }
}
