/* TB Termintool – Gestaltung nach dem Entwurf der Terminseite (Petrol, Türkis, Orange; Fira Sans / Roboto Slab) */
.tbt {
	--tbt-petrol: #0B4F5C;
	--tbt-petrol-soft: #E9F1F2;
	--tbt-tuerkis: #00798C;
	--tbt-orange: #EC6A00;
	--tbt-orange-hover: #D95F00;
	--tbt-orange-hell: #EF9A3D;
	--tbt-dunkel: #1D2B2F;
	--tbt-text: #4A5659;
	--tbt-grau: #6F7A7C;
	--tbt-linie: #DDD8D1;
	--tbt-beige: #F2EEE9;
	--tbt-hell: #FBFAF8;
	--tbt-fehler: #B42318;
	box-sizing: border-box;
	background: #fff;
	border: 1.5px solid var(--tbt-petrol);
	border-radius: 16px;
	padding: 32px 32px 36px;
	color: var(--tbt-text);
	font-family: 'Fira Sans', sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
.tbt *, .tbt *::before, .tbt *::after { box-sizing: border-box; }
.tbt [hidden] { display: none !important; }
.tbt button { font: inherit; cursor: pointer; margin: 0; }
.tbt a { color: var(--tbt-tuerkis); font-weight: 500; text-decoration: none; }
.tbt a:hover { text-decoration: underline; }

/* Kopf (optional) */
.tbt-head:empty { display: none; }
.tbt-title { font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 24px; line-height: 1.2; color: var(--tbt-dunkel); margin: 0 0 8px; }
.tbt-intro { margin: 0 0 24px; }

/* Schritte */
.tbt-step { scroll-margin-top: 110px; }
.tbt-step + .tbt-step { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--tbt-linie); }
.tbt-step-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 21px; line-height: 1.25; color: var(--tbt-dunkel); }
.tbt-num { flex: 0 0 32px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--tbt-orange); color: #fff; font-family: 'Fira Sans', sans-serif; font-size: 15px; font-weight: 600; }
.tbt-group { font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--tbt-grau); margin: 0 0 10px; }
.tbt-types + .tbt-group { margin-top: 22px; }

