/* JT Consent — banner, placeholders, floating button.
 * Design tokens come from --jtc-* (printed inline from the settings). Defaults match jacobtobies.de:
 * white cards with a navy top rule, 3px-radius buttons with a 3px border, Roboto. */
.jtc-hidden { display: none !important; }
.jtc-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.jtc, .jtc-ph, .jtc-float.jtc-float {
	--_bg: var(--jtc-bg, #fff);
	--_tx: var(--jtc-text, #444);
	--_hd: var(--jtc-heading, #01001f);
	--_pr: var(--jtc-primary, #01001f);
	--_pt: var(--jtc-primary-text, #fff);
	--_r: var(--jtc-radius, 6px);
	--_br: var(--jtc-btn-radius, 3px);
	--_line: color-mix(in srgb, var(--_hd) 13%, transparent);
	--_soft: color-mix(in srgb, var(--_hd) 4%, var(--_bg));
	--_shadow: 0 18px 50px color-mix(in srgb, var(--_hd) 14%, transparent), 0 2px 6px color-mix(in srgb, var(--_hd) 6%, transparent);
	font-family: var(--jtc-font, inherit);
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}
.jtc *, .jtc-ph * { box-sizing: border-box; }
.jtc[hidden], .jtc-float[hidden], .jtc__view[hidden] { display: none !important; }

/* ---------- Container & layouts ---------- */
.jtc { position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; display: flex; padding: 20px; }
.jtc__backdrop { display: none; }
.jtc__dialog {
	pointer-events: auto; position: relative;
	background: var(--_bg); color: var(--_tx);
	border-radius: var(--_r);
	border: 1px solid var(--_line);
	border-top: 4px solid var(--_pr);
	box-shadow: var(--_shadow);
	padding: 26px 28px 22px;
	max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow: auto;
	font-size: 15px; line-height: 1.6; outline: none;
	animation: jtc-in .28s cubic-bezier(.25, .8, .25, 1);
}
@keyframes jtc-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.jtc--box { align-items: flex-end; }
.jtc--box.jtc--bottom-right { justify-content: flex-end; }
.jtc--box.jtc--bottom-left { justify-content: flex-start; }
.jtc--box .jtc__dialog { width: 440px; max-width: 100%; }

.jtc--bar { align-items: flex-end; padding: 0; }
.jtc--bar .jtc__dialog { width: 100%; border-radius: 0; border-width: 4px 0 0; padding: 22px 24px; }
.jtc--bar .jtc__view--main { max-width: 1140px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 2px 40px; align-items: center; }
.jtc--bar .jtc__view--main > * { grid-column: 1; }
.jtc--bar .jtc__view--main .jtc__actions { grid-column: 2; grid-row: 1 / span 3; margin: 0; width: 360px; }
.jtc--bar .jtc__view--settings { max-width: 760px; margin: 0 auto; }

.jtc--modal { align-items: center; justify-content: center; pointer-events: auto; }
.jtc--modal .jtc__backdrop { display: block; position: absolute; inset: 0; background: color-mix(in srgb, var(--_hd) 55%, transparent); backdrop-filter: blur(2px); }
.jtc--modal .jtc__dialog { width: 580px; max-width: 100%; }
.jtc--modal.jtc--legal { align-items: flex-end; pointer-events: none; }
.jtc--modal.jtc--legal .jtc__backdrop { display: none; }

/* ---------- Typography ---------- */
.jtc__title { font-size: 20px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; color: var(--_hd); margin: 0 0 10px; }
.jtc__msg { margin: 0; }
.jtc a { color: var(--_hd); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.jtc a:hover { text-decoration-thickness: 2px; }
.jtc__legal { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--_line); font-size: 13px; color: color-mix(in srgb, var(--_tx) 85%, transparent); }
.jtc__legal a { font-weight: 400; color: inherit; }

/* ---------- Buttons (mirror the site's Elementor buttons) ---------- */
.jtc__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.jtc__actions .jtc-btn--ghost { grid-column: 1 / -1; }

:is(.jtc, .jtc-ph) .jtc-btn {
	appearance: none; cursor: pointer; margin: 0;
	font-family: var(--jtc-font, inherit); font-size: 15px; font-weight: 600; line-height: 1.2; font-style: normal; letter-spacing: normal; text-transform: none; text-align: center;
	padding: 12px 20px; min-height: 48px;
	border-radius: var(--_br); border: 3px solid var(--_pr);
	background: transparent; color: var(--_pr);
	transition: background-color .25s, color .25s, box-shadow .25s, transform .25s;
}
:is(.jtc, .jtc-ph) .jtc-btn--primary { background: var(--_pr); color: var(--_pt); }
:is(.jtc, .jtc-ph) .jtc-btn:hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--_pr) 22%, transparent); transform: translateY(-1px); }
:is(.jtc, .jtc-ph) .jtc-btn--primary:hover { background: color-mix(in srgb, var(--_pr) 88%, #fff); border-color: color-mix(in srgb, var(--_pr) 88%, #fff); }
:is(.jtc, .jtc-ph) .jtc-btn:not(.jtc-btn--primary):hover { background: var(--_pr); color: var(--_pt); }
:is(.jtc, .jtc-ph) .jtc-btn:active { transform: none; box-shadow: none; }
/* Theme resets (e.g. Hello Elementor) colour every button on :focus — keep ours. */
:is(.jtc, .jtc-ph) .jtc-btn:focus:not(:hover) { background: transparent; color: var(--_pr); }
:is(.jtc, .jtc-ph) .jtc-btn--primary:focus:not(:hover) { background: var(--_pr); color: var(--_pt); }
.jtc-float.jtc-float:focus:not(:hover) { background: var(--_bg); color: var(--_pr); }
.jtc .jtc-btn, .jtc-ph .jtc-btn { text-decoration: none; }

:is(.jtc, .jtc-ph) .jtc-btn:focus-visible, .jtc-switch input:focus-visible + .jtc-switch__ui, .jtc-cat summary:focus-visible, .jtc-float.jtc-float:focus-visible, .jtc a:focus-visible {
	outline: 2px solid var(--_pr); outline-offset: 3px;
}

/* ---------- Settings view ---------- */
.jtc__view--settings .jtc__title { margin-bottom: 14px; }
.jtc__cats { display: grid; gap: 10px; }
.jtc-cat { position: relative; border: 1px solid var(--_line); border-radius: var(--_r); background: var(--_bg); transition: border-color .2s; }
.jtc-cat:has(details[open]) { border-color: color-mix(in srgb, var(--_hd) 30%, transparent); }
.jtc-cat > .jtc-switch.jtc-cat__switch { position: absolute; top: 13px; right: 14px; z-index: 1; }
.jtc-cat summary { list-style: none; cursor: pointer; padding: 14px 72px 14px 16px; font-weight: 600; color: var(--_hd); display: flex; align-items: center; gap: 10px; }
.jtc-cat summary::-webkit-details-marker { display: none; }
.jtc-cat summary::before {
	content: ""; width: 7px; height: 7px; flex: none; margin-top: -2px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); transition: transform .2s;
}
.jtc-cat details[open] summary::before { transform: rotate(45deg); margin-top: -5px; }
.jtc-cat__count { font-size: 12px; font-weight: 600; line-height: 1; padding: 4px 9px; border-radius: 99px; background: var(--_pr); color: var(--_pt); }
.jtc-cat__desc { margin: -4px 16px 12px 33px; font-size: 14px; }
.jtc-svc { margin: 0 16px 12px; padding: 12px 14px; border-radius: calc(var(--_r) - 2px); background: var(--_soft); font-size: 13.5px; line-height: 1.55; }
.jtc-svc__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--_hd); }
.jtc-svc__meta { margin: 6px 0 0; }
.jtc-svc code, .jtc-cookie-list code { font-size: .92em; background: none; padding: 0; color: inherit; word-break: break-word; }

.jtc-switch { position: relative; display: inline-flex; cursor: pointer; flex: none; }
.jtc-switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: inherit; z-index: 1; }
.jtc-switch__ui { width: 44px; height: 24px; border-radius: 99px; background: color-mix(in srgb, var(--_hd) 22%, var(--_bg)); position: relative; transition: background-color .2s; }
.jtc-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.25, .8, .25, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.jtc-switch input:checked + .jtc-switch__ui { background: var(--_pr); }
.jtc-switch input:checked + .jtc-switch__ui::after { transform: translateX(20px); }
.jtc-switch input:indeterminate + .jtc-switch__ui { background: color-mix(in srgb, var(--_pr) 55%, var(--_bg)); }
.jtc-switch input:indeterminate + .jtc-switch__ui::after { transform: translateX(10px); }
.jtc-switch input:disabled + .jtc-switch__ui { opacity: .45; cursor: not-allowed; }
.jtc-switch--sm .jtc-switch__ui { width: 36px; height: 20px; }
.jtc-switch--sm .jtc-switch__ui::after { width: 14px; height: 14px; }
.jtc-switch--sm input:checked + .jtc-switch__ui::after { transform: translateX(16px); }

