/* LT Vizualizatorius v1.3 — skandinaviškas šviesus stilius.
   Visi selektoriai su #ltv-modal prefiksu + pilni resetai, kad temos
   button/input stiliai (Elementor ir kt.) nepersvertų. */

#ltv-modal {
	--l-bg: #f5f3ef;
	--l-surface: #ffffff;
	--l-ink: #26231f;
	--l-mute: #8b857b;
	--l-line: rgba(38, 35, 31, 0.12);
	--l-oak: #ae8c5b;

	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(245, 243, 239, 0.94);
	-webkit-backdrop-filter: blur(22px) saturate(110%);
	backdrop-filter: blur(22px) saturate(110%);
	color: var(--l-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	user-select: none;
	-webkit-user-select: none;
	animation: ltv-fade 0.28s ease;
}

#ltv-modal[hidden],
#ltv-modal [hidden] { display: none !important; }

@keyframes ltv-fade { from { opacity: 0; } }

/* Resetai — nugali temų button/input/select stilius */
#ltv-modal button,
#ltv-modal input,
#ltv-modal select {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	cursor: pointer;
}

#ltv-modal .ltv-shell {
	display: flex;
	flex-direction: column;
	height: 100%;
	height: 100dvh;
	animation: ltv-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes ltv-rise { from { transform: translateY(12px); opacity: 0; } }

/* ------------------------------ Antraštė ------------------------------ */

#ltv-modal .ltv-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 28px 14px;
}

#ltv-modal .ltv-id { min-width: 0; }

#ltv-modal .ltv-eyebrow {
	display: block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--l-oak);
	margin-bottom: 3px;
}

#ltv-modal .ltv-artname {
	font-size: 15.5px;
	font-weight: 650;
	letter-spacing: -0.005em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#ltv-modal .ltv-artname em {
	font-style: normal;
	font-weight: 400;
	color: var(--l-mute);
	font-variant-numeric: tabular-nums;
}

#ltv-modal .ltv-hbtn {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	background: var(--l-surface);
	border: 1px solid var(--l-line);
	border-radius: 50%;
	color: var(--l-ink);
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#ltv-modal .ltv-hbtn:hover {
	background: var(--l-ink);
	border-color: var(--l-ink);
	color: #fff;
}

#ltv-modal .ltv-x:hover { transform: rotate(90deg); }
#ltv-modal .ltv-helpbtn { margin-left: auto; font-weight: 700; font-size: 15px; }
#ltv-modal .ltv-hbtn:focus-visible { outline: 2px solid var(--l-oak); outline-offset: 2px; }

/* ---------------------- Fonų segmentinis valdiklis ---------------------- */

#ltv-modal .ltv-tabs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding: 0 28px 16px;
}

#ltv-modal .ltv-seg {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	padding: 4px;
	background: rgba(38, 35, 31, 0.06);
	border-radius: 999px;
}

#ltv-modal .ltv-tab {
	padding: 9px 18px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--l-mute);
	transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	white-space: nowrap;
}

#ltv-modal .ltv-tab:hover { color: var(--l-ink); }

#ltv-modal .ltv-tab.is-active {
	background: var(--l-surface);
	color: var(--l-ink);
	box-shadow: 0 1px 2px rgba(38, 35, 31, 0.08), 0 4px 10px -2px rgba(38, 35, 31, 0.12);
}

#ltv-modal .ltv-tab:focus-visible { outline: 2px solid var(--l-oak); outline-offset: 1px; }

#ltv-modal .ltv-tab svg { vertical-align: -2px; margin-right: 6px; }

#ltv-modal .ltv-privacy {
	margin-left: auto;
	font-size: 11.5px;
	color: var(--l-mute);
}

/* ------------------------------- Scena ------------------------------- */

#ltv-modal .ltv-stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 28px 22px;
}

#ltv-modal .ltv-wrap {
	position: relative;
	display: inline-block; /* dydis — natūraliai iš nuotraukos */
	max-width: 100%;
	max-height: 100%;
	line-height: 0;
}

#ltv-modal .ltv-bg {
	display: block;
	max-width: 100%;
	max-height: calc(100dvh - 228px);
	width: auto;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(38, 35, 31, 0.06), 0 28px 70px -24px rgba(38, 35, 31, 0.3);
}

/* Paveikslas */

#ltv-modal .ltv-art {
	position: absolute;
	cursor: grab;
	touch-action: none;
	opacity: 0;
	transform: scale(0.965);
	transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#ltv-modal .ltv-art.is-in { opacity: 1; transform: scale(1); }
#ltv-modal .ltv-art.is-drag { cursor: grabbing; }
#ltv-modal .ltv-art.is-drag .ltv-plaq { opacity: 0.3; }

#ltv-modal .ltv-art img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	-webkit-user-drag: none;
	border: 0;
	border-radius: 0;
	outline: none;
	/* Tik realistiškas šešėlis — jokių rėmelių ar kraštinių */
	box-shadow:
		0 10px 22px -10px rgba(30, 27, 22, 0.4),
		0 34px 64px -28px rgba(30, 27, 22, 0.42);
}

