/*************************
**  Our Tasmania Website
**  Tables styles sheet
**  Build V. 0.2
**  Build Notes: the elements that relate to tables of the site dark build
**
**********************/
/* ═══════════════════════════════════════════════════
    FULL SPECIES TABLE — dark DataTables with thumbnails
═══════════════════════════════════════════════════ */
.ot-table-wrap {
    background: var(--bg-card);
    border-radius: var(--radius-lg); overflow: hidden; position: relative;
}
.ot-table-wrap::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--emerald-rule), transparent);
}
.ot-table-header {
    padding: 1.5rem 2rem 1.25rem; border-bottom: 1px solid var(--emerald-xdim);
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.ot-table-header__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 0; }
.ot-table-scroll { overflow-x: auto; }
/* DataTables' Bootstrap 5 layout puts its controls, table and paging in .row
   elements, whose -12px margins overhang .dt-container (it has no padding to
   absorb them): the scroller ran 12px wide and showed a scrollbar even when the
   table fitted. A zero gutter drops the margin and the matching column padding
   together, so nothing inside moves. */
.dt-container > .row { --bs-gutter-x: 0; }
.ot-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.ot-table thead tr { border-bottom: 1px solid var(--emerald-xdim); }
.ot-table thead th {
    padding: .85rem 1.2rem; font-family: var(--font-mono); font-size: .8rem;
    letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; white-space: nowrap;
}
.ot-table thead th.col-center { text-align: center; }
.ot-table tbody tr { border-bottom: 1px solid var(--emerald-xdim); transition: background .15s; }
.ot-table tbody tr:last-child { border-bottom: none; }
.ot-table tbody tr:hover { background: rgba(255,255,255,.025); }
.ot-table td { padding: .9rem 1.2rem; vertical-align: middle; color: var(--ink-2); }
.ot-table td.col-center { text-align: center; }

/* Thumbnail cell */
.td-thumb {
    width: 80px; height: 54px; object-fit: cover;
    border-radius: var(--radius);
    display: block; transition: transform .25s;
}
tr:hover .td-thumb { transform: scale(1.06); }

.td-sp-name { font-family: var(--font-display); font-size: .9rem; font-weight: 700; color: var(--ink); display: block; }
.td-sp-latin { font-family: var(--font-mono); font-size: .72rem; font-style: italic; color: var(--ink-3); }
.td-sp-desc { font-size: .78rem; color: var(--ink-4); line-height: 1.5; margin-top: .25rem; display: block; }

/* origin + conservation icon cells */
.td-icon img { width: 36px; height: 36px; object-fit: contain; }

/* count badge */
.td-count {
    font-family: var(--font-body); font-size: 1rem;
    color: var(--survey); line-height: 1;
}

/* view action */
.td-action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius);
    background: rgba(255,255,255,.04);
    color: var(--ink-3); text-decoration: none; transition: all .2s;
}
.td-action:hover { background: var(--survey-dim); color: var(--emerald-dim); }

.ot-table tfoot td {
    padding: .85rem 1.2rem; font-family: var(--font-mono); font-size: .65rem;
    letter-spacing: .08em; color: var(--ink-4); border-top: 1px solid var(--emerald-rule);
    background: rgba(255,255,255,.015);
}
.ot-table tfoot .total-count { color: var(--survey); font-weight: 600; }
.ot-table tfoot .total-note { font-size: .72rem; color: var(--ink-4); font-style: italic; }

/* DataTables dark overrides */
/*
 * The field sits on a card, so it steps down to --bg: 1.12:1 against
 * --bg-card, the separation every other form here uses. It used to be given
 * the card's own colour as a literal, which measured 1.00:1 — invisible but
 * for its outline, and a dark box on cream once the theme changed.
 */
