/*
Theme Name: TanjaLingo
Theme URI: https://tanjalingo.com
Author: Ben Schnopp
Description: Block-Theme für TanjaLingo – Online-Englischnachhilfe mit Tanja.
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.3
Version: 0.1.12
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tanjalingo
Domain Path: /languages
*/

/* ---------- Basis ---------- */

:where(a, button, input, select, textarea, summary, .wp-element-button, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.tl-dot {
	color: var(--wp--preset--color--primary);
}

/* ---------- Logo (SVG, zweifarbig bzw. einfarbig auf Gelb) ---------- */

.tl-logo {
	margin: 0;
	line-height: 0;
}

.tl-logo a {
	display: inline-block;
	border-radius: 4px;
}

.tl-logo__img {
	display: block;
	max-width: 100%;
	height: auto;
}

.tl-logo--large .tl-logo__img {
	width: clamp(220px, 60vw, 460px);
	margin-inline: auto;
}

.tl-logo--large {
	text-align: center;
}

.tl-logo--small .tl-logo__img {
	width: 120px;
}

/* ---------- Header ---------- */

.tl-claim {
	text-wrap: balance;
}

.tl-navbar .wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
}

.tl-navbar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-size: var(--wp--preset--font-size--large);
}

.tl-navbar .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 0.3em;
}

/* Platz für späteren Sprachumschalter neben dem Button */
.tl-navbar__actions {
	gap: var(--wp--preset--spacing--20);
}

@media (max-width: 599px) {
	.tl-navbar .tl-logo--small .tl-logo__img {
		width: 104px;
	}
}

/* ---------- Kontakt-Links (core/social-links mit Labels) ---------- */

.tl-contact.wp-block-social-links.is-style-logos-only .wp-social-link {
	background: none;
	color: var(--wp--preset--color--primary-dark);
}

.tl-contact.wp-block-social-links .wp-social-link svg {
	width: 1.5em;
	height: 1.5em;
}

.tl-contact.wp-block-social-links .wp-block-social-link-anchor {
	gap: 0.75em;
	padding: 0;
}

.tl-contact.wp-block-social-links .wp-block-social-link-label {
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--medium);
	padding-inline-start: 0;
}

.tl-contact.wp-block-social-links .wp-block-social-link-anchor:hover .wp-block-social-link-label {
	text-decoration: underline;
}

/* ---------- Block-Style: Häkchen-Liste (core/list) ---------- */

.is-style-tl-checklist {
	list-style: none;
	padding-left: 0;
}

.is-style-tl-checklist li {
	position: relative;
	padding-left: 2em;
	margin-block: 0.5em;
}

.is-style-tl-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0.15em;
	display: grid;
	place-items: center;
	width: 1.35em;
	height: 1.35em;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1;
}

/* ---------- Block-Style: Schritte (core/list, nummeriert) ---------- */

.is-style-tl-steps {
	list-style: none;
	padding-left: 0;
	counter-reset: tl-step;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.is-style-tl-steps li {
	counter-increment: tl-step;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem;
	text-align: center;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
}

.is-style-tl-steps li::before {
	content: counter(tl-step);
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}

@media (max-width: 599px) {
	.is-style-tl-steps {
		grid-template-columns: 1fr;
		gap: var(--wp--preset--spacing--30);
	}

	.is-style-tl-steps li {
		flex-direction: row;
		text-align: left;
	}
}

/* ---------- Preise ---------- */

.tl-price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	margin-block: 0.5rem;
}

.tl-price__unit {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
}

.tl-package-meta s,
.tl-package-meta strong {
	white-space: nowrap;
}

/* Block-Stil „Beliebt“ (Rahmen + Badge): CSS in functions.php, damit der Text übersetzbar ist. */

/* ---------- Bewertungen ---------- */

.tl-stars {
	margin: 0;
	color: var(--wp--preset--color--primary-dark);
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: 0.1em;
	line-height: 1;
}

.tl-review {
	margin: 0;
	padding: 0;
	border: 0;
}

.tl-review cite {
	display: block;
	margin-top: 0.75em;
	font-style: normal;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- Buchung ---------- */

.tl-hours table {
	border-collapse: collapse;
}

.tl-hours td {
	border: 0;
	border-bottom: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast) 15%, transparent);
	padding: 0.5em 0;
}

.tl-hours td:first-child {
	font-weight: 600;
}

.tl-hours td:last-child {
	text-align: right;
	white-space: nowrap;
}

