/* Tarybos dokumentai – three layouts from one markup: cards | list | timeline */
.td {
	--td-bg: #fff;
	--td-soft: #f3f5f8;
	--td-line: #e3e7ee;
	--td-text: #1b2433;
	--td-muted: #657085;
	--td-accent: #0b6ea8;
	--td-accent-soft: #e3f1fa;
	--td-ok: #0f7a4d;
	--td-ok-soft: #dcf5e8;
	--td-warn: #9a5b00;
	--td-warn-soft: #fff0d6;
	--td-radius: 14px;
	color: var(--td-text);
	font-size: 15px;
	line-height: 1.4;
	max-width: 1180px;
	margin: 0 auto;
}
.td *, .td *::before, .td *::after { box-sizing: border-box; }
.td-ico { flex: none; }
.td a { text-decoration: none; color: inherit; }

/* ---------- toolbar (mirrors the Employees directory toolbar) ---------- */
.td .td-bar {
	display: flex; flex-wrap: wrap; align-items: center; column-gap: .75rem; row-gap: .5rem;
	background: #fff; border: 1px solid #e7ebef; border-radius: 12px; box-shadow: 0 2px 8px rgb(20 36 50 / 4%);
	padding: .85rem; margin: 0 0 1rem;
}
.td .td-bar svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; width: 1rem; height: 1rem; flex: none; }
.td .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* search */
.td .td-search {
	display: flex; align-items: center; gap: .55rem; flex: 1 1 20rem; min-width: 12rem; min-height: 2.35rem;
	background: #f1f2f4; border: 1px solid transparent; border-radius: 9px; padding: 0 .75rem; margin: 0; color: #263b50;
	transition: box-shadow 150ms ease, background-color 150ms ease;
}
.td .td-search:focus-within { background: #f1f2f4; box-shadow: 0 0 0 2px rgb(22 113 197 / 18%); }
.td .td-bar .td-search input[type="search"],
.td .td-bar .td-search input[type="search"]:hover,
.td .td-bar .td-search input[type="search"]:focus,
.td .td-bar .td-search input[type="search"]:focus-visible {
	appearance: none !important; -webkit-appearance: none !important;
	background: transparent !important; background-image: none !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
	color: var(--td-text) !important; font: inherit !important; font-size: .8rem !important;
	height: 2.25rem !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; width: 100% !important; min-width: 0;
}
.td .td-search input::placeholder { color: #66717d; opacity: 1; }
.td .td-search input::-webkit-search-cancel-button { cursor: pointer; }

/* year dropdown */
.td .td-year {
	position: relative; display: flex; align-items: center; gap: .45rem; flex: 0 1 11rem; min-width: 8.5rem; min-height: 2.8rem;
	background: #f0f2f5; border-radius: 8px; padding: 0 .75rem; margin: 0; color: var(--td-text);
}
.td .td-year:focus-within { box-shadow: 0 0 0 2px rgb(22 113 197 / 20%); }
.td .td-year .td-year__chev { width: .85rem; height: .85rem; margin-left: auto; pointer-events: none; }
.td .td-bar .td-year select.td-year__select,
.td .td-bar .td-year select.td-year__select:hover,
.td .td-bar .td-year select.td-year__select:focus,
.td .td-bar .td-year select.td-year__select:focus-visible {
	appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important;
	background: transparent !important; background-image: none !important;
	border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: 0 !important;
	color: var(--td-text) !important; font: inherit !important; font-size: .85rem !important; font-weight: 600 !important; line-height: 1.4 !important;
	cursor: pointer; height: auto !important; min-height: 2.8rem !important; margin: 0 !important; padding: .65rem 1.4rem .65rem .1rem !important;
	width: 100% !important; min-width: 0 !important; position: absolute; inset: 0 0 0 2.1rem; width: calc(100% - 2.1rem) !important;
}

/* layout switch: segmented control, theme-proof */
.td .td-switch { display: flex; gap: .15rem; padding: .2rem; margin-left: auto; background: #f0f2f5; border-radius: 8px; }
.td .td-bar .td-switch button.td-switch__btn,
.td .td-bar .td-switch button.td-switch__btn:link,
.td .td-bar .td-switch button.td-switch__btn:visited {
	appearance: none !important; -webkit-appearance: none !important;
	display: inline-flex !important; align-items: center !important; justify-content: center !important;
	width: 2.25rem !important; height: 2.25rem !important; min-height: 0 !important; min-width: 0 !important;
	margin: 0 !important; padding: 0 !important;
	background: transparent !important; background-image: none !important;
	border: 0 !important; border-radius: 6px !important; box-shadow: none !important; outline-offset: 2px;
	color: #3e4b58 !important; -webkit-text-fill-color: currentColor !important;
	font: inherit !important; letter-spacing: normal !important; text-transform: none !important; text-shadow: none !important;
	line-height: 1 !important; cursor: pointer; transition: background-color 150ms ease, color 150ms ease;
}
.td .td-bar .td-switch button.td-switch__btn:hover,
.td .td-bar .td-switch button.td-switch__btn:focus,
.td .td-bar .td-switch button.td-switch__btn:active,
.td .td-bar .td-switch button.td-switch__btn.is-active {
	background: #fff !important; color: var(--td-accent) !important; box-shadow: none !important;
}
.td .td-bar .td-switch button.td-switch__btn:focus-visible { outline: 2px solid var(--td-accent) !important; }
.td .td-bar .td-switch button.td-switch__btn .td-ico { width: 1rem; height: 1rem; }

/* ---------- meeting ---------- */
.td-meetings { display: grid; gap: 16px; }
.td-m { background: var(--td-bg); border: 1px solid var(--td-line); border-radius: var(--td-radius); padding: 18px; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.td-m[hidden] { display: none; }
.td-m.is-upcoming { border-color: var(--td-accent); box-shadow: 0 0 0 3px var(--td-accent-soft); }
.td-m__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.td-date {
	flex: none; min-width: 66px; padding: 0 8px; height: 58px; border-radius: 12px; background: var(--td-accent); color: #fff;
	display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
}
.is-upcoming .td-date { background: var(--td-accent); }
.td-m:not(.is-upcoming) .td-date { background: var(--td-soft); color: var(--td-text); }
.td-date__d { font-size: 22px; font-weight: 800; }
.td-date__m { font-size: 11px; text-transform: none; margin-top: 4px; opacity: .9; white-space: nowrap; }
.td-m__title { flex: 1; min-width: 0; }
.td-m__title h3 { margin: 0 0 3px; font-size: 18px; line-height: 1.25; color: inherit; }
.td-m__title p { margin: 0; color: var(--td-muted); font-size: 13px; }
.td-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.td-badge--no { background: #e6e9fb; color: #2d3a8c; }
.td-badge--done { background: var(--td-ok-soft); color: var(--td-ok); padding: 4px 11px; }
.td-badge--soon { background: var(--td-warn-soft); color: var(--td-warn); padding: 4px 11px; }

/* ---------- document tiles ---------- */
.td-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.td-doc {
	display: flex; align-items: center; gap: 10px; height: 100%; padding: 12px; border-radius: 12px;
	background: var(--td-soft); border: 1px solid var(--td-line); color: var(--td-text); transition: transform .12s, box-shadow .12s, border-color .12s;
}
a.td-doc:hover { transform: translateY(-2px); border-color: var(--td-accent); box-shadow: 0 6px 16px rgba(11, 110, 168, .14); }
a.td-doc:focus-visible { outline: 3px solid var(--td-accent); outline-offset: 2px; }
.td-doc .td-ico:first-child { color: var(--td-accent); }
.td-doc__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.td-doc__txt strong { font-size: 14px; }
.td-doc__txt small { color: var(--td-muted); font-size: 12px; }
.td-doc > .td-ico:last-child:not(:first-child) { color: var(--td-muted); width: 16px; height: 16px; }
.td-doc--decisions { background: var(--td-accent-soft); border-color: #b9dcf1; }
.td-doc.is-empty { opacity: .55; background: transparent; border-style: dashed; }
.td-doc.is-empty .td-ico { color: var(--td-muted) !important; }

.td-colhead { display: none; }
.td-empty { text-align: center; color: var(--td-muted); padding: 30px 0; }

/* ---------- LAYOUT: list (compact register) ---------- */
.td[data-layout="list"] .td-meetings { gap: 0; border: 1px solid var(--td-line); border-radius: var(--td-radius); overflow: hidden; background: var(--td-bg); }
.td[data-layout="list"] .td-m { border: 0; border-radius: 0; box-shadow: none; padding: 10px 16px; border-top: 1px solid var(--td-line); display: grid; grid-template-columns: minmax(240px, 1.4fr) 4fr; gap: 12px; align-items: center; }
.td[data-layout="list"] .td-m:first-child { border-top: 0; }
.td[data-layout="list"] .td-m.is-upcoming { box-shadow: inset 4px 0 0 var(--td-accent); }
.td[data-layout="list"] .td-m__head { margin: 0; }
.td[data-layout="list"] .td-date { min-width: 62px; height: 46px; }
.td[data-layout="list"] .td-date__d { font-size: 18px; }
.td[data-layout="list"] .td-m__title h3 { font-size: 14px; }
.td[data-layout="list"] .td-m__head > .td-badge { display: none; }
.td[data-layout="list"] .td-docs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
.td[data-layout="list"] .td-doc { justify-content: center; padding: 8px; background: transparent; border-color: transparent; }
.td[data-layout="list"] a.td-doc { background: var(--td-accent-soft); }
.td[data-layout="list"] .td-doc__txt, .td[data-layout="list"] .td-doc > .td-ico:last-child:not(:first-child) { display: none; }
.td[data-layout="list"] .td-doc.is-empty { border: 0; }
.td[data-layout="list"] .td-doc.is-empty .td-ico { opacity: .35; }
.td[data-layout="list"] .td-colhead {
	display: grid; grid-template-columns: minmax(240px, 1.4fr) 4fr; gap: 12px; padding: 0 16px 8px; font-size: 11px; color: var(--td-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
}
.td[data-layout="list"] .td-colhead__cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; text-align: center; line-height: 1.2; }

/* ---------- LAYOUT: timeline ---------- */
.td[data-layout="timeline"] .td-meetings { position: relative; padding-left: 34px; gap: 22px; }
.td[data-layout="timeline"] .td-meetings::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--td-line); }
.td[data-layout="timeline"] .td-m { position: relative; border: 0; box-shadow: none; background: transparent; padding: 0; }
.td[data-layout="timeline"] .td-m::before {
	content: ""; position: absolute; left: -30px; top: 14px; width: 14px; height: 14px; border-radius: 50%;
	background: var(--td-bg); border: 3px solid var(--td-accent);
}
.td[data-layout="timeline"] .td-m:not(.is-upcoming)::before { border-color: var(--td-ok); }
.td[data-layout="timeline"] .td-m__head { margin-bottom: 8px; }
.td[data-layout="timeline"] .td-date { display: none; }
.td[data-layout="timeline"] .td-docs { display: flex; flex-wrap: wrap; gap: 8px; }
.td[data-layout="timeline"] .td-doc { height: auto; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--td-bg); gap: 7px; }
.td[data-layout="timeline"] .td-doc__txt small, .td[data-layout="timeline"] .td-doc > .td-ico:last-child:not(:first-child) { display: none; }
.td[data-layout="timeline"] .td-doc__txt strong { font-weight: 600; font-size: 13px; }
.td[data-layout="timeline"] .td-doc .td-ico { width: 16px; height: 16px; }
.td[data-layout="timeline"] .td-doc--decisions { background: var(--td-accent-soft); }

/* ---------- other documents ---------- */
.td-h2 { margin: 36px 0 14px; font-size: 20px; }
.td-res { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.td-res__card {
	display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--td-line); border-radius: 12px; background: var(--td-bg);
	transition: border-color .12s, box-shadow .12s;
}
.td-res__card:hover { border-color: var(--td-accent); box-shadow: 0 6px 16px rgba(11, 110, 168, .12); }
.td-res__card .td-ico { color: var(--td-accent); margin-top: 2px; }
.td-res__card strong { display: block; }
.td-res__card small { color: var(--td-muted); }

/* ---------- top box: base info + drafts button ---------- */
.td-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: stretch; margin: 0 0 16px; }
.td-info { background: var(--td-bg); border: 1px solid var(--td-line); border-radius: var(--td-radius); padding: 20px 22px; box-shadow: 0 2px 8px rgb(20 36 50 / 5%); }
.td .td-info__title { margin: 0 0 12px !important; font-size: 20px !important; line-height: 1.25 !important; font-weight: 700 !important; text-transform: none !important; color: var(--td-text) !important; }
.td-info__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.td-info__links li { margin: 0; padding: 0; }
.td-info__links a, .td-info__links .is-off { display: flex; align-items: flex-start; gap: 10px; }
.td-info__links .td-ico { color: var(--td-accent); margin-top: 2px; }
.td-info__links a:hover span { text-decoration: underline !important; }
.td .td-projects {
	display: flex; align-items: center; justify-content: center; gap: 10px; align-self: stretch; max-width: 280px; padding: 16px 22px;
	background: var(--td-accent); color: #fff !important; border-radius: var(--td-radius); font-weight: 700; font-size: 15px; line-height: 1.3;
	box-shadow: 0 4px 12px rgba(11, 110, 168, .25); transition: transform .12s, box-shadow .12s;
}
.td .td-projects:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(11, 110, 168, .32); }
.td .td-projects:focus-visible { outline: 3px solid var(--td-accent); outline-offset: 2px; }

.td-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 280px; }
.td .td-actions .td-projects { flex: 1 1 auto; max-width: none; }
.td .td-archive-btn {
	appearance: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px !important; margin: 0 !important; flex: 0 0 auto;
	background: var(--td-bg) !important; color: var(--td-accent) !important; border: 2px solid var(--td-accent) !important; border-radius: var(--td-radius) !important;
	font: inherit; font-weight: 700; font-size: 15px; text-transform: none !important; cursor: pointer; box-shadow: none !important; transition: background .12s, transform .12s;
}
.td .td-archive-btn:hover, .td .td-archive-btn:focus-visible { background: var(--td-accent-soft) !important; transform: translateY(-2px); }

