/* Thayarunde Chatbot – Tina */
.tcb-root {
	--tcb-accent: var(--tcb-accent-setting, #60991b);
	--tcb-accent-soft: color-mix(in srgb, var(--tcb-accent) 12%, #fff);
	--tcb-bg: #ffffff;
	--tcb-text: #2b2b2b;
	--tcb-muted: #6b6b6b;
	--tcb-bubble: #f3f5f0;
	--tcb-border: #e3e6df;
	--tcb-open: #2e7d32;
	--tcb-closed: #b3261e;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.45;
	color: var(--tcb-text);
}
.tcb-root *, .tcb-root *::before, .tcb-root *::after { box-sizing: border-box; }
.tcb-root [hidden] { display: none !important; }
.tcb-ico { width: 16px; height: 16px; flex: none; }

/* Startknopf */
.tcb-launcher {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 20px 4px 4px;
	border: 0;
	border-radius: 32px;
	background: var(--tcb-accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
	transition: transform .15s ease;
}
.tcb-launcher:hover { transform: translateY(-2px); }
.tcb-launcher .tcb-avatar { width: 52px; height: 52px; border: 2px solid #fff; }
.tcb-root.is-open .tcb-launcher { display: none; }
.tcb-root button:focus-visible, .tcb-root a:focus-visible { outline: 3px solid #1d4ed8; outline-offset: 2px; }

.tcb-avatar { display: block; width: 40px; height: 40px; border-radius: 50%; background: #fff; object-fit: cover; flex: none; }
span.tcb-avatar { overflow: hidden; }
span.tcb-avatar svg { display: block; width: 100%; height: 100%; }

/* Große Tina über der Begrüßung */
.tcb-hero { display: flex; justify-content: center; margin: 2px 0 -2px; }
.tcb-hero .tcb-avatar-hero { width: 96px; height: 96px; border-radius: 0; background: transparent; overflow: visible; }

/* ---- Tina-Animation (SVG-Ebenen) ---- */
.tcb-root .tina { overflow: visible; }
.tcb-root .tina .t-zu { opacity: 0; transition: opacity .07s linear; }
.tcb-root .tina .t-pupille-l, .tcb-root .tina .t-pupille-r { transform-box: fill-box; transform-origin: center; transition: transform .07s ease-in, opacity .07s linear; }
.tcb-root .tina .t-lid-l, .tcb-root .tina .t-lid-r { transition: transform .07s ease-in; }
.tcb-root .tina .t-kopf { transform-box: view-box; transform-origin: 512px 820px; }
.tcb-root .tina.zu-l .t-pupille-l, .tcb-root .tina.zu-r .t-pupille-r { transform: scaleY(.1); opacity: 0; }
.tcb-root .tina.zu-l .t-lid-l, .tcb-root .tina.zu-r .t-lid-r { transform: translateY(12px); }
.tcb-root .tina.zu-l .t-zu-l, .tcb-root .tina.zu-r .t-zu-r { opacity: 1; }
.tcb-root .tina .t-mund-morph { display: none; }
.tcb-root .tina.morph .t-mund { display: none; }
.tcb-root .tina.morph .t-mund-morph { display: inline; }
.tcb-root .tina .t-gruebchen { opacity: 0; transition: opacity .15s linear; }
.tcb-root .tina.mund-zu .t-gruebchen { opacity: 1; transition-delay: .12s; }
.tcb-root .tina.nicken .t-kopf { animation: tcb-nicken .9s ease-in-out; }
@keyframes tcb-nicken {
	0%, 100% { transform: none; }
	25% { transform: translateY(10px) rotate(-1.5deg); }
	50% { transform: translateY(-2px) rotate(.4deg); }
	75% { transform: translateY(7px) rotate(-1deg); }
}

/* Fenster */
.tcb-panel {
	display: none;
	flex-direction: column;
	width: 390px;
	height: min(640px, calc(100vh - 40px));
	background: var(--tcb-bg);
	border-radius: 18px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
	overflow: hidden;
}
.tcb-root.is-open .tcb-panel { display: flex; }

.tcb-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 10px 12px 14px;
	background: var(--tcb-accent);
	color: #fff;
}
.tcb-head .tcb-avatar { width: 46px; height: 46px; border: 2px solid #fff; }
.tcb-head-text { flex: 1; min-width: 0; }
.tcb-title { font-weight: 800; font-size: 18px; line-height: 1.1; }
.tcb-sub { font-size: 12.5px; opacity: .92; }
.tcb-head-actions { display: flex; gap: 2px; }
.tcb-hbtn {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: #fff;
	cursor: pointer;
}
.tcb-hbtn .tcb-ico { width: 19px; height: 19px; }
.tcb-hbtn:hover { background: rgba(255, 255, 255, .18); }
.tcb-loc.is-active { background: #fff; color: var(--tcb-accent); }
.tcb-loc.is-busy { animation: tcb-pulse 1s infinite; }
@keyframes tcb-pulse { 50% { opacity: .4; } }

/* Verlauf */
.tcb-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafbf8;
}
.tcb-msg {
	max-width: 88%;
	padding: 10px 13px;
	border-radius: 16px;
	word-wrap: break-word;
}
.tcb-msg p { margin: 0 0 .5em; padding: 0; }
.tcb-msg > :last-child { margin-bottom: 0; }
.tcb-msg ul { margin: 0 0 .6em 1.1em; padding: 0; list-style: disc; }
.tcb-msg li { margin: 0 0 .3em; padding: 0; }
.tcb-msg a { color: var(--tcb-accent); font-weight: 600; }
.tcb-bot { align-self: flex-start; background: var(--tcb-bubble); border-bottom-left-radius: 5px; }
.tcb-user { align-self: flex-end; background: var(--tcb-accent); color: #fff; border-bottom-right-radius: 5px; }
.tcb-bot:has(.tcb-card) { max-width: 100%; width: 100%; }
.tcb-error { align-self: center; background: #fdecea; color: #8a1c13; font-size: 14px; }

/* Info-Karte */
.tcb-card {
	margin: 8px 0 10px;
	padding: 12px;
	background: #fff;
	border: 1px solid var(--tcb-border);
	border-left: 4px solid var(--tcb-accent);
	border-radius: 12px;
	font-size: 14px;
}
.tcb-card-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.tcb-msg a.tcb-card-name { color: var(--tcb-text); font-weight: 800; font-size: 15px; text-decoration: none; }
.tcb-msg a.tcb-card-name:hover { color: var(--tcb-accent); text-decoration: underline; }
.tcb-card-kat { font-size: 12px; color: var(--tcb-muted); }
.tcb-card-addr { margin-top: 2px; color: var(--tcb-muted); font-size: 13px; }
.tcb-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tcb-tag { padding: 1px 8px; border-radius: 10px; background: var(--tcb-accent-soft); color: var(--tcb-accent); font-size: 11.5px; font-weight: 600; }

.tcb-hours {
	margin-top: 10px;
	padding: 9px 10px;
	background: var(--tcb-accent-soft);
	border-radius: 9px;
}
.tcb-hours-title { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--tcb-accent); text-transform: uppercase; letter-spacing: .03em; }
.tcb-badge { display: inline-block; margin: 6px 0 2px; padding: 2px 9px; border-radius: 10px; font-size: 12.5px; font-weight: 700; color: #fff; }
.tcb-badge.is-open { background: var(--tcb-open); }
.tcb-badge.is-closed { background: var(--tcb-closed); }
.tcb-hours dl { margin: 6px 0 0; padding: 0; }
.tcb-hrow { display: flex; gap: 10px; padding: 2px 0; }
.tcb-hrow dt { flex: 0 0 64px; margin: 0; font-weight: 700; }
.tcb-hrow dd { margin: 0; font-variant-numeric: tabular-nums; }
.tcb-hrow-text dd { white-space: pre-line; }
.tcb-season { margin: 6px 0 1px; font-size: 12px; font-weight: 700; color: var(--tcb-muted); }

.tcb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tcb-msg a.tcb-btn, .tcb-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border: 1px solid var(--tcb-border);
	border-radius: 8px;
	background: #fff;
	color: var(--tcb-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.tcb-msg a.tcb-btn:hover, .tcb-btn:hover { border-color: var(--tcb-accent); color: var(--tcb-accent); }
.tcb-msg a.tcb-btn-more { margin-left: auto; border-color: transparent; color: var(--tcb-accent); }

.tcb-msg a.tcb-route {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 2px 0;
	padding: 8px 14px;
	border-radius: 10px;
	background: var(--tcb-accent);
	color: #fff;
	text-decoration: none;
}
.tcb-msg a.tcb-route:hover { filter: brightness(1.08); }
.tcb-route .tcb-ico { width: 20px; height: 20px; }

/* Tour-Karte */
.tcb-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 10px; }
.tcb-fact { padding: 6px 9px; background: var(--tcb-accent-soft); border-radius: 8px; }
.tcb-fact span { display: block; font-size: 11px; color: var(--tcb-muted); text-transform: uppercase; letter-spacing: .03em; }
.tcb-fact strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.tcb-tag-top { background: #1d2327; color: #fff; }
.tcb-level-leicht, .tcb-level-lehká { background: #e3f1e5; color: #1e6b2b; }
.tcb-level-mittel, .tcb-level-střední { background: #fdf1d8; color: #8a5a00; }
.tcb-level-schwer, .tcb-level-těžká { background: #fbe4e4; color: #9b1c1c; }

/* Rückfrage Standort */
.tcb-ask-loc { margin: 10px 0 4px; padding: 10px 12px; background: #fff; border: 1px solid var(--tcb-border); border-radius: 12px; }
.tcb-ask-loc:empty { display: none; }
.tcb-ask-loc-q { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 8px; }
.tcb-ask-loc-q .tcb-ico { color: var(--tcb-accent); width: 18px; height: 18px; }
.tcb-ask-loc-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.tcb-msg .tcb-btn-primary, .tcb-btn-primary { background: var(--tcb-accent); border-color: var(--tcb-accent); color: #fff; }
.tcb-msg .tcb-btn-primary:hover, .tcb-btn-primary:hover { color: #fff; filter: brightness(1.08); }
.tcb-ask-loc.is-busy { opacity: .6; pointer-events: none; }
.tcb-loc-done { display: inline-flex; align-items: center; gap: 6px; color: var(--tcb-accent); font-weight: 700; }
.tcb-loc-skip { color: var(--tcb-muted); }

/* Bewertung */
.tcb-fb { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12.5px; color: var(--tcb-muted); }
.tcb-fb > span:first-child { margin-right: 4px; }
.tcb-fb-btn {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid var(--tcb-border);
	border-radius: 8px;
	background: #fff;
	color: var(--tcb-muted);
	cursor: pointer;
}
.tcb-fb-btn:hover { border-color: var(--tcb-accent); color: var(--tcb-accent); }
.tcb-fb-thanks { color: var(--tcb-accent); font-weight: 600; }

/* Tippen */
.tcb-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.tcb-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--tcb-muted); animation: tcb-blink 1.2s infinite both; }
.tcb-typing span:nth-child(2) { animation-delay: .2s; }
.tcb-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes tcb-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* Info-Fenster */
.tcb-infobox { flex: 1; overflow-y: auto; padding: 18px 18px 20px; font-size: 14.5px; }
.tcb-infobox h3 { margin: 0 0 10px; padding: 0; font-size: 17px; color: var(--tcb-text); }
.tcb-infobox p { margin: 0 0 .8em; padding: 0; }
.tcb-infobox a { color: var(--tcb-accent); font-weight: 600; }

/* Eingabe */
.tcb-form {
	display: flex;
	gap: 8px;
	padding: 12px;
	border-top: 1px solid var(--tcb-border);
	background: #fff;
}
.tcb-input {
	flex: 1;
	resize: none;
	min-height: 44px;
	max-height: 120px;
	padding: 11px 12px;
	border: 1px solid var(--tcb-border);
	border-radius: 12px;
	font: inherit;
	color: inherit;
	background: #fff;
}
.tcb-input:focus { outline: 2px solid var(--tcb-accent); outline-offset: -1px; }
.tcb-send {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	border: 0;
	border-radius: 12px;
	background: var(--tcb-accent);
	color: #fff;
	cursor: pointer;
}
.tcb-send:disabled { opacity: .5; cursor: default; }
.tcb-send .tcb-ico { width: 20px; height: 20px; }

@media (max-width: 520px) {
	.tcb-root { right: 12px; bottom: 12px; }
	.tcb-root.is-open { inset: 0; }
	.tcb-root.is-open .tcb-panel { width: 100%; height: 100%; border-radius: 0; }
	.tcb-launcher-label { display: none; }
	.tcb-launcher { padding: 3px; }
	.tcb-launcher .tcb-avatar { width: 58px; height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
	.tcb-typing span, .tcb-loc.is-busy { animation: none; opacity: .6; }
	.tcb-root .tina, .tcb-root .tina * { transition: none !important; animation: none !important; }
	.tcb-launcher { transition: none; }
}
