/**
 * Frontend Styles for TL2 Document Library
 * Optimized for Truong Tieu Hoc Tu Liem 2 (Flatsome Standard Theme)
 * Container Max Width: 1370px
 */

:root {
    --tl2-primary: #044485;
    --tl2-primary-hover: #09519a;
    --tl2-primary-light: #eaf3fc;
    --tl2-secondary: #09519a;
    --tl2-accent: #ff7400;
    --tl2-accent-hover: #e06500;
    --tl2-accent-light: #fff5eb;
    --tl2-green: #2c8e47;
    --tl2-green-light: #eaf6ee;
    --tl2-red: #d50000;
    --tl2-red-light: #fde8e8;
    --tl2-dark: #004183;
    --tl2-heading: #0a0a0a;
    --tl2-gray-bg: #f8fbfe;
    --tl2-border: #e2e8f0;
    --tl2-border-focus: #044485;
    --tl2-text: #263f55;
    --tl2-text-muted: #5c5c5c;
    --tl2-radius: 12px;
    --tl2-radius-sm: 8px;
    --tl2-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --tl2-shadow-hover: 0 8px 30px rgba(4, 68, 133, 0.12);
}

/* Base Wrapper */
.tl2-doc-library-wrapper,
.tl2-single-document-page {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--tl2-text);
    width: 100%;
}

.page-wrapper.tl2-single-document-page,
.page-wrapper.tl2-archive-van-ban {
    padding-top: 25px;
    padding-bottom: 45px;
}

/* Breadcrumbs */
.tl2-breadcrumb {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 22px;
    padding: 10px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tl2-breadcrumb a {
    color: var(--tl2-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.tl2-breadcrumb a:hover {
    color: var(--tl2-accent);
    text-decoration: underline;
}

.tl2-breadcrumb .divider {
    color: #cbd5e1;
}

.tl2-breadcrumb .current {
    color: #475569;
    font-weight: 600;
}

/* Header for Archive & Shortcode */
.tl2-doc-header {
    margin-bottom: 24px;
    text-align: center;
}

.tl2-doc-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--tl2-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.tl2-doc-desc {
    font-size: 16px;
    color: var(--tl2-text-muted);
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   2-COLUMN LAYOUT (Sidebar Left, Content Right)
   ========================================================================== */
.tl2-doc-layout-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 28px;
    align-items: start;
}

.tl2-doc-sidebar-col {
    position: sticky;
    top: 90px;
    z-index: 10;
}

.tl2-doc-main-col {
    min-width: 0; /* Prevents table overflow from breaking grid */
}

/* Sidebar Title Header */
.tl2-filter-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--tl2-primary-light);
}

.tl2-filter-sidebar-title .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: var(--tl2-primary);
}

.tl2-filter-sidebar-title h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--tl2-dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

/* ==========================================================================
   FILTER CARD (Sidebar Filter Form)
   ========================================================================== */
.tl2-filter-card {
    background: #ffffff;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius);
    padding: 22px 20px;
    box-shadow: var(--tl2-shadow);
    margin-bottom: 0;
    border-top: 4px solid var(--tl2-primary);
}

.tl2-filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.tl2-field-search {
    grid-column: 1 / -1;
}

.tl2-filter-field label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--tl2-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tl2-input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.tl2-search-icon {
    position: absolute;
    left: 14px;
    color: var(--tl2-primary);
    pointer-events: none;
    font-size: 18px;
}

