/*
 * TVV Vereinsportal – gemeinsames CSS für Kern und Module.
 * Alles ist unter .tvv-app gekapselt, damit Theme (Hello Elementor) und Elementor nichts verstellen.
 */

@font-face {
	font-family: "TVV Montserrat";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2");
}
@font-face {
	font-family: "TVV Montserrat";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/montserrat-latin-600-normal.woff2") format("woff2");
}
@font-face {
	font-family: "TVV Montserrat";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2");
}

.tvv-app {
	--tvv-green-dark: #025f27;
	--tvv-green: #009640;
	--tvv-tint: #e8f4ec;
	--tvv-tint-soft: #f6faf7;
	--tvv-dash: #8fb59c;
	--tvv-bg: #f3f5f8;
	--tvv-text: #333333;
	--tvv-muted: #5a6470;
	--tvv-border: #b9c3ce;
	--tvv-border-soft: #d5dce3;
	--tvv-seg: #e9edf1;
	--tvv-error: #b42318;
	--tvv-error-bg: #fdecea;
	--tvv-warn-bg: #fff6e0;
	--tvv-card: #ffffff;
	--tvv-radius-card: 8px;
	--tvv-radius-input: 6px;
	--tvv-radius-btn: 4px;
	--tvv-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	--tvv-font-head: "TVV Montserrat", Montserrat, sans-serif;
	--tvv-font-body: -apple-system, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
	--tvv-focus: 0 0 0 3px rgba(0, 150, 64, 0.35);

	box-sizing: border-box;
	width: 100%;
	background: var(--tvv-bg);
	color: var(--tvv-text);
	font: 400 16px/1.5 var(--tvv-font-body);
	-webkit-font-smoothing: antialiased;
	text-align: left;
}
.tvv-app *,
.tvv-app *::before,
.tvv-app *::after {
	box-sizing: border-box;
}
.tvv-app [hidden] {
	display: none !important;
}
.tvv-app .tvv-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 32px 20px 48px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.tvv-app a {
	color: var(--tvv-green-dark);
}
.tvv-app a:hover,
.tvv-app a:focus {
	color: var(--tvv-green);
}
.tvv-app :focus-visible {
	outline: 3px solid var(--tvv-green);
	outline-offset: 2px;
}
.tvv-app .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.tvv-app h1,
.tvv-app h2,
.tvv-app h3,
.tvv-app p,
.tvv-app ol,
.tvv-app ul {
	margin: 0;
}
.tvv-app .tvv-icon {
	flex: none;
	display: block;
}