/* Placard — muziejinė etiketė, šviesi */

#ltv-modal .ltv-plaq {
	position: absolute;
	left: 50%;
	top: calc(100% + 14px);
	transform: translateX(-50%);
	max-width: 230px;
	padding: 8px 16px 9px;
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid var(--l-line);
	border-top: 2px solid var(--l-oak);
	border-radius: 4px;
	box-shadow: 0 8px 22px -8px rgba(38, 35, 31, 0.28);
	text-align: center;
	pointer-events: none;
	white-space: nowrap;
	line-height: 1.45;
	transition: opacity 0.2s ease;
}

#ltv-modal .ltv-plaq-title {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--l-ink);
	overflow: hidden;
	text-overflow: ellipsis;
}

#ltv-modal .ltv-plaq-dims {
	display: block;
	font-size: 10.5px;
	letter-spacing: 0.08em;
	color: var(--l-mute);
	font-variant-numeric: tabular-nums;
}

/* Siluetas */

#ltv-modal .ltv-person { position: absolute; cursor: grab; touch-action: none; }
#ltv-modal .ltv-person.is-drag { cursor: grabbing; }
#ltv-modal .ltv-person svg { display: block; pointer-events: none; }

/* --------------------------- Kalibravimas --------------------------- */

#ltv-modal .ltv-calib {
	position: absolute;
	inset: 0;
	pointer-events: none;
	touch-action: none;
}

#ltv-modal .ltv-calib-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

#ltv-modal .ltv-lhit {
	stroke: transparent;
	stroke-width: 30;
	stroke-linecap: round;
	pointer-events: stroke;
	cursor: move;
}

#ltv-modal .ltv-lvis {
	stroke: #fff;
	stroke-width: 3;
	stroke-dasharray: 3 8;
	stroke-linecap: round;
	pointer-events: none;
	filter: drop-shadow(0 1px 2px rgba(30, 27, 22, 0.6));
}

/* Rankenos — HTML divai, ryškūs, dedami procentais */
#ltv-modal .ltv-h {
	position: absolute;
	width: 30px;
	height: 30px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--l-oak);
	box-shadow: 0 3px 10px rgba(30, 27, 22, 0.45), 0 0 0 6px rgba(174, 140, 91, 0.14);
	pointer-events: auto;
	cursor: grab;
	touch-action: none;
	transition: box-shadow 0.15s ease, transform 0.05s ease;
}

#ltv-modal .ltv-h::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--l-oak);
}

#ltv-modal .ltv-h:hover { box-shadow: 0 4px 14px rgba(30, 27, 22, 0.5), 0 0 0 9px rgba(174, 140, 91, 0.2); }
#ltv-modal .ltv-h:active { cursor: grabbing; }
#ltv-modal .ltv-h:focus-visible { outline: 2px solid var(--l-ink); outline-offset: 4px; }

#ltv-modal .ltv-calib-panel {
	position: absolute;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px 12px;
	max-width: min(580px, 94%);
	padding: 18px 22px;
	background: var(--l-surface);
	border: 1px solid var(--l-line);
	border-radius: 16px;
	box-shadow: 0 24px 60px -16px rgba(38, 35, 31, 0.35);
}

#ltv-modal .ltv-calib-panel p {
	margin: 0;
	width: 100%;
	text-align: center;
	font-size: 13.5px;
	color: var(--l-ink);
}

#ltv-modal .ltv-calib-panel select,
#ltv-modal .ltv-calib-panel input {
	padding: 10px 14px;
	border: 1.5px solid var(--l-line);
	border-radius: 10px;
	background: var(--l-surface);
	color: var(--l-ink);
	font-size: 13.5px;
	cursor: pointer;
}

#ltv-modal .ltv-calib-panel select:focus-visible,
#ltv-modal .ltv-calib-panel input:focus-visible {
	outline: none;
	border-color: var(--l-oak);
	box-shadow: 0 0 0 3px rgba(174, 140, 91, 0.18);
}

#ltv-modal .ltv-custom-cm { width: 78px; font-variant-numeric: tabular-nums; }

/* ------------------------------ Apačia ------------------------------ */

#ltv-modal .ltv-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 26px;
	padding: 14px 28px 20px;
	border-top: 1px solid var(--l-line);
	background: rgba(255, 255, 255, 0.5);
}

#ltv-modal .ltv-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 500;
	color: var(--l-mute);
	cursor: pointer;
	transition: color 0.2s ease;
}

#ltv-modal .ltv-switch:hover { color: var(--l-ink); }
#ltv-modal .ltv-switch input { position: absolute; opacity: 0; width: 0; height: 0; }

#ltv-modal .ltv-track {
	position: relative;
	flex: 0 0 auto;
	width: 36px;
	height: 21px;
	border-radius: 999px;
	background: rgba(38, 35, 31, 0.16);
	transition: background 0.25s ease;
}

