/* Lankytinos vietos — front-end styles. Matches Elementor loop #3040 + kit #14.
   Author: Tobalt — https://tobalt.lt */

.tp-archive,
.tp-archive--tax,
.tp-single,
.tp-tax-header {
	--tp-teal: #1C9E93;
	--tp-teal-dark: #166660;
	--tp-card-bg: #F2F8F9;
	--tp-text: #1D1D1D;
	font-family: "Inter", sans-serif;
}

/* ---- Archive layout: filter bar on top, grid below ---- */
.tp-archive {
	max-width: 1200px;
	margin: 40px auto;
	padding: 0 20px;
}

/* Horizontal filter bar — facets flow inline; divider + spacing separate it from the grid */
.tp-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 26px;
	margin: 0 0 30px;
	padding: 0 0 22px;
	border: 0;
	border-bottom: 1px solid rgba(22, 102, 96, .15);
}
.tp-filter__legend {
	font-weight: 700;
	font-size: 12.5px;
	color: var(--tp-text);
	margin-right: 4px;
}
.tp-filter__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.tp-chip {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	border-radius: 100px;
	background: var(--tp-card-bg);
	color: var(--tp-text);
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.tp-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.tp-chip:hover { border-color: var(--tp-teal); }
.tp-chip:focus-within { outline: 2px solid var(--tp-teal-dark); outline-offset: 2px; }
.tp-chip__n {
	margin-left: 5px;
	padding: 1px 6px;
	border-radius: 100px;
	background: rgba(22, 102, 96, .12);
	font-size: 11px;
	color: var(--tp-teal-dark);
}
.tp-chip--on { background: var(--tp-teal-dark); color: #fff; border-color: var(--tp-teal-dark); }
.tp-chip--on .tp-chip__n { background: rgba(255, 255, 255, .25); color: #fff; }
.tp-filter__go { margin-left: 8px; padding: 8px 18px; border: 0; border-radius: 100px; background: var(--tp-teal-dark); color: #fff; font-weight: 600; cursor: pointer; }

.tp-card--hide { display: none; }

/* ---- Card grid (matches /atrask/keliones-laivais/ design) ---- */
.tp-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px 24px;
}
.tp-card { position: relative; }
.tp-card__link { display: block; text-decoration: none; color: inherit; }

/* Photo with a notched top-right corner */
.tp-card__media {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: 18px;
	overflow: hidden;
	background: #e6eef0;
}
.tp-card__media img { position: absolute; inset: 0; width: 100%; height: 100% !important; object-fit: cover; display: block; transition: transform .4s ease; }
.tp-card:hover .tp-card__media img { transform: scale(1.05); }
.tp-card--noimg .tp-card__media { background: linear-gradient(135deg, #d7e7e9, #b9d6d3); }

/* Accessibility badge (places tagged in zmonems-su-negalia) */
.tp-card__access {
	position: absolute;
	top: 12px; left: 12px;
	z-index: 3;
	width: 34px; height: 34px;
	border-radius: 50%;
	background: #fff;
	color: var(--tp-teal-dark);
	display: grid; place-items: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.tp-card__access .tp-ico { width: 18px; height: 18px; }

/* Floating title panel overlapping the photo bottom */
.tp-card__panel {
	position: relative;
	margin: -52px 12px 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 14px 14px 18px;
	background: rgba(242, 248, 249, .92);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	border-radius: 16px;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
	transition: background .25s ease;
}
.tp-card:hover .tp-card__panel { background: rgba(28, 158, 147, .94); }
.tp-card__title {
	flex: 1;
	margin: 0;
	/* !important defeats the theme's global content-heading size (renders h2 at 50px) */
	font-size: 17px !important;
	line-height: 1.3 !important;
	font-weight: 600;
	color: var(--tp-text);
	transition: color .25s ease;
}
.tp-card:hover .tp-card__title { color: #fff; }
.tp-card__arrow {
	flex: 0 0 auto;
	width: 46px; height: 46px;
	border-radius: 50%;
	background: var(--tp-teal-dark);
	color: #fff;
	display: grid; place-items: center;
	transition: background .25s ease, transform .25s ease;
}
.tp-card__arrow .tp-ico { width: 20px; height: 20px; }
.tp-card:hover .tp-card__arrow { background: #fff; color: var(--tp-teal-dark); transform: translateX(3px); }

.tp-empty { grid-column: 1 / -1; padding: 40px 0; color: #666; }

/* ---- Pagination ---- */
.tp-pagination { margin: 40px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tp-pagination .page-numbers {
	display: inline-flex;
	min-width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	padding: 0 12px;
	border: 0;
	border-radius: 10px;
	background: var(--tp-card-bg);
	color: var(--tp-teal-dark);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	font-family: inherit;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.tp-pagination button.page-numbers:hover { background: rgba(22, 102, 96, .15); }
.tp-pagination .current { background: var(--tp-teal-dark); color: #fff; cursor: default; }

/* ---- Taxonomy header ---- */
.tp-tax-header h1 {
	/* !important defeats the theme's oversized global h1 (renders ~75px otherwise) */
	font-size: 30px !important;
	line-height: 1.2 !important;
	font-weight: 700;
	color: var(--tp-text);
	margin: 40px auto 24px;
	max-width: 1200px;
	padding: 0 20px;
}

/* ---- Single place: content left, meta sidebar right ---- */
.tp-single { max-width: 1140px; margin: 40px auto; padding: 0 20px; color: var(--tp-text); }
/* !important defeats the theme's oversized global heading styles */
.tp-single__header h1 { font-size: 30px !important; line-height: 1.2 !important; font-weight: 700; margin: 0 0 26px; }
.tp-single__grid { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.tp-single__grid--nometa { grid-template-columns: 1fr; }
/* Featured image floats left; content text wraps around it; click opens lightbox */
.tp-single__img { float: left; width: 42%; max-width: 380px; margin: 4px 30px 16px 0; }
.tp-single__imgbtn {
	display: block; width: 100%; margin: 0;
	padding: 0 !important; border: 0 !important; background: none !important;
	-webkit-appearance: none; appearance: none;
	cursor: zoom-in; position: relative; line-height: 0;
	border-radius: 20px; overflow: hidden;
	box-shadow: 0 8px 22px rgba(0, 0, 0, .10);
}
.tp-single__imgbtn img { width: 100%; height: auto; display: block; transition: transform .4s ease; }
.tp-single__imgbtn:hover img, .tp-single__imgbtn:focus-visible img { transform: scale(1.04); }
.tp-single__zoom {
	position: absolute; right: 12px; bottom: 12px;
	width: 36px; height: 36px; border-radius: 50%;
	background: rgba(22, 102, 96, .9); color: #fff;
	display: grid; place-items: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
	transition: background .2s ease, transform .2s ease;
}
.tp-single__imgbtn:hover .tp-single__zoom { background: var(--tp-teal-dark); transform: scale(1.08); }
.tp-single__zoom .tp-ico { width: 18px; height: 18px; }

/* Modern, consistent content typography */
.tp-single__content, .tp-single__extra { font-size: 16px; line-height: 1.8; color: #3a4042; }
.tp-single__content p, .tp-single__extra p { margin: 0 0 18px; }
.tp-single__content p:last-child, .tp-single__extra p:last-child { margin-bottom: 0; }
.tp-single__content h2, .tp-single__content h3, .tp-single__content h4 {
	font-size: 21px !important;
	line-height: 1.3 !important;
	font-weight: 700;
	color: var(--tp-text);
	margin: 30px 0 12px;
}
.tp-single__content a { color: var(--tp-teal); }
.tp-single__content ul, .tp-single__content ol { margin: 0 0 18px; padding-left: 22px; }
.tp-single__content li { margin: 0 0 6px; }
.tp-single__content img { border-radius: 14px; height: auto; }
.tp-single__extra { margin-top: 24px; }

/* Meta sidebar — visible icons, padded & divided rows, consistent fonts */
.tp-single__meta {
	background: var(--tp-card-bg);
	border-radius: 18px;
	padding: 8px 24px;
	position: sticky;
	top: 24px;
}
.tp-meta-row {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 18px 0;
	border-bottom: 1px solid rgba(22, 102, 96, .12);
}
.tp-meta-row:last-child { border-bottom: 0; }
.tp-meta-ico {
	flex: 0 0 auto;
	width: 42px; height: 42px;
	border-radius: 50%;
	background: #fff;
	color: var(--tp-teal-dark);
	display: grid; place-items: center;
	box-shadow: 0 1px 5px rgba(22, 102, 96, .18);
}
.tp-meta-ico .tp-ico { width: 18px; height: 18px; }
.tp-meta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tp-meta-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tp-teal-dark); }
/* Regular text and links share ONE size/weight/colour (!important beats the theme's global link
   styling, which otherwise renders these links at 18px/600). Links only gain an underline on hover. */
.tp-meta-val, .tp-meta-val a { font-size: 15px !important; font-weight: 500 !important; line-height: 1.5; color: var(--tp-text) !important; word-break: break-word; }
.tp-meta-val a { text-decoration: none; }
.tp-meta-val a:hover, .tp-meta-val a:focus { text-decoration: underline; }
.tp-single__related { margin-top: 44px; }
/* "Susiję objektai" heading: smaller than the page title (scoped to this CPT) */
.tp-single__related .tobalt-related__heading {
	font-size: 22px !important;
	line-height: 1.2 !important;
	font-weight: 700;
	margin: 0 0 18px;
}

/* ---- Actions row: share + vote, one compact line of small circular icons ---- */
.tp-actions {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid rgba(22, 102, 96, .12);
}
.tp-act-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--tp-teal-dark); margin: 0 0 10px; }
.tp-act-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tp-act-btn {
	/* !important geometry beats the theme's global <button> sizing */
	width: 32px !important; height: 32px !important; min-width: 0 !important;
	flex: 0 0 auto;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #fff;
	/* !important beats the theme's global button/link colour (which forces #1D1D1D) */
	color: var(--tp-teal-dark) !important;
	display: grid; place-items: center;
	cursor: pointer;
	text-decoration: none;
	-webkit-appearance: none; appearance: none;
	box-shadow: 0 1px 5px rgba(22, 102, 96, .18);
	transition: background .2s ease, color .2s ease, transform .15s ease;
}
.tp-act-btn .tp-ico { width: 16px; height: 16px; }
/* icon turns white on hover/focus/active — !important so the white wins over the theme override */
.tp-act-btn:hover, .tp-act-btn:focus-visible { background: var(--tp-teal-dark) !important; color: #fff !important; }
.tp-act-btn:active { transform: scale(.9); }
.tp-act-btn.tp-vote--on { background: var(--tp-teal-dark) !important; color: #fff !important; }
.tp-act-sep { width: 1px; height: 22px; background: rgba(22, 102, 96, .2); margin: 0 4px; }
.tp-share__done { font-size: 12px; font-weight: 600; color: var(--tp-teal-dark); margin-left: 2px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.tp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
	.tp-single__grid { grid-template-columns: 1fr; gap: 28px; }
	.tp-single__meta { position: static; }
}
@media (max-width: 560px) {
	.tp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	.tp-single__header h1 { font-size: 24px !important; }
	.tp-filter__legend { width: 100%; }
}

/* Corner flags (stacked top-left) */
.tp-card__flags { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; flex-direction: column; gap: 6px; }
.tp-card__flag { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--tp-teal-dark, #166660); display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.tp-card__flag .tp-ico { width: 18px; height: 18px; }
/* Facet bar: each facet on its own row of chips */
/* Each facet flows inline in the bar; no bottom margins (they skewed vertical centering). */
.tp-facet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; margin: 0; }
.tp-facet:last-child { margin: 0; }
/* flex/width !important: the dropdown facet's <label> gets theme label styling (block/full-width)
   which would push the <select> onto the next line — keep it inline and auto-width. */
.tp-facet__label { flex: 0 0 auto; width: auto !important; display: inline-flex; align-items: center; font-weight: 700 !important; font-size: 12px !important; text-transform: uppercase; letter-spacing: .04em; color: var(--tp-teal-dark, #166660) !important; margin: 0 2px 0 0 !important; }
.tp-facet__chips { display: flex; flex-wrap: wrap; gap: 7px; }

/* Corner value badge (icon + text, e.g. seating capacity) — icon + text inline, evenly padded */
/* Data chips: white pill, teal icon + teal value — consistent with the white circular category icons. */
.tp-card__flag--badge {
	width: auto; min-width: 34px; height: 34px;
	border-radius: 100px !important;
	padding: 0 14px 0 11px; gap: 7px;
	background: #fff;
	color: var(--tp-teal-dark, #166660);
	/* NOTE: do NOT use `place-items` here — it is shorthand for align-items and would reset the
	   vertical centering back to stretch (icon jumps to the top). Set align-items explicitly. */
	display: inline-flex !important; flex-direction: row;
	align-items: center !important; justify-content: flex-start;
}
.tp-card__flag--badge .tp-ico { width: 18px !important; height: 18px !important; flex: 0 0 auto; display: block; }
.tp-card__flagtxt {
	font-size: 13px; font-weight: 700; line-height: 1;
	color: var(--tp-teal-dark, #166660); white-space: nowrap;
}

/* Dropdown facet — keep label + select on one line and don't let the outer flex shrink it */
.tp-facet--dropdown { gap: 8px; flex-wrap: nowrap; flex: 0 0 auto; }
.tp-facet--dropdown .tp-facet__select { flex: 0 1 auto; max-width: 230px; }
.tp-facet__select {
	-webkit-appearance: none; appearance: none;
	border: 1px solid rgba(22, 102, 96, .25);
	background-color: #fff;
	color: var(--tp-text, #1D1D1D);
	font-family: inherit; font-size: 12.5px; font-weight: 600;
	padding: 6px 30px 6px 13px;
	border-radius: 100px;
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23166660' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
.tp-facet__select:hover { border-color: var(--tp-teal, #1C9E93); }
/* Replace the theme's harsh global focus outline (4px blue) with a subtle on-brand ring — still a
   visible focus indicator (WCAG ok) but not the jarring box that appeared on mouse click. */
.tp-facet__select:focus,
.tp-facet__select:focus-visible {
	outline: none !important;
	border-color: var(--tp-teal, #1C9E93) !important;
	box-shadow: 0 0 0 3px rgba(28, 158, 147, .22) !important;
}
@media (max-width: 600px) {
	.tp-facet--dropdown { width: 100%; }
	.tp-facet__select { width: 100%; }
}

/* Force line/stroke rendering — the theme has a global svg{fill} that overrides the inline fill="none". */
.tp-ico { fill: none !important; stroke: currentColor !important; }

/* ---- Tooltips: corner flags (grid) + action buttons (single) ---- */
.tp-tip { position: relative; }
.tp-tip::after {
	content: attr(data-tip);
	position: absolute;
	z-index: 30;
	background: var(--tp-teal-dark, #166660);
	color: #fff;
	font-family: "Inter", sans-serif;
	font-size: 12px; font-weight: 600; line-height: 1.2;
	padding: 6px 9px; border-radius: 8px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
	transition: opacity .15s ease, transform .15s ease;
	/* default: centered above (action buttons) */
	left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(3px);
}
.tp-tip:hover::after, .tp-tip:focus-visible::after { opacity: 1; transform: translateX(-50%); }
/* right variant: left-edge corner flags — tip sits to the right so it never clips off-card */
.tp-tip--right::after { left: calc(100% + 8px); bottom: auto; top: 50%; transform: translateY(-50%) translateX(-3px); }
.tp-tip--right:hover::after, .tp-tip--right:focus-visible::after { opacity: 1; transform: translateY(-50%); }

/* ---- Image lightbox ---- */
.tp-lb {
	position: fixed; inset: 0; z-index: 9999;
	display: none; align-items: center; justify-content: center;
	background: rgba(10, 20, 20, .92); padding: 24px;
}
.tp-lb--on { display: flex; }
.tp-lb__img { max-width: 95vw; max-height: 90vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.tp-lb__close {
	position: absolute; top: 18px; right: 22px;
	width: 44px !important; height: 44px !important; min-width: 0 !important;
	padding: 0 !important; border: 0 !important; border-radius: 50% !important;
	background: rgba(255, 255, 255, .14); color: #fff;
	font-size: 28px; line-height: 1; cursor: pointer;
	display: grid; place-items: center;
	-webkit-appearance: none; appearance: none;
}
.tp-lb__close:hover { background: rgba(255, 255, 255, .28); }

/* Single image: unfloat on small screens */
@media (max-width: 600px) {
	.tp-single__img { float: none; width: 100%; max-width: none; margin: 0 0 22px; }
}