/* ---------- Typo ---------- */
.tvv-app .tvv-h2 {
	font: 700 20px/1.25 var(--tvv-font-head);
	color: var(--tvv-green-dark);
	letter-spacing: 0;
	text-transform: none;
}
.tvv-app .tvv-h3 {
	font: 700 16px/1.3 var(--tvv-font-head);
	color: var(--tvv-text);
	text-transform: uppercase;
}
.tvv-app .tvv-upper {
	text-transform: uppercase;
}
.tvv-app .tvv-eyebrow {
	font: 600 13px/1.3 var(--tvv-font-head);
	color: var(--tvv-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
.tvv-app .tvv-text {
	font: 400 15px/1.55 var(--tvv-font-body);
}
.tvv-app .tvv-note {
	font: 400 13px/1.5 var(--tvv-font-body);
	color: var(--tvv-muted);
}
.tvv-app .tvv-intro {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.tvv-app .tvv-intro__title {
	font: 700 clamp(22px, 3vw, 28px)/1.2 var(--tvv-font-head);
	color: var(--tvv-green-dark);
	text-transform: uppercase;
}
.tvv-app .tvv-intro__sub {
	font: 500 17px/1.4 var(--tvv-font-head);
	color: var(--tvv-text);
}

/* ---------- Buttons (vollständig zurückgesetzt gegen Theme-Styles) ---------- */
.tvv-app .tvv-btn,
.tvv-app .tvv-btn:hover,
.tvv-app .tvv-btn:focus,
.tvv-app .tvv-btn:active {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 0 18px;
	margin: 0;
	border: 2px solid var(--tvv-green-dark);
	border-radius: var(--tvv-radius-btn);
	background: var(--tvv-green-dark);
	color: #ffffff;
	font: 700 14px/1.2 var(--tvv-font-head);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	text-decoration: none;
	text-align: center;
	box-shadow: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.tvv-app .tvv-btn:hover {
	background: #014a1e;
	border-color: #014a1e;
	color: #ffffff;
}
.tvv-app .tvv-btn:focus-visible {
	outline: 3px solid var(--tvv-green);
	outline-offset: 2px;
}
.tvv-app .tvv-btn--lg,
.tvv-app .tvv-btn--lg:hover {
	min-height: 52px;
	font-size: 15px;
}
.tvv-app .tvv-btn--block,
.tvv-app .tvv-btn--block:hover {
	display: flex;
	width: 100%;
}
.tvv-app .tvv-btn--outline,
.tvv-app .tvv-btn--outline:focus,
.tvv-app .tvv-btn--outline:active {
	background: #ffffff;
	color: var(--tvv-green-dark);
	border-color: var(--tvv-green-dark);
}
.tvv-app .tvv-btn--outline:hover {
	background: var(--tvv-tint);
	color: var(--tvv-green-dark);
	border-color: var(--tvv-green-dark);
}
.tvv-app .tvv-btn--light,
.tvv-app .tvv-btn--light:focus,
.tvv-app .tvv-btn--light:active {
	background: #ffffff;
	color: var(--tvv-green-dark);
	border-color: #ffffff;
}
.tvv-app .tvv-btn--light:hover {
	background: var(--tvv-tint);
	border-color: var(--tvv-tint);
	color: var(--tvv-green-dark);
}
.tvv-app .tvv-btn--danger,
.tvv-app .tvv-btn--danger:focus {
	background: #ffffff;
	color: var(--tvv-error);
	border-color: var(--tvv-error);
}
.tvv-app .tvv-btn--danger:hover {
	background: var(--tvv-error-bg);
	color: var(--tvv-error);
	border-color: var(--tvv-error);
}
.tvv-app .tvv-btn[disabled],
.tvv-app .tvv-btn[disabled]:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: transparent;
	color: #e6f0ea;
	cursor: not-allowed;
}
.tvv-app .tvv-btn--primary[disabled],
.tvv-app .tvv-btn--primary[disabled]:hover,
.tvv-app .tvv-btn--outline[disabled],
.tvv-app .tvv-btn--outline[disabled]:hover {
	background: #c9d1d9;
	border-color: #c9d1d9;
	color: #ffffff;
}
.tvv-app .tvv-btn.is-busy {
	opacity: 0.75;
	cursor: progress;
}

.tvv-app .tvv-linkbtn,
.tvv-app .tvv-linkbtn:hover,
.tvv-app .tvv-linkbtn:focus,
.tvv-app .tvv-back,
.tvv-app .tvv-back:hover {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 4px;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--tvv-green-dark);
	font: 600 14px/1.2 var(--tvv-font-head);
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}
.tvv-app .tvv-linkbtn:hover,
.tvv-app .tvv-back:hover {
	color: var(--tvv-green);
	text-decoration: underline;
}

.tvv-app .tvv-iconbtn,
.tvv-app .tvv-iconbtn:hover,
.tvv-app .tvv-iconbtn:focus {
	-webkit-appearance: none;
	appearance: none;
	width: 44px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: var(--tvv-radius-input);
	background: transparent;
	box-shadow: none;
	color: var(--tvv-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.tvv-app .tvv-iconbtn:hover {
	background: var(--tvv-seg);
	color: var(--tvv-error);
}

/* ---------- Ansichten (Router) ---------- */
.tvv-app .tvv-route,
.tvv-app .tvv-gated,
.tvv-app .tvv-appview {
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}
.tvv-app .tvv-route h2:focus,
.tvv-app .tvv-route h3:focus {
	outline: none;
}

/* ---------- Leiste über dem Inhalt ---------- */
.tvv-app .tvv-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: -12px 0 -6px;
}

/* ---------- Karten ---------- */
.tvv-app .tvv-card {
	background: var(--tvv-card);
	border-radius: var(--tvv-radius-card);
	box-shadow: var(--tvv-shadow);
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
}
.tvv-app .tvv-card--accent {
	border-top: 4px solid var(--tvv-green);
}
.tvv-app .tvv-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
}
.tvv-app .tvv-badge-icon {
	flex: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--tvv-tint);
	color: var(--tvv-green-dark);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Kacheln ---------- */
.tvv-app .tvv-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 20px;
}
.tvv-app .tvv-tile {
	background: var(--tvv-card);
	border-radius: var(--tvv-radius-card);
	border-top: 4px solid var(--tvv-green);
	box-shadow: var(--tvv-shadow);
	padding: 28px 24px;
	text-decoration: none;
	color: var(--tvv-text);
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-height: 230px;
	transition: box-shadow 0.15s, transform 0.15s;
}
.tvv-app a.tvv-tile:hover,
.tvv-app a.tvv-tile:focus-visible {
	color: var(--tvv-text);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}
.tvv-app a.tvv-tile:hover .tvv-tile__btn {
	background: #014a1e;
	border-color: #014a1e;
}
.tvv-app .tvv-tile__icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--tvv-green-dark);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}
.tvv-app .tvv-tile__icon svg {
	width: 28px;
	height: 28px;
	stroke: #ffffff;
}
.tvv-app .tvv-tile__title {
	font: 700 19px/1.25 var(--tvv-font-head);
	overflow-wrap: break-word;
	hyphens: auto;
	color: var(--tvv-green-dark);
	text-transform: uppercase;
}
.tvv-app .tvv-tile__text {
	font: 400 15px/1.5 var(--tvv-font-body);
}
.tvv-app .tvv-tile__btn {
	margin-top: auto;
	align-self: flex-start;
	min-height: 44px;
}
.tvv-app .tvv-tile--more {
	background: transparent;
	border: 2px dashed var(--tvv-border);
	box-shadow: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	color: var(--tvv-muted);
}
.tvv-app .tvv-tile--more .tvv-tile__title {
	font-size: 16px;
	color: var(--tvv-muted);
}
.tvv-app .tvv-tile--more .tvv-tile__text {
	font-size: 14px;
}