#ltv-modal .ltv-track::after {
	content: "";
	position: absolute;
	top: 2.5px;
	left: 2.5px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(38, 35, 31, 0.3);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

#ltv-modal .ltv-switch input:checked + .ltv-track { background: var(--l-oak); }
#ltv-modal .ltv-switch input:checked + .ltv-track::after { transform: translateX(15px); }
#ltv-modal .ltv-switch input:focus-visible + .ltv-track { outline: 2px solid var(--l-oak); outline-offset: 2px; }

#ltv-modal .ltv-btn {
	padding: 11px 20px;
	background: var(--l-surface);
	border: 1.5px solid var(--l-line);
	border-radius: 11px;
	color: var(--l-ink);
	font-size: 13px;
	font-weight: 600;
	transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

#ltv-modal .ltv-btn:hover { border-color: rgba(38, 35, 31, 0.35); }
#ltv-modal .ltv-btn:focus-visible { outline: 2px solid var(--l-oak); outline-offset: 2px; }

#ltv-modal .ltv-btn-primary {
	margin-left: auto;
	padding: 13px 26px;
	background: var(--l-ink);
	border-color: var(--l-ink);
	color: #fff;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-radius: 12px;
}

#ltv-modal .ltv-btn-primary:hover {
	background: #000;
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -8px rgba(38, 35, 31, 0.45);
}

#ltv-modal .ltv-hint { font-size: 12px; color: var(--l-mute); }

/* --------------------------- Pagalbos kortelė --------------------------- */

#ltv-modal .ltv-help {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: grid;
	place-items: center;
	background: rgba(245, 243, 239, 0.7);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	animation: ltv-fade 0.2s ease;
}

#ltv-modal .ltv-help-card {
	width: min(440px, calc(100% - 48px));
	padding: 28px 30px 26px;
	background: var(--l-surface);
	border: 1px solid var(--l-line);
	border-radius: 20px;
	box-shadow: 0 30px 80px -20px rgba(38, 35, 31, 0.35);
}

#ltv-modal .ltv-help-card h3 {
	margin: 0 0 18px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

#ltv-modal .ltv-help-step {
	display: flex;
	gap: 14px;
	margin: 0 0 14px;
	font-size: 13.5px;
	color: var(--l-ink);
}

#ltv-modal .ltv-help-step b {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--l-oak);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	margin-top: 1px;
}

#ltv-modal .ltv-help-step span { color: var(--l-mute); }
#ltv-modal .ltv-help-step span strong { color: var(--l-ink); font-weight: 600; }

#ltv-modal .ltv-help-close {
	margin-top: 8px;
	width: 100%;
	padding: 12px;
	background: var(--l-ink);
	border-radius: 11px;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	transition: background 0.2s ease;
}

#ltv-modal .ltv-help-close:hover { background: #000; }

@media (max-width: 680px) {
	#ltv-modal .ltv-head { padding: 14px 16px 10px; }
	#ltv-modal .ltv-tabs { padding: 0 16px 12px; }
	#ltv-modal .ltv-tab { padding: 8px 14px; font-size: 12px; }
	#ltv-modal .ltv-privacy { display: none; }
	#ltv-modal .ltv-stage { padding: 6px 14px 16px; }
	#ltv-modal .ltv-bg { max-height: calc(100dvh - 262px); }
	#ltv-modal .ltv-foot { padding: 12px 16px 18px; gap: 10px 16px; }
	#ltv-modal .ltv-hint { display: none; }
	#ltv-modal .ltv-btn-primary { flex: 1 1 100%; margin-left: 0; }
	#ltv-modal .ltv-plaq { max-width: 170px; }
}

@media (prefers-reduced-motion: reduce) {
	#ltv-modal, #ltv-modal * { animation: none !important; transition: none !important; }
}

/* --------------------- Mygtukas produkto puslapyje --------------------- */

.ltv-open-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 16px 0 4px;
	padding: 13px 24px 12px;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 999px;
	font-family: inherit;
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	line-height: 1;
	color: inherit;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.ltv-open-btn svg { flex: 0 0 auto; transition: transform 0.25s ease; }

.ltv-open-btn:hover {
	background: #26231f;
	border-color: #26231f;
	color: #f5f3ef;
	transform: translateY(-1px);
}

.ltv-open-btn:hover svg { transform: scale(1.1); }
.ltv-open-btn:focus-visible { outline: 2px solid #ae8c5b; outline-offset: 3px; }

/* Kalibravimo užuomina ties linija */
#ltv-modal .ltv-calib-tip {
	position: absolute;
	transform: translate(-50%, -50%);
	padding: 6px 12px;
	background: var(--l-ink);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	white-space: nowrap;
	border-radius: 999px;
	box-shadow: 0 4px 12px rgba(30, 27, 22, 0.4);
	pointer-events: none;
	animation: ltv-tip 1.6s ease infinite;
}

@keyframes ltv-tip {
	0%, 100% { transform: translate(-50%, -50%) scale(1); }
	50% { transform: translate(-50%, -50%) scale(1.06); }
}
