/* Tanya Blocks – Gestaltung (Website und Editor) */

html, body { overflow-x: clip; }

/* ---------- Gemeinsame Animationen ---------- */
@keyframes tb-dashrun { to { stroke-dashoffset: -48; } }
@keyframes tb-floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
@keyframes tb-pop { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(1.35); } 90% { transform: scale(.95); } }
@keyframes tb-lauf { to { transform: translateX(-50%); } }

.tb-anim .tb-linie--laeuft { animation: tb-dashrun var(--tb-dash, 1.6s) linear infinite; }

.tb-hint {
	padding: 16px 20px; border: 2px dashed #8A8178; border-radius: 12px;
	font: 500 15px/1.4 system-ui, sans-serif; color: #5C554C; background: #fff;
}

/* ---------- Foto-Collage ---------- */
.tb-collage {
	position: relative; width: 100%; max-width: 620px; margin-inline: auto;
	aspect-ratio: var(--tb-ar, 600/630); container-type: inline-size;
}
.tb-collage__bahn { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 10; pointer-events: none; }
.tb-foto {
	position: absolute; margin: 0;
	left: var(--l); right: var(--r); top: var(--t); bottom: var(--b);
	width: var(--w); rotate: var(--rot); z-index: var(--z);
}
.tb-foto__innen { position: relative; }
.tb-collage--schweben .tb-foto__innen { animation: tb-floaty var(--tb-float, 6s) ease-in-out infinite; }
.tb-foto__bild { display: block; width: 100%; aspect-ratio: 4/5; object-fit: cover; }

/* Polaroid */
.tb-collage--polaroid .tb-foto__innen {
	background: #fff; padding: 1.7cqw 1.7cqw 2.4cqw; border-radius: 6px;
	box-shadow: 0 18px 40px rgba(40, 30, 20, .16);
}
.tb-collage--polaroid .tb-foto__bild { border-radius: 3px; }
.tb-foto__text {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding-top: 1.4cqw; min-height: 1.2em;
	font-family: var(--wp--preset--font-family--caveat, Caveat, cursive);
	font-size: clamp(15px, 3.7cqw, 24px); line-height: 1.1; color: #1A1A1A;
}
.tb-foto__text .tb-herz { width: clamp(16px, 3.6cqw, 22px); height: auto; flex: none; }

/* Ohne Rahmen */
.tb-collage--ohne .tb-foto__bild { border-radius: 14px; box-shadow: 0 18px 40px rgba(40, 30, 20, .18); }
.tb-foto__pille {
	position: absolute; left: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px;
	background: #F6F2EC; color: #1A1A1A; font-weight: 700; font-size: clamp(11px, 2.4cqw, 14px);
}