.tl2-filter-field input,
.tl2-filter-field select {
    width: 100%;
    height: 42px;
    border: 1.5px solid var(--tl2-border);
    border-radius: var(--tl2-radius-sm);
    padding: 0 14px;
    font-size: 14px;
    background: #fff;
    color: var(--tl2-text);
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.tl2-input-with-icon input {
    padding-left: 42px;
}

.tl2-filter-field input:focus,
.tl2-filter-field select:focus {
    border-color: var(--tl2-primary);
    outline: none;
    box-shadow: 0 0 0 3.5px rgba(4, 68, 133, 0.12);
}

.tl2-filter-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.tl2-btn-filter,
.tl2-btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    width: 100%;
    border-radius: var(--tl2-radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 13.5px;
    padding: 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-sizing: border-box;
}

.tl2-btn-filter {
    background-color: var(--tl2-primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(4, 68, 133, 0.25);
}

.tl2-btn-filter:hover {
    background-color: var(--tl2-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(4, 68, 133, 0.35);
}

.tl2-btn-reset {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    text-decoration: none;
}

.tl2-btn-reset:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

/* Results Info Bar */
.tl2-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--tl2-primary-light);
    border-radius: var(--tl2-radius-sm);
    border-left: 4px solid var(--tl2-primary);
    color: var(--tl2-dark);
    font-size: 14px;
}

/* ==========================================================================
   DOCUMENT TABLE (Desktop View)
   ========================================================================== */
.tl2-table-responsive {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border-radius: var(--tl2-radius);
    box-shadow: var(--tl2-shadow);
    border: 1px solid var(--tl2-border);
    margin-bottom: 25px;
}

.tl2-doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.tl2-doc-table thead tr {
    background: linear-gradient(180deg, #044485 0%, #03366c 100%);
    color: #ffffff;
}

.tl2-doc-table th {
    padding: 14px 16px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
    border: none;
    font-size: 13.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #ffffff;
}

.tl2-doc-table th.tl2-th-stt {
    width: 50px;
    text-align: center;
}

.tl2-doc-table th.tl2-th-number {
    width: 130px;
}

.tl2-doc-table th.tl2-th-date {
    width: 110px;
    text-align: center;
}

.tl2-doc-table th.tl2-th-action {
    width: 140px;
    text-align: center;
}

.tl2-doc-table tbody tr {
    border-bottom: 1px solid #edf2f7;
    transition: background-color 0.2s ease;
}

.tl2-doc-table tbody tr:nth-child(even) {
    background-color: #fafcff;
}

.tl2-doc-table tbody tr:hover {
    background-color: #f0f7ff;
}

.tl2-doc-table td {
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--tl2-text);
}

.tl2-td-stt {
    text-align: center;
    font-weight: 600;
    color: #64748b;
}

.tl2-doc-link-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--tl2-dark);
    text-decoration: none;
    display: inline-block;
    line-height: 1.45;
    transition: color 0.2s;
}

.tl2-doc-link-title:hover {
    color: var(--tl2-accent);
}

.tl2-doc-short-excerpt {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0 0;
    line-height: 1.4;
}

.tl2-td-date {
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

/* Badges */
.tl2-number-badge {
    display: inline-block;
    background: var(--tl2-primary-light);
    color: var(--tl2-primary);
    border: 1px solid rgba(4, 68, 133, 0.2);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12.5px;
    white-space: nowrap;
}

.tl2-number-badge.is-large {
    font-size: 14px;
    padding: 6px 14px;
    background: var(--tl2-primary);
    color: #ffffff;
    border: none;
}

.tl2-badge-type {
    display: inline-block;
    background: var(--tl2-accent-light);
    color: #c95d00;
    border: 1px solid #ffd8a8;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
}

.tl2-badge-type.is-large {
    font-size: 13px;
    padding: 6px 14px;
    background: var(--tl2-accent);
    color: #ffffff;
    border: none;
}

.tl2-badge-field {
    display: inline-block;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
}

/* Status Pills */
.tl2-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
}

.tl2-status-valid {
    background: var(--tl2-green-light);
    color: var(--tl2-green);
    border: 1px solid #a3e635;
}

.tl2-status-expired {
    background: var(--tl2-red-light);
    color: var(--tl2-red);
    border: 1px solid #fca5a5;
}

.tl2-status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

