/* Table Header */
.data-table thead {
    /*background: linear-gradient(to bottom, #4a5568, #2d3748);*/
    color: white;
}
/* First row header cells - with gradient */
.data-table thead tr:first-child th {
    padding: 12px 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #2563eb;
    position: sticky;
    top: 0;
    z-index: 11;
    background: linear-gradient(to bottom, #4a5568, #2d3748);
}

.data-table thead th {
    padding: 12px 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 3px solid #2563eb;
}

.data-table thead th:hover {
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

/* Filter row */
.data-table thead tr:nth-child(2) {
    background: #f1f5f9;
}

.data-table thead tr:nth-child(2) th {
    padding: 8px 4px;
    border-bottom: 2px solid #e2e8f0;
}

/* Filter inputs */
.data-table thead input,
.data-table thead select {
    width: 90%;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    background: white;
}

.data-table thead input:focus,
.data-table thead select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* Clickable columns */
.data-table thead th[onclick] {
    cursor: pointer;
    user-select: none;
}

.data-table thead th[onclick]:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Sortable column - default state (shows it's clickable) */
.data-table thead th.sortable {
    cursor: pointer;
    user-select: none;
}

.data-table thead th.sortable::after {
    content: ' ⇅';
    font-size: 10px;
    /*opacity: 0.5;*/
}

.data-table thead th.sortable:hover::after {
    opacity: 1;
}

/* Active sort states - override default */
.data-table thead th.sort-asc::after {
    content: ' ▲';
    font-size: 10px;
    opacity: 1;
}

.data-table thead th.sort-desc::after {
    content: ' ▼';
    font-size: 10px;
    opacity: 1;
}

/* Option B: Clean separators instead of zebra */
.data-table tbody tr {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.data-table tbody tr:hover {
    background-color: #f3f4f6;  /* neutral gray-100 — won't clash with kind themes */
}

/* Frozen first body row */
.data-table tbody tr.frozen td {
    position: sticky;
    top: var(--header-height, 45px);
    background-color: lemonchiffon;
    z-index: 9;
}

/* Members of frozen group */
.data-table tbody tr.member-of-frozen td {
    background-color: #FFFEF0;
}

/* Trail: green theme — frozen darker, members lighter. */
.data-table tbody tr.frozen-trail td {
    background-color: #86efac;  /* tailwind green-300 */
}
.data-table tbody tr.member-of-trail td {
    background-color: #dcfce7;  /* tailwind green-100 */
}

/* Book: blue theme — lighter palette so the frozen header isn't too heavy. */
.data-table tbody tr.frozen-book td {
    background-color: #bfdbfe;  /* tailwind blue-200 */
}
.data-table tbody tr.member-of-book td {
    background-color: #eff6ff;  /* tailwind blue-50 */
}

/* Search match highlight */
.data-table mark {
    background-color: #fff176;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}

tr.dragging {
    opacity: 0.5;
    background-color: #e0e0e0;
}

        tr.over {
            border-top: 2px solid #808080;
            /*border-top: 3px solid #007bff;*/
        }

/* Owner / Created / Updated */
.data-table td.when {
    white-space: nowrap;
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.data-table td.owner {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #475569;
}

/* Share menu */
.share-menu {
    position: absolute;
    z-index: 100;
    min-width: 230px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    padding: 4px 0;
    font-size: 13px;
    text-align: left;
    direction: ltr;
}
.share-menu .item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    white-space: nowrap;
}
.share-menu .item:hover { background: #f1f5f9; }
.share-menu .item.disabled { color: #94a3b8; cursor: default; }
.share-menu .item.disabled:hover { background: transparent; }
.share-menu .item .ico { width: 18px; text-align: center; }
.share-menu .sep { height: 1px; background: #e2e8f0; margin: 4px 0; }
.share-menu .hint { padding: 4px 12px 6px; font-size: 11px; color: #94a3b8; }

/* cut & paste (drag fallback) */
.cut-banner {
    white-space: nowrap;
    font-size: 13px;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    padding: 4px 10px;
}
.cut-banner .cancel { cursor: pointer; margin-left: 8px; }
.data-table tbody tr.cut-source td { opacity: 0.45; }
.data-table.paste-mode tbody tr:hover td { background-color: #fde68a !important; cursor: copy; }