/* ---------- Zugang ---------- */
.tvv-app .tvv-gate {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: flex-start;
}
.tvv-app .tvv-gate__card {
	flex: 1 1 340px;
	max-width: 520px;
	padding: 28px;
}
.tvv-app .tvv-steps {
	flex: 1 1 300px;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 8px 4px;
}
.tvv-app .tvv-steps__list {
	list-style: none;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.tvv-app .tvv-steps__list li {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	font: 400 15px/1.5 var(--tvv-font-body);
	margin: 0;
}
.tvv-app .tvv-steps__list li > span:last-child {
	padding-top: 6px;
}
.tvv-app .tvv-steps__n {
	flex: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--tvv-green-dark);
	color: #ffffff;
	font: 700 15px var(--tvv-font-head);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ---------- Formulare ---------- */
.tvv-app .tvv-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.tvv-app .tvv-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}
.tvv-app .tvv-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.tvv-app .tvv-row > .tvv-field {
	flex: 1 1 240px;
}
.tvv-app .tvv-row > .tvv-field--s {
	flex: 1 1 150px;
}
.tvv-app .tvv-row > .tvv-field--xs {
	flex: 1 1 130px;
}
.tvv-app .tvv-row > .tvv-field--l {
	flex: 3 1 260px;
}
.tvv-app .tvv-label {
	font: 600 14px/1.3 var(--tvv-font-head);
	color: var(--tvv-text);
	margin: 0;
	text-transform: none;
}
.tvv-app .tvv-label .tvv-req {
	color: var(--tvv-error);
}
.tvv-app .tvv-input,
.tvv-app .tvv-input:focus,
.tvv-app .tvv-select,
.tvv-app .tvv-select:focus,
.tvv-app .tvv-textarea,
.tvv-app .tvv-textarea:focus {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 10px 12px;
	border: 1px solid var(--tvv-border);
	border-radius: var(--tvv-radius-input);
	background: #ffffff;
	color: var(--tvv-text);
	font: 400 16px/1.4 var(--tvv-font-body);
	box-shadow: none;
}
.tvv-app .tvv-input:focus,
.tvv-app .tvv-select:focus,
.tvv-app .tvv-textarea:focus {
	border-color: var(--tvv-green);
	box-shadow: var(--tvv-focus);
	outline: none;
}
.tvv-app .tvv-input--lg {
	min-height: 50px;
	padding: 10px 14px;
	font-size: 17px;
}
.tvv-app .tvv-select {
	padding-right: 40px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235A6470' stroke-width='2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}
