/* Tankkarten-Rechner — Frontend
   Schrift wird vom Theme geerbt. Farben über --atr-accent steuerbar. */

.atr {
	--atr-line: #e3e6ea;
	--atr-bg: #f7f8fa;
	--atr-muted: #6b7580;
	--atr-dark: #1f2933;
	--atr-plus: #17803d;
	--atr-minus: #b4232c;
	font-size: 16px;
	line-height: 1.5;
	color: inherit;
}

.atr *,
.atr *::before,
.atr *::after {
	box-sizing: border-box;
}

.atr__title {
	margin: 0 0 8px;
}

.atr__intro {
	margin: 0 0 24px;
	color: var(--atr-muted);
	max-width: 62ch;
}

.atr__layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: start;
}

@media (min-width: 860px) {
	.atr__layout {
		grid-template-columns: 1.15fr 1fr;
		gap: 32px;
	}
}

/* ---------- Eingaben ---------- */

.atr__group {
	border: 1px solid var(--atr-line);
	border-radius: 8px;
	padding: 16px 18px 18px;
	margin: 0 0 16px;
}

.atr__legend {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--atr-muted);
	padding: 0 6px;
	margin-left: -6px;
}

.atr__field + .atr__field {
	margin-top: 14px;
}

.atr__label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
}

.atr__unit {
	font-weight: 400;
	color: var(--atr-muted);
}

.atr__unit::before {
	content: "(";
}

.atr__unit::after {
	content: ")";
}

.atr__input {
	width: 100%;
	padding: 9px 12px;
	font-size: 16px;
	font-family: inherit;
	color: inherit;
	background: #fff;
	border: 1px solid var(--atr-line);
	border-radius: 6px;
	appearance: textfield;
	-moz-appearance: textfield;
}

.atr__input:focus {
	outline: 2px solid var(--atr-accent);
	outline-offset: 1px;
	border-color: var(--atr-accent);
}

.atr__input.is-invalid {
	border-color: var(--atr-minus);
}

.atr__hint {
	display: block;
	font-size: 13px;
	color: var(--atr-muted);
	margin-top: 4px;
}

.atr__reset {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-size: 14px;
	color: var(--atr-muted);
	text-decoration: underline;
	cursor: pointer;
}

.atr__reset:hover {
	color: var(--atr-accent);
}

/* ---------- Ergebnis ---------- */

.atr__results {
	background: var(--atr-bg);
	border: 1px solid var(--atr-line);
	border-radius: 8px;
	padding: 22px;
}

.atr__headline {
	text-align: center;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--atr-line);
	margin-bottom: 16px;
}

.atr__headline-label {
	display: block;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--atr-muted);
	margin-bottom: 6px;
}

.atr__headline-value {
	display: block;
	font-size: 38px;
	line-height: 1.1;
	font-weight: 700;
	color: var(--atr-accent);
	font-variant-numeric: tabular-nums;
}

.atr__headline-value.is-negative {
	color: var(--atr-minus);
}

.atr__headline-sub {
	display: block;
	font-size: 14px;
	color: var(--atr-muted);
	margin-top: 6px;
}

.atr__breakdown {
	margin: 0;
}

.atr__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 7px 0;
	font-size: 15px;
}

.atr__row dt {
	margin: 0;
	color: var(--atr-muted);
}

.atr__row dd {
	margin: 0;
	font-weight: 600;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.atr__row--plus dd {
	color: var(--atr-plus);
}

.atr__row--minus dd {
	color: var(--atr-minus);
}

.atr__row--total {
	border-top: 1px solid var(--atr-line);
	margin-top: 8px;
	padding-top: 12px;
}

.atr__row--total dt {
	color: var(--atr-dark);
	font-weight: 600;
}

.atr__cta {
	display: block;
	margin-top: 20px;
	padding: 13px 18px;
	text-align: center;
	background: var(--atr-accent);
	color: #fff;
	font-weight: 600;
	border-radius: 6px;
	text-decoration: none;
}

.atr__cta:hover,
.atr__cta:focus {
	color: #fff;
	filter: brightness(0.92);
}

.atr__note {
	margin: 16px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: var(--atr-muted);
}

@media (prefers-reduced-motion: no-preference) {
	.atr__headline-value {
		transition: color 0.2s ease;
	}
}

/* ---------- Anforderungsformular ---------- */

.atr__form {
	margin-top: 22px;
	padding-top: 20px;
	border-top: 1px solid var(--atr-line);
}

.atr__form.is-sent .atr__field,
.atr__form.is-sent .atr__consent,
.atr__form.is-sent .atr__submit {
	display: none;
}

.atr__form-title {
	margin: 0 0 6px;
	font-size: 17px;
	line-height: 1.3;
}

.atr__form-intro {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--atr-muted);
}

.atr__consent {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-top: 12px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--atr-muted);
	cursor: pointer;
}

.atr__consent input[type="checkbox"] {
	flex: 0 0 auto;
	margin-top: 2px;
	width: 16px;
	height: 16px;
	accent-color: var(--atr-accent);
}

.atr__consent a {
	color: inherit;
	text-decoration: underline;
}

/* Honeypot: für Menschen unsichtbar, aber nicht per display:none,
   damit einfache Bots ihn dennoch ausfüllen. */
.atr__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.atr__submit {
	display: block;
	width: 100%;
	margin-top: 18px;
	padding: 13px 18px;
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--atr-accent);
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

.atr__submit:hover:not(:disabled) {
	filter: brightness(0.92);
}

.atr__submit:disabled {
	opacity: 0.6;
	cursor: default;
}

.atr__form-msg {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.45;
}

.atr__form-msg:empty {
	margin: 0;
}

.atr__form-msg.is-ok {
	color: var(--atr-plus);
	font-weight: 600;
}

.atr__form-msg.is-error {
	color: var(--atr-minus);
}

.atr__form-legal {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--atr-muted);
}

.atr__form-legal a {
	color: inherit;
	text-decoration: underline;
}
