﻿/* ===================================================================
   DataTables Custom Theme — FK Question Review System
   Matches: Tailwind slate palette + teal accent + rounded design
   =================================================================== */

/* ---------- Wrapper ---------- */
.dt-container {
    font-family: inherit;
    font-size: 0.75rem;
    color: #334155;
}

/* ---------- Layout structure ---------- */
.dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.875rem 1.25rem 0.625rem;
}

.dt-layout-start, .dt-layout-end {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Search Input ---------- */
.dt-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dt-search label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.dt-search input {
    padding: 0.4rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #f8fafc;
    font-size: 0.72rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-width: 200px;
    font-family: inherit;
}

.dt-search input:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12);
    background: #fff;
}

/* ---------- Length Menu ---------- */
.dt-length {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.dt-length label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.dt-length select {
    padding: 0.4rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #f8fafc;
    font-size: 0.72rem;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: inherit;
}

.dt-length select:focus {
    border-color: #14b8a6;
}

/* ---------- Table header ---------- */
.dt-container table.dataTable thead th {
    background: #f8fafc;
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.dt-container table.dataTable thead th:hover {
    background: #f1f5f9;
    color: #334155;
}

.dt-container table.dataTable thead th.dt-ordering-asc:after {
    content: ' \2191';
    color: #0d9488;
    font-size: 0.7rem;
}

.dt-container table.dataTable thead th.dt-ordering-desc:after {
    content: ' \2193';
    color: #0d9488;
    font-size: 0.7rem;
}

/* ---------- Table body ---------- */
.dt-container table.dataTable tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.1s;
}

.dt-container table.dataTable tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.85) !important;
}

.dt-container table.dataTable tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.dt-container table.dataTable.display tbody tr:nth-child(odd) {
    background-color: transparent;
}

/* ---------- Info text ---------- */
.dt-info {
    font-size: 0.68rem;
    color: #94a3b8;
    padding: 0.5rem 1.25rem 0.625rem;
}

/* ---------- Pagination ---------- */
.dt-paging {
    padding: 0.5rem 1.25rem 0.625rem;
    display: flex;
    justify-content: flex-end;
}

.dt-paging .dt-paging-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.875rem;
    height: 1.875rem;
    padding: 0 0.4rem;
    margin: 0 0.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    font-family: inherit;
}

.dt-paging .dt-paging-button:hover:not(.disabled) {
    background: #f1f5f9;
    color: #0d9488;
    border-color: #99f6e4;
}

.dt-paging .dt-paging-button.current,
.dt-paging .dt-paging-button.current:hover {
    background: #0d9488;
    border-color: #0d9488;
    color: #fff;
    font-weight: 800;
}

.dt-paging .dt-paging-button.disabled,
.dt-paging .dt-paging-button.disabled:hover {
    color: #cbd5e1;
    cursor: default;
    pointer-events: none;
    background: #f8fafc;
}

/* ---------- No data message ---------- */
.dt-container table.dataTable tbody td.dataTables_empty {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
    font-size: 0.8rem;
}

/* ---------- Filter bar (custom dropdowns above table) ---------- */
.dt-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.dt-filter-bar label {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.dt-filter-bar select {
    padding: 0.35rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    font-size: 0.7rem;
    color: #1e293b;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    font-family: inherit;
}

.dt-filter-bar select:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

.dt-filter-bar .dt-filter-reset {
    padding: 0.35rem 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    font-size: 0.62rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: inherit;
}

.dt-filter-bar .dt-filter-reset:hover {
    background: #e2e8f0;
    color: #1e293b;
}

/* ---------- Layout footer ---------- */
.dt-layout-row.dt-layout-footer {
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
    border-radius: 0 0 1rem 1rem;
}

/* Scroll body */
.dt-scroll-body { overflow-x: auto; }

/* Remove default DataTables border/outline */
table.dataTable { border-collapse: collapse !important; width: 100% !important; }
table.dataTable thead th, table.dataTable tbody td { border: none !important; }
