/* styles.css */

/* Base */
:root {
    --vl-blue: #003a8c;
    --vl-text: #1f2a37;
    --vl-muted: #6b7280;
    --vl-border: #e6edf5;
    --vl-row-alt: #eef7fb;
    --vl-bg: #ffffff;
    --vl-input-border: #c7c7c7;
}

a {
    color: #003884;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-header {
    background: var(--vl-blue);
    height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--vl-bg);
    color: var(--vl-text);
    line-height: 1.6;
}

.page-wrapper {
    display:flex;
    gap: 10px;
    align-items: center;
}

/* Layout width similar to site content */
.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 48px;
}

/* Make sections look like plain page blocks (no card/shadow) */
header {
    background: transparent;
    padding: 0 0 18px;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 14px;
}

.header h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 8px;
    color: var(--vl-blue);
    font-weight: 800;
}

.stats {
    color: var(--vl-muted);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.controls {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 22px 0 18px;
}

/* Inputs: larger, rounded, light grey border like screenshot */
.search-wrapper,
.search-section {
    display: flex;
    gap: 16px;
    flex: 1;
    min-width: 300px;
}

#searchInput {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--vl-input-border);
    border-radius: 8px;
    font-size: 18px;
    background: #fff;
    margin-top:10px;
}

#searchInput:focus {
    outline: none;
    border-color: var(--vl-input-border);
    box-shadow: none;
}

#columnFilter {
    padding: 12px 14px;
    border: 2px solid var(--vl-input-border);
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 180px;
}

.search-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--vl-text);
    cursor: pointer;
    white-space: nowrap;
}

.search-all-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons: keep simple */
.navigation {
    justify-items: flex-end;
    align-items: flex-end;
    flex-wrap: wrap;
    flex-direction: column;
    gap:10px;
    display: flex;
    margin-bottom:10px;
}

.navigation button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: var(--vl-blue);
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.navigation button:hover:not(:disabled) {
    filter: brightness(0.95);
}

.navigation button:disabled {
    background: #b9c6dc;
    cursor: not-allowed;
}

#chunkInput {
    width: 60px;
    padding: 10px 12px;
    border: 2px solid var(--vl-input-border);
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
}

.chunk-info {
    color: var(--vl-muted);
    font-size: 14px;
    margin-left: 0;
}

/* Table: flat white area with subtle border like screenshot */
.table-container {
    background: white;
    border-radius: 0;
    box-shadow: none;
    overflow: auto;
    max-height: calc(100vh - 260px);
    border: 1px solid var(--vl-border);
}

/* Keep table wide and airy */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

/* Header shown (not sticky/dark) */
thead {
    position: static;
    top: auto;
    background: #ffffff;
    color: var(--vl-blue);
    z-index: auto;
}

th {
    padding: 16px 18px;
    text-align: left;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-bottom: 1px solid var(--vl-border);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 14px;
}

td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--vl-border);
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #374151;
}

/* Zebra rows light blue */
tbody tr:nth-child(even) {
    background-color: var(--vl-row-alt);
}

tbody tr:hover {
    background-color: #e7f3f9;
}

.loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: var(--vl-muted);
    display: none;
}

.loading.show {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

footer {
    color:#485664;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding-top:20px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px 16px 36px;
    }

    .header h1 {
        font-size: 24px;
    }

    .controls {
        margin: 16px 0 14px;
    }

    .search-section {
        flex-direction: column;
    }

    /* Mobile: center everything + pagination above stats */
    .navigation {
        align-items: flex-end;
        text-align: center;
    }

    .stats {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 10px;
    }

    /* Move pager above other stats content */
    #paginationNav.page-wrapper {
        order: -1;
        justify-content: center;
        width: 100%;
    }

    .page-wrapper {
        justify-content: center;
        flex-wrap: wrap;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 12px 14px;
    }
}

.page-header nav {
    max-width: 1100px;
    margin:0 auto;
    width:100%;
}

@media (max-width: 959px) {
    .logo-desktop {
        display:none;
    }

    .logo-mobile {
        display: block;
        width: 197px;
        height: 73px;
        position: relative;
        top:19px;
        left:50%;
        transform: translateX(-50%);
    }
}

@media (min-width: 960px) {
    .logo-mobile {
        display: none;
    }

    .logo-desktop {
        height: 60px;
        width: 171px;
        position: relative;
        top:19px;
    }
}