/* Terminarten */
.tbt-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.tbt-type {
	display: flex; flex-direction: column; gap: 3px; text-align: left;
	padding: 16px 18px; background: var(--tbt-hell); color: var(--tbt-text);
	border: 1.5px solid var(--tbt-linie); border-radius: 6px;
	transition: border-color .15s, background .15s, color .15s;
}
.tbt-type:hover { border-color: var(--tbt-tuerkis); }
.tbt-type:focus-visible { outline: 2px solid var(--tbt-tuerkis); outline-offset: 2px; }
.tbt-type-name { font-weight: 600; font-size: 17px; color: var(--tbt-dunkel); }
.tbt-type-dur { font-size: 14px; font-weight: 500; color: var(--tbt-tuerkis); }
.tbt-type-desc { font-size: 14px; line-height: 1.4; }
.tbt-type.is-active { background: var(--tbt-petrol); border-color: var(--tbt-petrol); color: #E9F1F2; }
.tbt-type.is-active .tbt-type-name { color: #fff; }
.tbt-type.is-active .tbt-type-dur { color: var(--tbt-orange-hell); }

/* Gewählte Terminart bzw. Tag und Uhrzeit (eingeklappt) */
.tbt-chosen { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding: 14px 18px; background: var(--tbt-petrol); border-radius: 6px; color: #E9F1F2; }
.tbt-chosen-info { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.tbt-chosen-main { font-weight: 600; font-size: 17px; color: #fff; }
.tbt-chosen-sub { font-size: 15px; font-weight: 500; color: var(--tbt-orange-hell); }
.tbt-change { padding: 8px 18px; border: 1.5px solid rgba(255, 255, 255, .6); border-radius: 6px; background: transparent; color: #fff; font-weight: 600; font-size: 15px; }
.tbt-change:hover { background: #fff; border-color: #fff; color: var(--tbt-petrol); }

/* Kalender */
.tbt-datewrap { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 28px; align-items: start; }
.tbt-cal { border: 1.5px solid var(--tbt-linie); border-radius: 6px; padding: 14px; background: #fff; }
.tbt-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tbt-cal-month { font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 18px; color: var(--tbt-dunkel); }
.tbt-nav { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--tbt-linie); border-radius: 50%; background: #fff; color: var(--tbt-petrol); font-size: 20px; line-height: 1; padding: 0 0 2px; }
.tbt-nav:hover:not(:disabled) { border-color: var(--tbt-tuerkis); }
.tbt-nav:disabled { opacity: .35; cursor: default; }
.tbt-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tbt-cal-wd { text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .05em; color: var(--tbt-grau); padding: 4px 0; }
.tbt-day { aspect-ratio: 1; border: 0; border-radius: 6px; background: transparent; color: #C2BCB4; font-size: 15px; padding: 0; }
.tbt-day:disabled { cursor: default; }
.tbt-day.is-free { background: var(--tbt-petrol-soft); color: var(--tbt-petrol); font-weight: 600; }
.tbt-day.is-free:hover { box-shadow: inset 0 0 0 1.5px var(--tbt-tuerkis); }
.tbt-day.is-active, .tbt-day.is-active:hover { background: var(--tbt-petrol); color: #fff; box-shadow: none; }

.tbt-slots-date { font-weight: 600; color: var(--tbt-dunkel); margin: 4px 0 12px; }
.tbt-slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.tbt-slot { padding: 10px 8px; border: 1.5px solid var(--tbt-linie); border-radius: 6px; background: #fff; color: var(--tbt-dunkel); font-size: 15px; }
.tbt-slot:hover { border-color: var(--tbt-tuerkis); }
.tbt-slot.is-active { background: var(--tbt-petrol); border-color: var(--tbt-petrol); color: #fff; font-weight: 600; }
.tbt-loading, .tbt-empty { color: var(--tbt-grau); margin: 0; }

/* Formular */
.tbt-summary { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 14px 18px; margin-bottom: 20px; background: var(--tbt-beige); border-radius: 6px; color: var(--tbt-dunkel); }
.tbt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.tbt-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.tbt-field label { font-size: 14px; font-weight: 600; color: var(--tbt-dunkel); }
.tbt-field input, .tbt-field textarea {
	width: 100%; padding: 11px 13px; font: inherit; color: var(--tbt-dunkel);
	border: 1.5px solid var(--tbt-linie); border-radius: 6px; background: #fff; box-shadow: none;
}
.tbt-field input:focus, .tbt-field textarea:focus { outline: none; border-color: var(--tbt-tuerkis); box-shadow: 0 0 0 3px rgba(0, 121, 140, .15); }
.tbt-hint { font-size: 14px; color: var(--tbt-grau); }
.tbt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.tbt-consent { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 18px; font-size: 14px; line-height: 1.45; }
.tbt-consent input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--tbt-petrol); }
.tbt-msg { color: var(--tbt-fehler); font-weight: 600; margin: 0 0 14px; }
.tbt-msg:empty { display: none; }
.tbt-actions { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.tbt-back { padding: 13px 22px; border: 1.5px solid var(--tbt-petrol); border-radius: 6px; background: transparent; color: var(--tbt-petrol); font-weight: 600; }
.tbt-back:hover { background: var(--tbt-petrol-soft); }
.tbt-submit { padding: 14px 30px; border: 1.5px solid var(--tbt-orange); border-radius: 6px; background: var(--tbt-orange); color: #fff; font-size: 16px; font-weight: 600; transition: background .15s, border-color .15s; }
.tbt-submit:hover:not(:disabled) { background: var(--tbt-orange-hover); border-color: var(--tbt-orange-hover); }
.tbt-submit:disabled { opacity: .6; cursor: default; }

/* Bestätigung */
.tbt-done {
	position: relative; overflow: hidden; text-align: center;
	padding: 40px 28px 36px; border-radius: 12px;
	background: linear-gradient(160deg, var(--tbt-petrol) 0%, #0E6272 100%);
	color: #E9F1F2;
	scroll-margin-top: 140px;
}
.tbt-done.is-sichtbar { animation: tbt-pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.tbt-done p { margin: 0 auto 10px; max-width: 560px; position: relative; z-index: 1; }
.tbt-done p:last-child { margin-bottom: 0; }
.tbt-done-icon {
	position: relative; z-index: 1;
	width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--tbt-orange); color: #fff;
	box-shadow: 0 0 0 8px rgba(236, 106, 0, .22);
}
.tbt-done.is-sichtbar .tbt-done-icon { animation: tbt-wackel 1s ease .3s both; }
.tbt-done-icon svg { width: 38px; height: 38px; }
.tbt-done-kicker { font-weight: 600; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--tbt-orange-hell); }
.tbt-done-title { font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 24px; line-height: 1.3; color: #fff; }
.tbt-done-text { font-size: 16px; line-height: 1.5; }
.tbt-done .tbt-msg { color: #FFD7B0; }
.tbt-confetti {
	position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px; opacity: 0;
	animation-name: tbt-konfetti; animation-timing-function: ease-in; animation-fill-mode: forwards;
}
@keyframes tbt-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes tbt-wackel { 0% { transform: rotate(0) scale(.6); } 40% { transform: rotate(-14deg) scale(1.1); } 70% { transform: rotate(8deg); } 100% { transform: rotate(0) scale(1); } }
@keyframes tbt-konfetti { 0% { opacity: 1; translate: 0 0; } 100% { opacity: 0; translate: 0 340px; rotate: 540deg; } }
@media (prefers-reduced-motion: reduce) { .tbt-done.is-sichtbar, .tbt-done.is-sichtbar .tbt-done-icon { animation: none; } }

@media (max-width: 760px) {
	.tbt { padding: 22px 18px 26px; border-radius: 12px; }
	.tbt-datewrap, .tbt-row { grid-template-columns: 1fr; }
	.tbt-cal { max-width: 360px; }
	.tbt-step + .tbt-step { margin-top: 24px; padding-top: 24px; }
	.tbt-step-title { font-size: 19px; }
}
@media (max-width: 420px) {
	.tbt-actions { flex-direction: column-reverse; align-items: stretch; }
	.tbt-submit, .tbt-back { width: 100%; }
}