div.dt-container .dt-search input,
div.dt-container .dt-length select {
    background: rgba(255, 255, 255, .06) !important;
    border: 1px solid var(--emerald-rule) !important;
    color: var(--ink) !important;
    border-radius: var(--radius) !important;
    font-family: var(--font-body) !important;
    font-size: .82rem !important;
    padding: .35rem .75rem !important;
}
/* --ink-3 measures 3.74:1 on the light ground; --ink-2 reads 5.53:1. */
div.dt-container .dt-search input::placeholder {
    color:var(--ink-4) !important;
    opacity: 1;
}
div.dt-container .dt-info,
div.dt-container .dt-paging .dt-paging-button { color: var(--ink-3) !important; font-size: .8rem !important; }
div.dt-container .dt-paging .dt-paging-button.current {
    background: var(--emerald-dim) !important; border-color: var(--emerald-rule) !important; color: var(--emerald) !important;
}
.dt-layout-start {
    margin-left: 20px !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
}
.dt-layout-end {
    margin-right: 20px !important;
    margin-top: 10px !important;
    margin-bottom: 20px !important;
}
.dt-length, .dt-search {
    color: var(--ink-4) !important;
    font-size: 0.75rem;
}
.pagination {
    --bs-pagination-disabled-bg: var(--emerald-xdrk) !important;
    --bs-pagination-disabled-border-color: var(--emerald-xdrk) !important;
}
.page-link {
    /* Light labels: --black on this green measured 1.5:1 in both themes. */
    color: var(--white) !important;
    background-color: var(--emerald-xdrk) !important;
    border: 0 !important;
    transition: all 0.3s ease-in-out;
}
.page-link:hover {
    color: var(--white) !important;
    background-color: var(--emerald-drk) !important;
    scale: 1.1;
    transition: all 0.3s ease-in-out;
    border-radius: 5px;
}
/* Disabled arrows: visibly unavailable, still legible. */
.page-item.disabled > .page-link { color: rgba(255,255,255,.62) !important; }
.page-link:focus {
    box-shadow: none !important;
}
.hover-scale-8{
    scale: 1;
    cursor: pointer;
    transition: all 0.3s ease-in-out;

}
.hover-scale-8:hover{
    scale: 2.8;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    z-index: 30 !important;
    position: relative;
}

.active>.page-link, .page-link.active:hover {
    scale: 1.1 !important;
    border-radius: 5px;
    font-weight: bold;
}
.active>.page-link, .page-link.active {
    z-index: 3;
    /* !important: without it the base .page-link colour always won. */
    color: var(--white) !important;
    background-color: var(--emerald-drk) !important;
    scale: 1.1;
    border-radius: 5px;
    font-weight: bold;
}
.form-select:focus {
    border-color: var(--emerald-rule);
    outline: 0;
    box-shadow: 0 0 0 .25rem var(--emerald-xdim);
}
.form-control:focus {
    border-color: var(--emerald-rule);
    outline: 0;
    box-shadow: 0 0 0 .25rem var(--emerald-xdim);
}
thead {
    background-color: var(--emerald-xdim) !important;
}

/* Light theme: Bootstrap tables stay transparent and restrained on parchment. */
html[data-theme="light"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--ink);
    --bs-table-border-color: var(--rule);
    --bs-table-striped-bg: rgba(109,96,66,.06);
    --bs-table-hover-bg: rgba(77,132,47,.08);
}

html[data-theme="light"] .table > :not(caption) > * > * {
    color: var(--ink);
    border-bottom-color: var(--rule);
}

html[data-theme="light"] .table > thead {
    background: var(--bg-2);
    color: var(--ink);
}

html[data-theme="light"] .table > thead > tr > * {
    background-color: var(--bg-2);
}

/* ── Light theme contrast (2026-09-16) ──
   --ink-3 and --ink-4 land at 3.1-4.2:1 on the ivory table surface at these
   sizes, and --survey at 3.0:1; deeper values for light only. */
html[data-theme="light"] .dt-column-title,
html[data-theme="light"] .td-sp-latin,
html[data-theme="light"] .td-sp-desc { color: var(--ink-2); }
/* These base rules are !important, so the light values must be too. */
html[data-theme="light"] div.dt-container .dt-info,
html[data-theme="light"] .dt-length,
html[data-theme="light"] .dt-search,
html[data-theme="light"] .dt-length label,
html[data-theme="light"] .dt-search label { color: var(--ink-2) !important; }
html[data-theme="light"] .td-count,
html[data-theme="light"] .ot-table tfoot .total-count { color: #1f6b52; }
