/* ==========================================
   DOKUMENTAI PAGE STYLES
   ========================================== */

:root {
    --dok-navy: #2e4a7a;
    --dok-navy-dark: #223358;
    --dok-orange: #e8832a;
    --dok-white: #ffffff;
    --dok-light-gray: #f5f6f8;
    --dok-border: #dde1e7;
    --dok-text: #333333;
    --dok-text-light: #666666;
}

body.page-template-page-dokumentai,
body.page-template-page-dokumentai .wrapper,
body.page-template-page-dokumentai .wrapper_inner,
body.page-template-page-dokumentai .content,
body.page-template-page-dokumentai .content .content_inner,
body.page-template-page-dokumentai .content .container,
body.page-template-page-dokumentai .container,
body.page-template-page-dokumentai .container_inner,
body.page-template-page-dokumentai.transparent_content,
.transparent_content.page-template-page-dokumentai,
body.page-template-page-dokumentai .paspartu_inner,
body.page-template-page-dokumentai .paspartu_outer,
body.page-id-15492.transparent_content,
body.page-id-15492.transparent_content.overlapping_content .content .content_inner > .container,
body.page-id-15492.transparent_content.overlapping_content .content .content_inner > .full_width {
    background-color: var(--dok-white) !important;
    background-image: none !important;
    background: var(--dok-white) !important;
}

/* Hide content bottom area (blue section above footer) */
body.page-template-page-dokumentai .content_bottom {
    display: none !important;
}

.dokumentai-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 30px;
    background: var(--dok-light-gray);
    border-radius: 8px;
}

.dokumentai-page h1.dokumentai-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--dok-navy-dark);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Document Section --- */
.dok-section {
    margin-bottom: 30px;
    border: 1px solid var(--dok-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--dok-white);
}

.dok-section-header {
    background: var(--dok-navy);
    color: var(--dok-white);
    display: flex;
    align-items: center;
    padding: 0;
}

.dok-section-header .dok-header-title {
    font-size: 15px;
    font-weight: 700;
    padding: 14px 18px;
    margin: 0;
    color: var(--dok-white);
}

.dok-section-header .dok-header-date,
.dok-section-header .dok-header-size {
    display: none;
}

/* --- Document Row --- */
.dok-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--dok-border);
    transition: background 0.15s;
    background: var(--dok-white);
}

.dok-row:last-child {
    border-bottom: none;
}

.dok-row:hover {
    background: #eef1f5;
}

.dok-row-date,
.dok-row-size {
    display: none;
}

.dok-row-name {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--dok-text);
    min-height: 48px;
    flex: 1;
}

.dok-row-name .dok-icons {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.dok-row-name .dok-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--dok-navy);
    opacity: 0.6;
    transition: opacity 0.15s;
    text-decoration: none;
}

.dok-row-name .dok-icons a:hover {
    opacity: 1;
    color: var(--dok-orange);
}

.dok-row-name .dok-doc-title {
    line-height: 1.4;
}

.dok-row-name .dok-doc-title a {
    color: var(--dok-text);
    text-decoration: none;
    transition: color 0.15s;
}

.dok-row-name .dok-doc-title a:hover {
    color: var(--dok-orange);
    text-decoration: underline;
}

/* --- Subsection headers within a section --- */
.dok-subsection-header {
    background: var(--dok-light-gray);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dok-navy-dark);
    border-bottom: 1px solid var(--dok-border);
}

/* --- External links section --- */
.dok-external-links {
    padding: 15px 18px;
    border-bottom: 1px solid var(--dok-border);
}

.dok-external-links p {
    margin: 0 0 8px;
    font-size: 14px;
    color: var(--dok-text);
}

.dok-external-links a {
    color: var(--dok-navy);
    text-decoration: none;
    word-break: break-all;
}

.dok-external-links a:hover {
    color: var(--dok-orange);
    text-decoration: underline;
}