/* ---------- archive popup ---------- */
.td dialog.td-arch { width: min(720px, calc(100vw - 24px)); max-height: min(85vh, 760px); padding: 0; border: 0; border-radius: 16px; background: var(--td-bg); color: var(--td-text); box-shadow: 0 24px 60px rgba(10, 20, 40, .35); overflow: hidden; }
.td dialog.td-arch[open] { display: flex; flex-direction: column; }
.td dialog.td-arch::backdrop { background: rgba(15, 25, 40, .55); }
.td-arch__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--td-line); }
.td .td-arch__head h2 { margin: 0 !important; font-size: 19px !important; font-weight: 700 !important; text-transform: none !important; color: var(--td-text) !important; }
.td .td-arch__close { appearance: none; width: 36px; height: 36px; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 8px !important; background: var(--td-soft) !important; color: var(--td-text) !important; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: none !important; }
.td-arch__bar { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--td-line); }
.td .td-arch__search, .td .td-arch__year { display: flex; align-items: center; gap: 8px; min-height: 2.6rem; background: #f0f2f5; border-radius: 9px; padding: 0 .75rem; margin: 0; }
.td .td-arch__search { flex: 1 1 14rem; }
.td .td-arch__year { flex: 0 1 11rem; }
.td-arch__bar .td-ico { width: 1rem; height: 1rem; }
.td .td-arch__bar input[type="search"], .td .td-arch__bar select {
	appearance: none !important; -webkit-appearance: none !important; background: transparent !important; border: 0 !important; box-shadow: none !important; outline: 0 !important;
	font: inherit !important; font-size: .9rem !important; color: var(--td-text) !important; margin: 0 !important; padding: .5rem 0 !important; width: 100% !important; min-height: 0 !important; height: auto !important;
}
.td .td-arch__bar select { font-weight: 600 !important; cursor: pointer; }
.td-arch__search:focus-within, .td-arch__year:focus-within { box-shadow: 0 0 0 2px rgb(22 113 197 / 25%); }
.td-arch__body { overflow-y: auto; padding: 6px 20px; flex: 1; min-height: 160px; }
.td-arch__item { display: flex; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--td-line); }
.td-arch__item:last-child { border-bottom: 0; }
.td-arch__date { flex: none; width: 7.5rem; color: var(--td-muted); font-size: 13px; }
.td-arch__date small { display: block; font-size: 12px; opacity: .8; }
.td .td-arch__item a { color: var(--td-accent); font-weight: 600; }
.td .td-arch__item a:hover { text-decoration: underline !important; }
.td-arch__msg { color: var(--td-muted); text-align: center; padding: 36px 0; margin: 0; }
.td-arch__foot { padding: 0 20px 14px; text-align: center; }
.td .td-arch__more { appearance: none; padding: 8px 18px !important; margin: 8px 0 0 !important; border: 1px solid var(--td-line) !important; border-radius: 8px !important; background: var(--td-soft) !important; color: var(--td-accent) !important; font: inherit; font-size: 13px !important; font-weight: 600; cursor: pointer; text-transform: none !important; box-shadow: none !important; }
@media (max-width: 520px) { .td-arch__item { flex-direction: column; gap: 2px; } .td-arch__date { width: auto; } }

