/* =========================
   TABLE SCROLL WRAPPER
========================= */

.table-scroll{
    margin:25px 0;
    padding:0 0 2px;

    overflow-x:auto;
    overflow-y:hidden;

    border:1px solid #e0e0e0;
    border-radius:6px;
    box-shadow:0 1px 3px rgba(0,0,0,0.1);

    background:#fff;

    cursor:grab;

    scrollbar-width:thin;
    scrollbar-color:#8d8d8d transparent;
}

/* dragging */

.table-scroll.is-dragging,
.table-scroll.is-dragging *{
    user-select:none;
    cursor:grabbing;
}


/* =========================
   TABLE BASE
========================= */

.full-text .table-scroll table{
    width:max-content !important;
    min-width:100%;

    margin:0;

    border-collapse:separate !important;
    border-spacing:0 !important;
    border:0 !important;

    background:#fff;

    height:auto !important;
}

.table-scroll td,
.table-scroll th{
    white-space:nowrap;
    user-select:text;
    border-color:#e9edf2;
}


/* =========================
   HEADER
========================= */

.full-text .table-scroll thead th{
    background:#cfe0ef;
    color:#1a1a1a;
}

/* OPTIONAL (enable თუ გინდა sticky header)
.full-text .table-scroll thead th{
    position:sticky;
    top:0;
    z-index:2;
}
*/

.table-scroll thead th:first-child{
    border-top-left-radius:6px;
}

.table-scroll thead th:last-child{
    border-top-right-radius:6px;
}

/* fallback (no thead via JS class) */

.full-text .table-scroll table.no-thead tr:first-child td{
    background:#cfe0ef;
    color:#1a1a1a;
}


/* =========================
   ZEBRA
========================= */

.full-text .table-scroll tbody tr:nth-child(even) td{
    background:#f4f7fa;
}

.full-text .table-scroll tbody tr:nth-child(odd) td{
    background:#ffffff;
}

/* fallback */

.full-text .table-scroll table.no-thead tr:nth-child(even) td{
    background:#f4f7fa;
}

.full-text .table-scroll table.no-thead tr:nth-child(odd) td{
    background:#ffffff;
}


/* =========================
   BOTTOM CORNERS
========================= */

.table-scroll tbody tr:last-child td:first-child{
    border-bottom-left-radius:6px;
}

.table-scroll tbody tr:last-child td:last-child{
    border-bottom-right-radius:6px;
}


/* =========================
   SCROLLBAR
========================= */

.table-scroll::-webkit-scrollbar{
    height:8px;
}

.table-scroll::-webkit-scrollbar-track{
    background:transparent;
    margin:0 12px 2px 12px;
}

.table-scroll::-webkit-scrollbar-thumb{
    background:#8d8d8d;
    border-radius:999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover{
    background:#777;
}


/* =========================
   DARK MODE
========================= */

.zf-dark .table-scroll{
    border-color:#2a2f36;
    box-shadow:0 1px 3px rgba(0,0,0,0.35);
    background:#0f141a;
    scrollbar-color:#4b5560 transparent;
}

.zf-dark .table-scroll table{
    background:#0f141a;
}

.zf-dark .full-text .table-scroll td,
.zf-dark .full-text .table-scroll th{
    color:#e6edf3;
    border-color:#2a2f36;
    background:#1a2128;
}

.zf-dark .full-text .table-scroll thead th{
    background:#1a2128;
    color:#ffffff;
}

.zf-dark .full-text .table-scroll tbody tr:nth-child(even) td{
    background:#141a20;
}

.zf-dark .full-text .table-scroll tbody tr:nth-child(odd) td{
    background:#0f141a;
}

.zf-dark .table-scroll::-webkit-scrollbar-thumb{
    background:#4b5560;
}

.zf-dark .table-scroll::-webkit-scrollbar-thumb:hover{
    background:#5b6672;
}