/* --- Collapsible toggle --- */
.dok-section-toggle {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.dok-section-toggle .dok-header-title::after {
    content: '\f107';
    font-family: 'FontAwesome';
    margin-left: 10px;
    font-weight: 400;
    transition: transform 0.2s;
    display: inline-block;
}

.dok-section-toggle.collapsed .dok-header-title::after {
    transform: rotate(-90deg);
}

.dok-section-body {
    max-height: 30000px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* Default collapsed — JS will remove this class for hash-targeted sections */
.dok-section-toggle + .dok-section-body {
    max-height: 0;
}

.dok-section-toggle:not(.collapsed) + .dok-section-body {
    max-height: 30000px;
}

.dok-section-toggle.collapsed + .dok-section-body {
    max-height: 0;
}

.dok-group-heading {
    background: var(--dok-light-gray);
    color: var(--dok-navy-dark, #223358);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
    padding: 12px 18px;
    border-bottom: 1px solid var(--dok-border, #dde1e7);
    border-top: 1px solid var(--dok-border, #dde1e7);
}

.dok-group-heading:first-child {
    border-top: none;
}

/* --- Content blocks (rich text within accordion) --- */
.dokumentai-page .dok-content-block {
    padding: 15px 18px;
    font-size: 14px;
    color: var(--dok-text, #333333);
    line-height: 1.6;
    border-bottom: 1px solid var(--dok-border, #dde1e7);
}

.dokumentai-page .dok-content-block:last-child {
    border-bottom: none;
}

.dokumentai-page .dok-content-block p {
    margin: 0 0 10px;
}

.dokumentai-page .dok-content-block p:last-child {
    margin-bottom: 0;
}

.dokumentai-page .dok-content-block ul,
.dokumentai-page .dok-content-block ol {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.dokumentai-page .dok-content-block li {
    margin-bottom: 4px;
}

.dokumentai-page .dok-content-block a {
    color: var(--dok-navy, #2e4a7a);
    text-decoration: none;
    transition: color 0.15s;
}

.dokumentai-page .dok-content-block a:hover {
    color: var(--dok-orange, #e8832a);
    text-decoration: underline;
}

.dokumentai-page .dok-content-block strong {
    color: var(--dok-navy-dark, #223358);
}

.dokumentai-page .dok-content-block hr {
    border: none;
    border-top: 1px solid var(--dok-border, #dde1e7);
    margin: 15px 0;
}

.dokumentai-page .dok-content-block h2 {
    color: var(--dok-navy-dark, #223358);
    margin: 16px 0 10px;
}

.dokumentai-page .dok-content-block h3,
.dokumentai-page .dok-content-block h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dok-navy-dark, #223358);
    margin: 12px 0 8px;
}

.dokumentai-page .dok-content-block h3:first-child,
.dokumentai-page .dok-content-block h5:first-child {
    margin-top: 0;
}

/* --- Contact tables (e.g. pagalbos telefonai / pagalba internetu) --- */
.dokumentai-page .dok-table-wrap {
    overflow-x: auto;
    margin: 8px 0 16px;
}

.dokumentai-page .dok-content-block table.dok-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.dokumentai-page .dok-content-block table.dok-table th {
    background: var(--dok-navy, #2e4a7a);
    color: var(--dok-white, #ffffff);
    text-align: left;
    padding: 10px 14px;
    font-weight: 700;
    white-space: nowrap;
}

.dokumentai-page .dok-content-block table.dok-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--dok-border, #dde1e7);
    vertical-align: top;
    text-align: left;
}

.dokumentai-page .dok-content-block table.dok-table tbody tr:nth-child(even) td {
    background: var(--dok-light-gray, #f5f6f8);
}

.dokumentai-page .dok-content-block table.dok-table td strong {
    display: block;
    margin-bottom: 3px;
}

.dokumentai-page .dok-content-block table.dok-table td.dok-table-subheader {
    background: var(--dok-navy, #2e4a7a) !important;
    color: var(--dok-white, #ffffff) !important;
    text-align: center;
    font-weight: 700;
    border-bottom: 1px solid var(--dok-border, #dde1e7);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .dokumentai-page {
        padding: 30px 10px 40px;
    }
    .dokumentai-page h1.dokumentai-title {
        font-size: 22px;
    }
    .dokumentai-page .dok-content-block table.dok-table th,
    .dokumentai-page .dok-content-block table.dok-table td {
        padding: 8px 10px;
        white-space: normal;
    }
}

/* ==========================================
   DOKUMENTAI – SEARCH TABLE (new layout)
   ========================================== */

/* ── Search bar ─────────────────────────────────────────────── */
.dok-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}
.dok-search-icon {
    position: absolute;
    left: 12px;
    color: var(--dok-text-light);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}
#dok-search {
    width: 100%;
    padding: 10px 36px 10px 36px;
    font-size: 14px;
    border: 1px solid var(--dok-border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--dok-white);
    color: var(--dok-text);
    box-sizing: border-box;
}
#dok-search:focus {
    border-color: var(--dok-navy);
    box-shadow: 0 0 0 2px rgba(46,74,122,0.12);
}
#dok-search-clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dok-text-light);
    font-size: 14px;
    line-height: 1;
    padding: 4px 6px;
    display: none;
    border-radius: 3px;
}
#dok-search-clear:hover {
    color: var(--dok-text);
    background: var(--dok-light-gray);
}

/* ── Category filter pills ───────────────────────────────────── */
.dok-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.dok-filter-btn {
    padding: 5px 13px;
    border: 1px solid var(--dok-border);
    background: var(--dok-white);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    color: var(--dok-text-light);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1.5;
}
.dok-filter-btn:hover {
    border-color: var(--dok-navy);
    color: var(--dok-navy);
}
.dok-filter-btn.active {
    background: var(--dok-navy);
    color: var(--dok-white);
    border-color: var(--dok-navy);
}
.dok-filter-count {
    font-size: 10px;
    opacity: 0.75;
}

/* ── Info note (Viešieji pirkimai links) ─────────────────────── */
.dok-info-note {
    background: var(--dok-light-gray);
    border-left: 3px solid var(--dok-navy);
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--dok-text);
    border-radius: 0 4px 4px 0;
    line-height: 1.7;
}
.dok-info-note a {
    color: var(--dok-navy);
    text-decoration: underline;
}

/* ── Documents flat table ────────────────────────────────────── */
.dok-docs-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dok-white);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    table-layout: fixed;
}
.dok-docs-table thead tr {
    background: var(--dok-navy);
}
.dok-docs-table thead th {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    text-align: left !important;
    letter-spacing: 0.03em;
    color: var(--dok-white) !important;
}
.dok-th-cat    { width: 185px; }
.dok-th-title  { }
.dok-th-actions { width: 64px; }

.dok-docs-table tbody tr {
    border-bottom: 1px solid var(--dok-border);
    transition: background 0.12s;
}
.dok-docs-table tbody tr:last-child {
    border-bottom: none;
}
.dok-docs-table tbody tr:nth-child(even) {
    background: var(--dok-light-gray);
}
.dok-docs-table tbody tr:hover,
.dok-docs-table tbody tr:nth-child(even):hover {
    background: #e8ecf3;
}
.dok-cat-cell {
    padding: 9px 14px !important;
    font-size: 11px;
    font-weight: 700;
    color: var(--dok-navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
    text-align: left !important;
    word-break: break-word;
}
.dok-title-cell {
    padding: 9px 14px !important;
    font-size: 13px;
    color: var(--dok-text);
    vertical-align: middle;
    text-align: left !important;
}
.dok-title-cell a {
    color: var(--dok-text);
    text-decoration: none;
    transition: color 0.15s;
}
.dok-title-cell a:hover {
    color: var(--dok-navy);
    text-decoration: underline;
}
.dok-actions-cell {
    padding: 6px 10px !important;
    text-align: right !important;
    vertical-align: middle;
    white-space: nowrap;
}
.dok-actions-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--dok-navy);
    opacity: 0.45;
    text-decoration: none;
    transition: opacity 0.15s;
    font-size: 14px;
}
.dok-actions-cell a:hover {
    opacity: 1;
}

/* ── No results / count ──────────────────────────────────────── */
.dok-no-results {
    text-align: center;
    color: var(--dok-text-light);
    padding: 30px 20px;
    font-size: 15px;
    margin: 0;
}
.dok-count {
    text-align: right;
    color: var(--dok-text-light);
    font-size: 12px;
    margin-top: 6px;
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .dok-th-cat { width: 110px; }
    .dok-cat-cell { font-size: 10px; }
    .dok-title-cell { font-size: 12px; }
}

@media (max-width: 480px) {
    .dok-row-name {
        padding: 10px 12px;
        font-size: 13px;
    }
}