/* ---------- Floating reopen button (like the site's round slider arrows) ---------- */
.jtc-float.jtc-float {
	position: fixed; bottom: 20px; z-index: 2147482999; width: 48px; height: 48px; border-radius: 50%;
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
	border: 1px solid var(--_line); background: var(--_bg); color: var(--_pr);
	box-shadow: 0 5px 20px color-mix(in srgb, var(--_hd) 10%, transparent);
	transition: box-shadow .3s, transform .3s, background-color .3s, color .3s;
}
.jtc-float.jtc-float:hover { background: var(--_pr); color: var(--_pt); transform: translateY(-2px); box-shadow: 0 12px 30px color-mix(in srgb, var(--_hd) 18%, transparent); }
.jtc-float--bottom-left { left: 20px; }
.jtc-float--bottom-right { right: 20px; }

/* ---------- Placeholders for blocked embeds ---------- */
.jtc-ph {
	display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 9; min-height: 220px;
	background: var(--_soft); color: var(--_tx);
	border: 1px solid var(--_line); border-top: 4px solid var(--_pr); border-radius: var(--_r);
	padding: 24px; text-align: center; font-size: 14.5px; line-height: 1.55;
}
.jtc-ph--fill, .jtc-ph--el { position: absolute; inset: 0; height: 100%; min-height: 0; aspect-ratio: auto; z-index: 2; }
.jtc-ph__inner { max-width: 480px; }
.jtc-ph__inner::before {
	content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
	background: var(--_pr) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4Zm0 6a2.5 2.5 0 0 1 1 4.79V15h-2v-3.21A2.5 2.5 0 0 1 12 7Z'/%3E%3C/svg%3E") center / 22px no-repeat;
}
.jtc-ph__text { margin: 0 0 16px; }
.jtc-ph__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.jtc-ph__actions .jtc-btn { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.jtc-ph__link { display: inline-block; margin-top: 12px; font-size: 13px; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.elementor-widget-video.jtc-has-ph, .elementor-widget-google_maps.jtc-has-ph { position: relative; }
.elementor-widget-video.jtc-has-ph .elementor-wrapper { min-height: 260px; }

/* ---------- Cookie list shortcode ---------- */
.jtc-cookie-list table { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: .92em; }
.jtc-cookie-list th, .jtc-cookie-list td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid rgba(1, 0, 31, .13); }
.jtc-cookie-list th { color: #01001f; font-weight: 600; }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
	.jtc { padding: 10px; }
	.jtc__dialog { padding: 22px 20px 18px; font-size: 14.5px; }
	.jtc__title { font-size: 18px; }
	.jtc--bar { padding: 0; }
	.jtc--bar .jtc__view--main { display: block; }
	.jtc--bar .jtc__view--main .jtc__actions { width: auto; margin-top: 18px; }
	.jtc__dialog { padding: 20px 18px 16px; line-height: 1.55; }
	.jtc__actions { gap: 8px; margin-top: 16px; }
	:is(.jtc, .jtc-ph) .jtc-btn { min-height: 46px; padding: 10px 12px; font-size: 14.5px; }
	.jtc__legal { margin-top: 12px; padding-top: 10px; }
	.jtc-cat__desc { margin-left: 16px; }
	.jtc-float.jtc-float { bottom: 14px; }
	.jtc-float--bottom-left { left: 14px; }
	.jtc-float--bottom-right { right: 14px; }
}
@media (max-width: 340px) {
	.jtc__actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.jtc *, .jtc__dialog, .jtc-float.jtc-float, :is(.jtc, .jtc-ph) .jtc-btn { transition: none !important; animation: none !important; }
}