/* Instagram-Post (Collage und Feed) */
.tb-collage--post .tb-foto__innen,
.tb-kachel__link {
	background: var(--tb-karte, #fff); border-radius: 12px; overflow: hidden;
	box-shadow: 0 18px 40px rgba(40, 30, 20, .14);
}
.tb-collage--post .tb-foto__innen { font-size: clamp(10px, 2.3cqw, 14px); }
.tb-post__kopf { display: flex; align-items: center; gap: .6em; padding: .7em .8em; color: #1A1A1A; }
.tb-post__kopf b, .tb-post__text b { font-weight: 700; }
.tb-post__avatar {
	width: 2.2em; height: 2.2em; border-radius: 50%; flex: none; padding: 2px;
	background: conic-gradient(#B3122B, #E8B4B0, #B5651D, #B3122B);
	display: grid; place-items: center;
}
.tb-post__avatar > * {
	width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; object-fit: cover;
	background: #1A1A1A; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9em; box-sizing: border-box;
}
.tb-post__punkte { margin-left: auto; letter-spacing: .1em; font-weight: 700; }
.tb-post__aktionen { display: flex; align-items: center; gap: .9em; padding: .7em .8em .3em; color: #1A1A1A; }
.tb-post__aktionen svg { width: 1.6em; height: 1.6em; }
.tb-post__merken { margin-left: auto; }
.tb-post__likes { display: block; margin: 0; padding: 0 .8em; font-weight: 700; color: #1A1A1A; }
.tb-post__text { display: block; margin: .2em 0 0; padding: 0 .8em .9em; line-height: 1.4; color: #1A1A1A; }

.tb-anim .tb-herz { transform-origin: center; animation: tb-pop var(--tb-pop, 2.4s) ease-in-out infinite; }
.tb-anim .tb-herz--b { animation-delay: calc(var(--tb-pop, 2.4s) / -2); }

/* Instagram-Chip */
.tb-chip {
	position: absolute; z-index: 20; display: inline-flex; align-items: center; gap: 8px;
	padding: .6em 1.1em; border-radius: 999px; text-decoration: none;
	background: var(--tb-chip-bg); color: var(--tb-chip-fg) !important;
	font-weight: 700; font-size: clamp(12px, 2.6cqw, 16px); white-space: nowrap;
	box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
}
.tb-anim .tb-chip { animation: tb-wiggle 3s ease-in-out infinite; }
@keyframes tb-wiggle { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }

.tb-nur-mobil { display: none; }
@media (max-width: 600px) {
	.tb-collage { aspect-ratio: var(--tb-mar, 600/630); }
	.tb-foto {
		left: var(--ml); right: var(--mr); top: var(--mt); bottom: var(--mb);
		width: var(--mw); rotate: var(--mrot); z-index: var(--mz);
	}
	.tb-nur-desktop { display: none; }
	.tb-nur-mobil { display: block; }
}

/* ---------- Fliegendes Icon ---------- */
:where(*):has(> .tb-flieger) { position: relative; }
:where(*):has(> .tb-flieger) > :not(.tb-flieger) { position: relative; z-index: 1; }
.tb-flieger { position: absolute !important; inset: 0; margin: 0 !important; pointer-events: none; z-index: 0; overflow: hidden; }
.tb-flieger__bahn { position: absolute; inset: 0; width: 100%; height: 100%; }
.tb-flieger__icon { position: absolute; left: 0; top: 0; display: block; opacity: 0; will-change: transform; }
.tb-flieger__icon svg { display: block; width: 100%; height: 100%; }
.tb-flieger__hinweis { display: none; }

/* ---------- Laufband ---------- */
.tb-laufband {
	position: relative; overflow: hidden; background: var(--tb-bg); color: var(--tb-fg);
	rotate: var(--tb-tilt, 0deg); padding-block: var(--tb-pad, 18px);
	font-family: var(--tb-font); font-size: var(--tb-size); font-weight: var(--tb-weight); line-height: 1.15;
}
.tb-laufband.alignfull {
	margin-left: calc(var(--wp--style--root--padding-left, 0px) * -1 - 3vw) !important;
	margin-right: calc(var(--wp--style--root--padding-right, 0px) * -1 - 3vw) !important;
	width: auto !important; max-width: none !important;
}
.tb-laufband--rand-gestrichelt { border-block: 2px dashed var(--tb-fg); }
.tb-laufband--rand-gepunktet { border-block: 3px dotted var(--tb-fg); }
.tb-laufband--rand-durchgezogen { border-block: 2px solid var(--tb-fg); }
.tb-laufband--gross { text-transform: uppercase; letter-spacing: .04em; }
.tb-laufband__spur { display: flex; width: max-content; }
.tb-anim .tb-laufband__spur { animation: tb-lauf var(--tb-dauer, 30s) linear infinite; }
.tb-laufband--rechts .tb-laufband__spur { animation-direction: reverse; }
.tb-laufband--pause:hover .tb-laufband__spur { animation-play-state: paused; }
.tb-laufband__haelfte { display: flex; flex: none; gap: var(--tb-gap); padding-right: var(--tb-gap); white-space: nowrap; }
.tb-laufband__trenner { color: var(--tb-sep); }

/* ---------- Feed ---------- */
.tb-feed { display: grid; gap: 22px; grid-template-columns: repeat(var(--tb-spalten, 4), minmax(0, 1fr)); align-items: start; }
.tb-feed--versetzt .tb-kachel:nth-child(even) { margin-top: 48px; }
.tb-kachel { margin: 0; }
.tb-kachel__link { display: block; text-decoration: none !important; color: #1A1A1A !important; font-size: 14px; transition: transform .25s ease, box-shadow .25s ease; }
.tb-kachel__link:hover, .tb-kachel__link:focus-visible { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 26px 50px rgba(40, 30, 20, .2); }
.tb-kachel__link:focus-visible { outline: 3px solid #B3122B; outline-offset: 3px; }
.tb-kachel__quelle { margin-left: auto; display: inline-flex; }
.tb-kachel__blog { font-size: 12px; font-weight: 700; padding: 3px 10px; border: 1.5px dashed #1A1A1A; border-radius: 999px; }
.tb-kachel__bild { position: relative; display: block; }
.tb-kachel__bild img { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; }
.tb-kachel__play {
	position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
	background: rgba(26, 26, 26, .72); color: #fff; display: grid; place-items: center;
}
.tb-kachel__mehr {
	display: flex; align-items: center; gap: 6px; margin: 0 .8em .9em; padding-top: .7em;
	border-top: 1.5px dashed #D8CEC2; font-weight: 700; color: #B3122B;
}
.tb-kachel .tb-post__text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: .6em; }
@media (max-width: 1000px) { .tb-feed { grid-template-columns: repeat(min(var(--tb-spalten, 4), 2), minmax(0, 1fr)); } }
@media (max-width: 520px) {
	.tb-feed { grid-template-columns: 1fr; }
	.tb-feed--versetzt .tb-kachel:nth-child(even) { margin-top: 0; }
}

/* ---------- Stil-Varianten für normale Blöcke ---------- */
.is-style-tb-handschrift { font-family: var(--wp--preset--font-family--caveat) !important; font-size: 1.75em; line-height: 1.1; rotate: -2deg; }
.is-style-tb-tag {
	display: inline-block; margin: 0 !important; padding: 8px 18px; border: 1.5px dashed currentColor;
	border-radius: 999px; font-size: 15px; font-weight: 500;
}
.is-style-tb-badge {
	display: inline-block; align-self: flex-start; padding: 6px 14px; border-radius: 999px;
	background: var(--wp--preset--color--accent-1); color: #fff;
	font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
}
.is-style-tb-overline { font-size: 14px !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }
.wp-block-image.is-style-tb-bogen { position: relative; padding: 14px; }
.wp-block-image.is-style-tb-bogen img { border-radius: 999px 999px 16px 16px; aspect-ratio: 4/5; object-fit: cover; width: 100%; }
.wp-block-image.is-style-tb-bogen::after {
	content: ""; position: absolute; inset: 0; border: 2px dashed currentColor;
	border-radius: 999px 999px 28px 28px; pointer-events: none;
}
.wp-block-image.is-style-tb-polaroid img { background: #fff; padding: 14px 14px 48px; box-shadow: 0 30px 60px rgba(0, 0, 0, .35); rotate: -2deg; }
.wp-block-group.is-style-tb-gestrichelt { border: 2px dashed currentColor; border-radius: 24px; }
.wp-block-group.is-style-tb-karte { background: var(--wp--preset--color--accent-2); border-radius: 28px; }

/* ---------- Kopf- und Fußzeile ---------- */
.tb-logo a { text-decoration: none; }
.tb-gestrichelt-oben { border-top: 1.5px dashed #BDB3A6; }

/* ---------- Weniger Bewegung, wenn im System eingestellt ---------- */
@media (prefers-reduced-motion: reduce) {
	.tb-anim *, .tb-anim { animation: none !important; }
}
.tb-foto__bild { height: auto; }

/* Häufige Fragen (Details-Block) */
.wp-block-details.is-style-tb-frage { border-bottom: 1.5px dashed #BDB3A6; padding: 18px 0; margin-block: 0 !important; }
.wp-block-details.is-style-tb-frage summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	font-family: var(--wp--preset--font-family--bricolage); font-weight: 700; font-size: 1.25rem; line-height: 1.3;
}
.wp-block-details.is-style-tb-frage summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-tb-frage summary::after {
	content: "+"; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
	border: 1.5px dashed currentColor; font-family: var(--wp--preset--font-family--dm-sans); font-weight: 400; font-size: 22px; transition: transform .2s;
}
.wp-block-details.is-style-tb-frage[open] summary::after { transform: rotate(45deg); color: var(--wp--preset--color--accent-1); }
.wp-block-details.is-style-tb-frage > :not(summary) { margin-top: 10px; color: var(--wp--preset--color--accent-3); }

/* Widerrufsformular */
.tb-widerruf { max-width: 640px; }
.tb-widerruf__form p { margin: 0 0 18px; }
.tb-widerruf__form label { display: block; font-weight: 700; margin-bottom: 6px; }
.tb-widerruf__form input[type=text], .tb-widerruf__form input[type=email], .tb-widerruf__form textarea {
	width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; border: 1.5px solid #8A8178; border-radius: 10px; background: #fff;
}
.tb-widerruf__form input:focus, .tb-widerruf__form textarea:focus { outline: 3px solid #B3122B; outline-offset: 1px; border-color: #1A1A1A; }
.tb-widerruf__form small { display: block; margin-top: 4px; color: #5C554C; }
.tb-widerruf__hinweis { font-size: .9rem; color: #5C554C; }
.tb-widerruf__falle { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tb-widerruf__knopf { cursor: pointer; border: 0; font-size: 1.05rem; }
.tb-widerruf__ok, .tb-widerruf__fehler { padding: 16px 20px; border-radius: 12px; }
.tb-widerruf__ok { background: #E8F3EC; border: 1.5px solid #2F5D50; }
.tb-widerruf__fehler { background: #FBEAEA; border: 1.5px solid #B3122B; }