/*
 * Amelia-Buchungsformular: Farben und Schrift werden in Amelia → Anpassen eingestellt.
 * Hier nur die Rundung passend zu den Karten des Themes.
 */
.amelia-v2-booking #amelia-container {
	--am-brad-main: 0 16px 16px 0 !important;
	border-radius: 16px;
	overflow: hidden;
	margin-block: 0 !important; /* Amelia setzt 100px; der Blockabstand des Themes genügt. */
}

/*
 * Paketansicht: Amelia zeigt bei „Mitarbeiter:“ nur das Foto ohne Namen; bei einer Lehrerin überflüssig.
 * Nur Label und Fotos ausblenden, eine Leistungsbeschreibung im selben Container bleibt sichtbar.
 */
.amelia-v2-booking #amelia-container .am-fs__pis-service-info > :is(span, img) {
	display: none;
}

/* Ohne Beschreibung bliebe ein leerer aufgeklappter Bereich. */
.amelia-v2-booking #amelia-container .am-fs__pis-service-info:not(:has(.am-fs__pis-service-info__content)) {
	display: none;
}

/* Dann gibt es auch nichts aufzuklappen: Pfeil ausblenden, Kopfzeile nicht anklickbar. */
.amelia-v2-booking #amelia-container .am-fs__pis-includes .am-collapse-item:not(:has(.am-fs__pis-service-info__content)) .am-collapse-item__trigger {
	display: none;
}

.amelia-v2-booking #amelia-container .am-fs__pis-includes .am-collapse-item:not(:has(.am-fs__pis-service-info__content)) .am-collapse-item__heading {
	pointer-events: none;
}

/* Hinweisfelder (Zusatzfeld „Inhalt“) im Schritt „Deine Angaben“: Amelia setzt Fettschrift und Aufzählungszeichen zurück. */
.amelia-v2-booking #amelia-container .am-fs__info-form__item strong {
	font-weight: 700;
}

.amelia-v2-booking #amelia-container .am-fs__info-form__item ul {
	list-style: disc;
	margin: 0.25em 0 0.5em;
	padding-left: 1.25em;
}

/* Kundenbereich, Bestätigung „Zugangslink gesendet“: Hinweis unten wie der Rest der Box zentrieren. */
.amelia-v2-booking #amelia-container .am-asi__footer {
	text-align: center;
}

/* Amelia blendet Fokusrahmen teils aus; für Tastaturbedienung wieder sichtbar machen. */
.amelia-v2-booking #amelia-container :is(a, button, input, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--contrast) !important;
	outline-offset: 2px !important;
}

/* ---------- FAQ: gilt für jeden Details-Block (core/details) ---------- */

.wp-block-details {
	border-radius: 16px;
	background: var(--wp--preset--color--cream);
	padding: 0 var(--wp--preset--spacing--40);
}

.wp-block-details > summary {
	position: relative;
	list-style: none;
	padding: var(--wp--preset--spacing--30) 2.25rem var(--wp--preset--spacing--30) 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
}

.wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details > summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	translate: 0 -50%;
	display: grid;
	place-items: center;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--contrast);
	font-weight: 700;
	line-height: 1;
}

.wp-block-details[open] > summary::after {
	content: "–";
}

.wp-block-details[open] {
	padding-bottom: var(--wp--preset--spacing--30);
}

.wp-block-details > :not(summary) {
	margin-top: 0;
	margin-bottom: 0.75em;
}

/* ---------- Formular „Vertrag widerrufen“ (inc/widerruf.php) ---------- */

.tl-widerruf {
	max-width: 36rem;
}

.tl-widerruf__field label {
	display: block;
	margin-bottom: 0.25em;
	font-weight: 700;
}

.tl-widerruf__field :is(input, textarea) {
	box-sizing: border-box;
	width: 100%;
	padding: 0.6em 0.75em;
	border: 1px solid #d9d2bf;
	border-radius: 8px;
	background: var(--wp--preset--color--base, #fff);
	color: inherit;
	font: inherit;
}

.tl-widerruf__hint {
	font-size: var(--wp--preset--font-size--small);
}

/* Spam-Falle für Bots, für Menschen unsichtbar. */
.tl-widerruf__hp {
	position: absolute;
	left: -9999px;
}

.tl-widerruf__notice {
	max-width: 36rem;
	padding: 0.75em 1em;
	border-radius: 16px;
	background: var(--wp--preset--color--cream);
}

.tl-widerruf__notice--error {
	border: 2px solid #b4190f;
}

/* ---------- Footer ---------- */

.tl-footer a {
	color: inherit;
}