.tvv-app .tvv-textarea {
	min-height: 110px;
	resize: vertical;
}
.tvv-app .tvv-input[readonly] {
	background: var(--tvv-bg);
}
.tvv-app .is-invalid .tvv-input,
.tvv-app .is-invalid .tvv-select,
.tvv-app .tvv-input.is-invalid {
	border-color: var(--tvv-error);
}
.tvv-app .tvv-field-error {
	font: 400 13px/1.4 var(--tvv-font-body);
	color: var(--tvv-error);
}
.tvv-app .tvv-check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	font: 400 15px/1.45 var(--tvv-font-body);
	cursor: pointer;
}
.tvv-app .tvv-check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--tvv-green-dark);
}

/* Umschalter (Segmented Control) */
.tvv-app .tvv-seg {
	display: flex;
	gap: 4px;
	background: var(--tvv-seg);
	border-radius: var(--tvv-radius-input);
	padding: 4px;
	border: 0;
	margin: 0;
	min-width: 0;
}
.tvv-app .tvv-seg--wide {
	max-width: 420px;
}
.tvv-app .tvv-seg legend {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}
.tvv-app .tvv-seg label {
	flex: 1;
	position: relative;
	margin: 0;
}
.tvv-app .tvv-seg input {
	position: absolute;
	opacity: 0;
	inset: 0;
	margin: 0;
	cursor: pointer;
}
.tvv-app .tvv-seg span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 0 14px;
	border-radius: var(--tvv-radius-btn);
	font: 600 14px/1.2 var(--tvv-font-head);
	color: var(--tvv-text);
	white-space: nowrap;
	cursor: pointer;
}
.tvv-app .tvv-seg input:checked + span {
	background: var(--tvv-green-dark);
	color: #ffffff;
	font-weight: 700;
}
.tvv-app .tvv-seg input:focus-visible + span {
	outline: 3px solid var(--tvv-green);
	outline-offset: 1px;
}

/* ---------- Hinweise ---------- */
.tvv-app .tvv-alert {
	border-radius: var(--tvv-radius-input);
	padding: 12px 14px;
	font: 400 14px/1.5 var(--tvv-font-body);
	display: flex;
	gap: 10px;
	align-items: flex-start;
}
.tvv-app .tvv-alert--error {
	background: var(--tvv-error-bg);
	color: var(--tvv-error);
}
.tvv-app .tvv-alert--info {
	background: var(--tvv-tint);
	color: var(--tvv-text);
}
.tvv-app .tvv-alert--warn {
	background: var(--tvv-warn-bg);
	color: #7a4b00;
}

.tvv-app .tvv-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 40px 0;
	color: var(--tvv-muted);
	font: 500 15px var(--tvv-font-head);
	justify-content: center;
}
.tvv-app .tvv-spinner {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 3px solid var(--tvv-seg);
	border-top-color: var(--tvv-green);
	animation: tvv-spin 0.8s linear infinite;
	display: inline-block;
	flex: none;
}
@keyframes tvv-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tvv-app *,
	.tvv-app *::before,
	.tvv-app *::after {
		animation: none !important;
		transition: none !important;
	}
}

@media (max-width: 600px) {
	.tvv-app .tvv-wrap {
		padding: 24px 16px 40px;
	}
	.tvv-app .tvv-card {
		padding: 20px 16px;
	}
	.tvv-app .tvv-gate__card {
		padding: 22px 18px;
	}
}