/* Table Actions */
.tl2-btn-group {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.tl2-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tl2-view-btn {
    background-color: var(--tl2-primary-light);
    color: var(--tl2-primary);
    border: 1px solid rgba(4, 68, 133, 0.25);
}

.tl2-view-btn:hover {
    background-color: var(--tl2-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.tl2-download-btn {
    background-color: var(--tl2-green-light);
    color: var(--tl2-green);
    border: 1px solid rgba(44, 142, 71, 0.3);
}

.tl2-download-btn:hover {
    background-color: var(--tl2-green);
    color: #ffffff;
    transform: translateY(-1px);
}

/* ==========================================================================
   MOBILE CARD LIST VIEW
   ========================================================================== */
.tl2-mobile-view {
    display: none;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 25px;
}

.tl2-doc-card-item {
    background: #ffffff;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius);
    padding: 18px;
    box-shadow: var(--tl2-shadow);
    border-left: 4px solid var(--tl2-primary);
}

.tl2-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.tl2-card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.tl2-card-title a {
    color: var(--tl2-dark);
    text-decoration: none;
}

.tl2-card-excerpt {
    font-size: 13.5px;
    color: var(--tl2-text-muted);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.tl2-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 12.5px;
    color: var(--tl2-text-muted);
    padding: 10px 0;
    border-top: 1px dashed var(--tl2-border);
    border-bottom: 1px dashed var(--tl2-border);
    margin-bottom: 12px;
}

.tl2-card-actions {
    display: flex;
    gap: 8px;
}

.tl2-card-actions .tl2-action-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
}

/* Pagination */
.tl2-pagination {
    margin-top: 30px;
    text-align: center;
}

.tl2-pagination ul.page-numbers {
    display: inline-flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.tl2-pagination .page-numbers li a,
.tl2-pagination .page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius-sm);
    color: var(--tl2-text);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    background: #ffffff;
    transition: all 0.2s;
}

.tl2-pagination .page-numbers li a:hover {
    background: var(--tl2-primary-light);
    color: var(--tl2-primary);
    border-color: var(--tl2-primary);
}

.tl2-pagination .page-numbers li span.current {
    background: var(--tl2-primary);
    color: #ffffff;
    border-color: var(--tl2-primary);
}

/* ==========================================================================
   SINGLE DOCUMENT PAGE (Standard 1370px Width Layout)
   ========================================================================== */
.page-wrapper.tl2-single-document-page,
.tl2-single-document-page {
    width: 100%;
    max-width: 100%;
    background-color: var(--tl2-gray-bg, #f8fbfe);
    padding-top: 25px;
    padding-bottom: 50px;
}

.tl2-single-document-page .row.row-main,
.tl2-single-document-page .row {
    max-width: 1370px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

.tl2-single-document-page .large-12.col {
    max-width: 100% !important;
    flex-basis: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

.tl2-single-document-page .col-inner {
    width: 100% !important;
}

.tl2-single-doc-container {
    width: 100% !important;
    max-width: 1370px !important;
    margin: 0 auto !important;
}

/* Single Hero Card */
.tl2-single-hero-card {
    background: #ffffff;
    border: 1px solid var(--tl2-border, #e2e8f0);
    border-left: 6px solid var(--tl2-primary, #044485);
    border-radius: 15px;
    padding: 28px 32px;
    box-shadow: 0 10px 24px rgba(0, 54, 105, 0.08);
    margin-bottom: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl2-single-hero-card:hover {
    box-shadow: 0 12px 28px rgba(0, 54, 105, 0.12);
}

.tl2-single-badges {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tl2-single-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--tl2-dark, #004183);
    line-height: 1.35;
    margin: 0 0 18px 0;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

.tl2-single-quickmeta {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
    font-size: 14.5px;
    color: #475569;
}

.tl2-single-quickmeta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tl2-single-quickmeta i,
.tl2-single-quickmeta span.dashicons {
    color: var(--tl2-primary, #044485);
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Single Cards */
.tl2-single-card {
    background: #ffffff;
    border: 1px solid var(--tl2-border, #e2e8f0);
    border-radius: 15px;
    padding: 28px 32px;
    margin-bottom: 25px;
    box-shadow: 0 10px 24px rgba(0, 54, 105, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl2-single-card:hover {
    box-shadow: 0 12px 28px rgba(0, 54, 105, 0.12);
}

.tl2-card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px solid var(--tl2-primary-light);
    padding-bottom: 14px;
    margin-bottom: 22px;
}

.tl2-card-heading {
    margin: 0;
    font-size: 19px;
    font-weight: 800;
    color: var(--tl2-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tl2-card-heading span.dashicons {
    color: var(--tl2-primary);
    font-size: 22px;
    width: 22px;
    height: 22px;
}

.tl2-btn-quick-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--tl2-green-light);
    color: var(--tl2-green);
    border: 1px solid #86efac;
    border-radius: var(--tl2-radius-sm);
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.tl2-btn-quick-download:hover {
    background: var(--tl2-green);
    color: #ffffff;
}

/* Metadata Attribute Table */
.tl2-meta-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.tl2-attribute-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14.5px;
}

.tl2-attribute-table tr {
    border-bottom: 1px solid #edf2f7;
}

.tl2-attribute-table tr:last-child {
    border-bottom: none;
}

.tl2-attribute-table th.tl2-attr-label {
    width: 20%;
    background: #f8fbfe;
    color: #475569;
    font-weight: 600;
    padding: 12px 16px;
    vertical-align: middle;
    border-right: 1px solid #edf2f7;
    white-space: nowrap;
}

.tl2-attribute-table th.tl2-attr-label span.dashicons {
    color: var(--tl2-primary);
    font-size: 16px;
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 4px;
}

.tl2-attribute-table td.tl2-attr-value {
    width: 30%;
    color: #0f172a;
    font-weight: 500;
    padding: 12px 18px;
    vertical-align: middle;
}

.tl2-highlight-number {
    color: var(--tl2-primary);
    font-size: 16px;
}

/* Excerpt Box */
.tl2-single-excerpt-box {
    margin-top: 22px;
    background: #f8fbfe;
    border-left: 4px solid var(--tl2-accent);
    padding: 18px 22px;
    border-radius: 0 var(--tl2-radius-sm) var(--tl2-radius-sm) 0;
}

.tl2-excerpt-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--tl2-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tl2-excerpt-title span.dashicons {
    color: var(--tl2-accent);
}

.tl2-single-excerpt-box p {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.65;
    color: #334155;
}

/* File Actions Bar & PDF Frame */
.tl2-file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
    padding: 18px 20px;
    background: #f8fbfe;
    border-radius: var(--tl2-radius-sm);
    border: 1px solid var(--tl2-border);
}

.tl2-file-name-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tl2-file-icon-box {
    width: 50px;
    height: 50px;
    background: var(--tl2-primary-light);
    color: var(--tl2-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tl2-file-icon-box.ext-pdf {
    background: #fee2e2;
    color: #dc2626;
}

.tl2-file-icon-box span.dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.tl2-file-title {
    margin: 0 0 4px 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--tl2-dark);
}

.tl2-file-submeta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #64748b;
}

.tl2-file-badge {
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11.5px;
}

.tl2-file-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tl2-btn-view-fullscreen {
    background-color: var(--tl2-primary) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 0 18px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(4, 68, 133, 0.2) !important;
}

.tl2-btn-view-fullscreen:hover {
    background-color: var(--tl2-primary-hover) !important;
    transform: translateY(-2px);
}

.tl2-btn-download-main {
    background-color: var(--tl2-accent) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    padding: 0 20px !important;
    height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 4px 12px rgba(255, 116, 0, 0.25) !important;
}

.tl2-btn-download-main:hover {
    background-color: var(--tl2-accent-hover) !important;
    transform: translateY(-2px);
}

/* PDF Viewer Wrapper */
.tl2-pdf-viewer-wrapper {
    background: #ffffff;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius);
    overflow: hidden;
    box-shadow: var(--tl2-shadow);
}

.tl2-viewer-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 18px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--tl2-border);
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}

.tl2-viewer-topbar i {
    color: var(--tl2-primary);
    margin-right: 4px;
}

.tl2-viewer-newtab-link {
    color: var(--tl2-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tl2-viewer-newtab-link:hover {
    text-decoration: underline;
}

.tl2-pdf-viewer-wrapper iframe {
    width: 100%;
    min-height: 820px;
    border: none;
    display: block;
}

.tl2-non-pdf-notice {
    text-align: center;
    padding: 35px 20px;
    background: #f8fbfe;
    border: 1px dashed var(--tl2-border);
    border-radius: var(--tl2-radius-sm);
}

.tl2-non-pdf-notice span.dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: var(--tl2-primary);
    margin-bottom: 8px;
}

/* Extra Files / Attachments */
.tl2-extra-files-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tl2-extra-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #f8fbfe;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius-sm);
    gap: 14px;
    flex-wrap: wrap;
    transition: all 0.2s;
}

.tl2-extra-file-item:hover {
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.tl2-extra-file-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tl2-extra-icon {
    font-size: 24px;
    color: var(--tl2-primary);
}

.tl2-extra-title {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--tl2-dark);
}

.tl2-extra-ext {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 8px;
}

.tl2-extra-actions {
    display: flex;
    gap: 8px;
}

/* Related Documents Grid */
.tl2-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.tl2-related-item {
    background: #f8fbfe;
    border: 1px solid var(--tl2-border);
    border-radius: var(--tl2-radius-sm);
    padding: 16px;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tl2-related-item:hover {
    background: #ffffff;
    border-color: var(--tl2-primary);
    transform: translateY(-2px);
    box-shadow: var(--tl2-shadow);
}

.tl2-rel-badge {
    align-self: flex-start;
    background: var(--tl2-primary-light);
    color: var(--tl2-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.tl2-rel-title {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.tl2-rel-title a {
    color: var(--tl2-dark);
    text-decoration: none;
}

.tl2-rel-title a:hover {
    color: var(--tl2-accent);
}

.tl2-rel-date {
    font-size: 12.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Bottom Nav */
.tl2-single-bottom-nav {
    margin-top: 15px;
    text-align: center;
}

.tl2-btn-back {
    background-color: var(--tl2-primary) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 0 24px !important;
    height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 700 !important;
}

.tl2-btn-back:hover {
    background-color: var(--tl2-primary-hover) !important;
}

/* Empty State */
.tl2-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border: 1px dashed var(--tl2-border);
    border-radius: var(--tl2-radius);
}

.tl2-empty-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #94a3b8;
    margin-bottom: 14px;
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (Flatsome Alignment)
   ========================================================================== */
@media screen and (max-width: 991px) {
    .tl2-doc-layout-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tl2-doc-sidebar-col {
        position: static;
    }

    .tl2-filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .tl2-filter-actions {
        flex-direction: row;
        justify-content: flex-end;
    }

    .tl2-btn-filter,
    .tl2-btn-reset {
        width: auto;
    }
}

@media screen and (max-width: 849px) {
    .tl2-desktop-view {
        display: none;
    }
    .tl2-mobile-view {
        display: flex;
    }
    .tl2-filter-card {
        padding: 18px;
    }
    .tl2-single-hero-card {
        padding: 20px 18px;
    }
    .tl2-single-title {
        font-size: 22px;
    }
    .tl2-single-card {
        padding: 20px 18px;
    }
    .tl2-attribute-table th.tl2-attr-label,
    .tl2-attribute-table td.tl2-attr-value {
        display: block;
        width: 100% !important;
        border-right: none;
    }
    .tl2-attribute-table th.tl2-attr-label {
        padding-top: 10px;
        padding-bottom: 4px;
        background: transparent;
        color: #64748b;
        font-size: 13px;
    }
    .tl2-attribute-table td.tl2-attr-value {
        padding-top: 2px;
        padding-bottom: 12px;
        font-size: 14px;
        border-bottom: 1px dotted #e2e8f0;
    }
    .tl2-file-info-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .tl2-file-buttons {
        width: 100%;
    }
    .tl2-file-buttons a {
        flex: 1;
        justify-content: center;
    }
    .tl2-pdf-viewer-wrapper iframe {
        min-height: 550px;
    }
}

@media screen and (max-width: 549px) {
    .tl2-doc-title {
        font-size: 22px;
    }
    .tl2-single-title {
        font-size: 20px;
    }
    .tl2-card-meta {
        grid-template-columns: 1fr;
    }
    .tl2-single-quickmeta {
        flex-direction: column;
        gap: 8px;
    }
    .tl2-btn-filter,
    .tl2-btn-reset {
        flex: 1;
        justify-content: center;
    }
    .tl2-pdf-viewer-wrapper iframe {
        min-height: 450px;
    }
}