/* ---------- sections: decisions (year chips), budget, committee, declarations ---------- */
.td-sec { background: var(--td-bg); border: 1px solid var(--td-line); border-radius: var(--td-radius); padding: 18px 20px; margin: 20px 0 0; box-shadow: 0 1px 2px rgba(20, 30, 50, .04); }
.td .td-sec__head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px !important; font-size: 17px !important; line-height: 1.3 !important; font-weight: 700 !important; text-transform: none !important; color: var(--td-text) !important; }
.td-sec__head .td-ico { color: var(--td-accent); width: 26px; height: 26px; }
.td-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.td-year-chip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--td-soft); border: 1px solid var(--td-line); font-weight: 600; transition: border-color .12s, background .12s, transform .12s; }
a.td-year-chip:hover { border-color: var(--td-accent); background: var(--td-accent-soft); transform: translateY(-1px); }
.td-year-chip .td-ico { width: 16px; height: 16px; color: var(--td-accent); }
.td-year-chip.is-current { background: var(--td-accent); border-color: var(--td-accent); color: #fff !important; }
.td-year-chip.is-current .td-ico { color: #fff; }
.td-year-chip.is-off, .td .is-off { color: var(--td-muted); }
.td-links { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.td-links li { margin: 0; }
.td-links a { color: var(--td-accent); }
.td-links a:hover { text-decoration: underline !important; }
.td-links:not(.is-open) .td-more { display: none; }
.td .td-morebtn {
	appearance: none; margin: 12px 0 0 !important; padding: 7px 14px !important; border: 1px solid var(--td-line) !important; border-radius: 8px !important;
	background: var(--td-soft) !important; color: var(--td-accent) !important; font: inherit; font-size: 13px !important; font-weight: 600; cursor: pointer; text-transform: none !important; box-shadow: none !important;
}
.td .td-morebtn:hover { border-color: var(--td-accent) !important; }

/* ---------- responsive ---------- */
@media (max-width: 760px) {
	.td-top { grid-template-columns: 1fr; }
	.td .td-projects, .td-actions { max-width: none; }
}
@media (max-width: 760px) {
	.td .td-search { flex-basis: 100%; }
	.td .td-year { flex: 1 1 auto; }
	.td-m__head { flex-wrap: wrap; }
	.td[data-layout="list"] .td-m { grid-template-columns: 1fr; }
	.td[data-layout="list"] .td-colhead { display: none; }
	.td[data-layout="list"] .td-docs { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- hide empty documents (cards + timeline; list keeps its fixed columns) ---------- */
.td .td-nodocs { display: none; margin: 0; color: var(--td-muted); font-size: 13px; }
.td[data-hide-empty="1"]:not([data-layout="list"]) .td-docs li.is-empty-li { display: none; }
.td[data-hide-empty="1"]:not([data-layout="list"]) .td-nodocs { display: block; }
.td[data-hide-empty="1"]:not([data-layout="list"]) .td-nodocs:not(:only-child) { margin-top: 0; }

/* ---------- theme-proofing: typography ---------- */
.td, .td * { text-align: left !important; text-justify: auto; hyphens: none !important; -webkit-hyphens: none !important; word-spacing: normal !important; letter-spacing: normal; }
.td .td-empty, .td .td-date { text-align: center !important; }
.td .td-colhead__cols, .td .td-colhead__cols span { text-align: center !important; }
.td .td-res__card span, .td .td-doc__txt { display: flex; flex-direction: column; }
.td h2.td-h2 { font-size: 20px !important; line-height: 1.25 !important; font-weight: 700 !important; margin: 36px 0 14px !important; color: var(--td-text) !important; text-transform: none !important; }
.td .td-m__title h3 { font-size: 18px !important; line-height: 1.25 !important; font-weight: 700 !important; margin: 0 0 3px !important; text-transform: none !important; }
.td .td-res__card strong, .td .td-doc__txt strong { font-size: 14px !important; font-weight: 700 !important; line-height: 1.3 !important; }
.td .td-res__card small, .td .td-doc__txt small { font-size: 12px !important; font-weight: 400 !important; line-height: 1.4 !important; }

.td .td-arch__msg, .td .td-arch__foot, .td .td-arch__close { text-align: center !important; }

.td .td-sec--decisions { margin: 0 0 16px; }

/* ---------- "Kiti tarybos dokumentai": cards copied from the Veiklos sritys directory widget ---------- */
.td-vdir { background: #f6f8fa; border-radius: 14px; padding: clamp(1rem, 2vw, 1.5rem); margin: 0 0 16px; }
.td-vdir__head { display: flex; align-items: center; margin: 0 0 1rem; }
.td .td-vdir__head h2 { display: flex; align-items: center; gap: .45rem; margin: 0 !important; font-size: 1.1rem !important; line-height: 1.3 !important; font-weight: 700 !important; text-transform: none !important; color: #1c2731 !important; }
.td-vdir__head .td-ico { color: #0073a5; }
.td-vdir__grid { display: grid; gap: 1rem; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.td .td-vcard {
	appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; width: 100%; min-height: 8.5rem; margin: 0 !important; padding: 1.2rem !important;
	background: #fff !important; border: 1px solid #e9edf0 !important; border-radius: 13px !important; box-shadow: 0 1px 3px rgb(20 36 50 / 3%) !important;
	color: #17212b !important; font: inherit; text-decoration: none !important; text-transform: none !important; cursor: pointer;
	transition: background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.td .td-vcard:hover, .td .td-vcard:focus-visible { background: #cfe6fa !important; box-shadow: 0 4px 12px rgb(20 36 50 / 12%) !important; transform: translateY(-2px); color: #17212b !important; }
.td .td-vcard:focus-visible { outline: 3px solid var(--td-accent); outline-offset: 2px; }
.td-vcard__icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 3rem; height: 3rem; border-radius: 9px; background: #f0f2f4; color: #12202c; }
.td-vcard:hover .td-vcard__icon { background: #00709f; color: #fff; }
.td-vcard__icon .td-ico { width: 1.5rem; height: 1.5rem; }
.td .td-vcard__title { font-size: 1.05rem !important; font-weight: 700 !important; line-height: 1.35 !important; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; }
.td .td-vcard__text { font-size: .85rem; line-height: 1.4; color: var(--td-muted); margin-top: -.5rem; }
@media (max-width: 1100px) { .td-vdir__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .td-vdir__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .td-vdir__grid { grid-template-columns: 1fr; } }
.td .td-pop__area { padding: 12px 20px; }
.td dialog.td-pop .td-links { padding-left: 20px; }

/* card text must wrap inside the card (buttons default to nowrap / shrink-to-fit) */
.td .td-vcard { align-items: stretch !important; white-space: normal !important; text-align: left !important; overflow: hidden; min-width: 0; }
.td .td-vcard__icon { align-self: flex-start; }
.td .td-vcard__title, .td .td-vcard__text { display: block; width: 100%; min-width: 0; max-width: 100%; white-space: normal !important; overflow-wrap: anywhere; word-break: normal; }
.td .td-vcard__title { display: -webkit-box; }

/* ---------- admin setting "Rodyti ikonas": card icons off -> cards shrink to fit their text ---------- */
.td-vdir[data-icons="0"] .td-vcard__icon { display: none !important; }
.td .td-vdir[data-icons="0"] .td-vcard { min-height: 0; gap: .4rem; }

/* ---------- VTEK button + popup inside the info box ---------- */
.td .td-info .td-info__btn { display: inline-flex; margin: 16px 0 0 !important; padding: 9px 18px !important; }
.td .td-pop__list li.td-pop__h { list-style: none; margin: 10px 0 0 -20px; font-weight: 700; color: var(--td-text); }

/* ---------- popup link rows (VTEK etc.): soft rows with an accent bar and arrow ---------- */
.td dialog.td-pop .td-pop__list { list-style: none; margin: 0; padding: 4px 0 8px; display: grid; gap: 8px; }
.td dialog.td-pop .td-pop__list li { margin: 0; padding: 0; }
.td dialog.td-pop a.td-pop__link {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px;
	background: var(--td-soft); border: 1px solid var(--td-line); border-left: 4px solid var(--td-accent); border-radius: 10px;
	color: var(--td-text) !important; font-weight: 600; line-height: 1.35; text-decoration: none !important;
	transition: background .12s, border-color .12s, transform .12s, box-shadow .12s;
}
.td dialog.td-pop a.td-pop__link .td-ico { width: 16px; height: 16px; color: var(--td-muted); transition: color .12s, transform .12s; }
.td dialog.td-pop a.td-pop__link:hover, .td dialog.td-pop a.td-pop__link:focus-visible {
	background: var(--td-accent-soft); border-color: #b9dcf1; border-left-color: var(--td-accent); color: var(--td-accent) !important;
	transform: translateX(2px); box-shadow: 0 4px 12px rgba(11, 110, 168, .12);
}
.td dialog.td-pop a.td-pop__link:hover .td-ico, .td dialog.td-pop a.td-pop__link:focus-visible .td-ico { color: var(--td-accent); transform: translate(2px, -2px); }
.td dialog.td-pop a.td-pop__link:focus-visible { outline: 3px solid var(--td-accent); outline-offset: 2px; }
.td dialog.td-pop .td-pop__list li.td-pop__h {
	margin: 14px 0 0; padding: 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--td-muted);
}
.td dialog.td-pop .td-pop__list li.td-pop__h:first-child { margin-top: 0; }
