/*
 * Registration form. Colors and fonts come from CSS variables that the plugin sets from its
 * settings on .r15t-form (--r15t-farbe-akzent, --r15t-farbe-text, --r15t-schrift,
 * --r15t-schrift-titel). The values follow the conference site: red accent, dark grey text,
 * Futura, round buttons and large corner radii.
 */
.r15t-form {
	--r15t-farbe-akzent: #ca1105;
	--r15t-farbe-text: #343434;
	--r15t-schrift: inherit;
	--r15t-schrift-titel: var(--r15t-schrift);
	--r15t-farbe-akzent-dunkel: color-mix(in srgb, var(--r15t-farbe-akzent) 80%, #000);
	--r15t-farbe-flaeche: #fff;
	--r15t-farbe-linie: color-mix(in srgb, var(--r15t-farbe-text) 25%, #fff);
	--r15t-farbe-fehler: #b00020;
	--r15t-radius: 20px;

	box-sizing: border-box;
	max-width: 760px;
	margin: 0 auto;
	color: var(--r15t-farbe-text);
	font-family: var(--r15t-schrift);
	font-size: 1.0625rem;
	line-height: 1.5;
}

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

.r15t-form h2,
.r15t-form h3 {
	margin: 0 0 1rem;
	font-family: var(--r15t-schrift-titel);
	font-weight: 700;
	line-height: 1.15;
	color: var(--r15t-farbe-text);
}

.r15t-form h2 {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.r15t-form h3 {
	font-size: 1.25rem;
}

/* Sub-headings inside a step: Essen, Teilnahme am Programm, Zusatzoptionen, Barrierefreiheit.
   A line separates the groups: Essen | Teilnahme und Optionen | Barrierefreiheit. */
.r15t-form h3.r15t-section {
	margin: 2rem 0 0.75rem;
	padding-top: 1rem;
	border-top: 2px solid var(--r15t-farbe-linie);
}

.r15t-form h3.r15t-section:first-of-type {
	margin-top: 1rem;
	padding-top: 0;
	border-top: 0;
}

.r15t-group {
	margin: 2rem 0 0;
	padding-top: 1rem;
	border-top: 2px solid var(--r15t-farbe-linie);
}

.r15t-form h3.r15t-plain {
	margin: 0 0 0.75rem;
}

/* The legend of the options is a sub-heading like the others, without a line. */
.r15t-field.r15t-options > legend {
	margin: 1.5rem 0 0.5rem;
	padding: 0;
	font-family: var(--r15t-schrift-titel);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.15;
	width: 100%;
}

.r15t-form h2:focus {
	outline: none;
}

/* Themes and the Elementor kit set display on buttons and sections, which would override the
   browser rule for the hidden attribute and show every button at once. */
.r15t-form [hidden] {
	display: none !important;
}

.r15t-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.r15t-honey {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Progress */
.r15t-progress {
	display: flex;
	gap: 0.5rem;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
	counter-reset: r15t-step;
}

.r15t-progress li {
	flex: 1;
	padding-top: 0.75rem;
	border-top: 4px solid var(--r15t-farbe-linie);
	font-size: 0.875rem;
	counter-increment: r15t-step;
}

.r15t-progress li::before {
	content: counter(r15t-step) ". ";
	font-weight: 700;
}

.r15t-progress li.is-done,
.r15t-progress li.is-current {
	border-top-color: var(--r15t-farbe-akzent);
}

.r15t-progress li.is-current {
	font-weight: 700;
}

/* Fields */
.r15t-field {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
}

.r15t-field:not(.r15t-consent) > label:not(.r15t-card):not(.r15t-inline),
.r15t-field > legend {
	display: block;
	margin-bottom: 0.375rem;
	padding: 0;
	font-weight: 500;
}

.r15t-req {
	color: var(--r15t-farbe-akzent);
}

.r15t-form input[type="text"],
.r15t-form input[type="email"],
.r15t-form input[type="tel"],
.r15t-form select,
.r15t-form textarea {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0.625rem 1rem;
	border: 2px solid var(--r15t-farbe-linie);
	border-radius: 14px;
	background: var(--r15t-farbe-flaeche);
	color: var(--r15t-farbe-text);
	font: inherit;
}

.r15t-form textarea {
	min-height: 96px;
	resize: vertical;
}

.r15t-form input:focus-visible,
.r15t-form select:focus-visible,
.r15t-form textarea:focus-visible,
.r15t-btn:focus-visible,
.r15t-link:focus-visible,
.r15t-card:has(input:focus-visible) {
	outline: 3px solid var(--r15t-farbe-text);
	outline-offset: 2px;
}

.r15t-has-error input:not([type="radio"]):not([type="checkbox"]),
.r15t-has-error select,
.r15t-has-error textarea {
	border-color: var(--r15t-farbe-fehler);
}

.r15t-error {
	margin: 0.375rem 0 0;
	color: var(--r15t-farbe-fehler);
	font-size: 0.9375rem;
	font-weight: 500;
}

.r15t-hint {
	margin: 0 0 1.25rem;
	font-size: 0.9375rem;
	opacity: 0.85;
}

.r15t-alert:empty {
	display: none;
}

.r15t-alert {
	margin: 0 0 1.5rem;
	padding: 0.875rem 1.125rem;
	border: 2px solid var(--r15t-farbe-fehler);
	border-radius: 14px;
	background: var(--r15t-farbe-flaeche);
	color: var(--r15t-farbe-fehler);
	font-weight: 500;
}

/* Radios and checkboxes */
.r15t-inline,
.r15t-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.625rem;
	margin: 0 1.5rem 0.5rem 0;
	cursor: pointer;
}

.r15t-radios .r15t-inline {
	display: inline-flex;
}

.r15t-form input[type="radio"],
.r15t-form input[type="checkbox"] {
	flex: none;
	width: 1.375rem;
	height: 1.375rem;
	margin: 0.125rem 0 0;
	accent-color: var(--r15t-farbe-akzent);
}

/* Category cards */
.r15t-cards {
	display: grid;
	gap: 0.875rem;
}

.r15t-card {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr auto;
	column-gap: 0.875rem;
	align-items: center;
	padding: 1.125rem 1.25rem;
	border: 2px solid var(--r15t-farbe-linie);
	border-radius: var(--r15t-radius);
	background: var(--r15t-farbe-flaeche);
	cursor: pointer;
}

.r15t-card:has(input:checked) {
	border-color: var(--r15t-farbe-akzent);
	box-shadow: 0 0 0 1px var(--r15t-farbe-akzent);
}

.r15t-card input {
	grid-row: 1 / span 2;
	margin: 0;
}

.r15t-card-title {
	font-family: var(--r15t-schrift-titel);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.25;
}

.r15t-card-text {
	grid-column: 2;
	font-size: 0.9375rem;
	opacity: 0.85;
}

.r15t-card-price {
	grid-column: 3;
	grid-row: 1 / span 2;
	font-weight: 700;
	white-space: nowrap;
}

/* Summary and price */
.r15t-summary-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 1.5rem;
	border-bottom: 2px solid var(--r15t-farbe-linie);
}

.r15t-form dl {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	margin: 0.75rem 0 0;
}

.r15t-form dt {
	margin-top: 0.5rem;
	font-size: 0.875rem;
	opacity: 0.8;
}

.r15t-form dd {
	margin: 0;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

@media (min-width: 640px) {
	.r15t-form dl {
		grid-template-columns: 14rem minmax(0, 1fr);
		column-gap: 1rem;
	}

	.r15t-form dt {
		margin-top: 0.25rem;
	}

	.r15t-form dd {
		margin-top: 0.25rem;
	}
}

.r15t-link {
	padding: 0.25rem 0;
	border: 0;
	background: none;
	color: var(--r15t-farbe-akzent);
	font: inherit;
	font-weight: 500;
	text-decoration: underline;
	cursor: pointer;
}

.r15t-price {
	width: 100%;
	margin: 0 0 1.5rem;
	border-collapse: collapse;
}

.r15t-price th,
.r15t-price td {
	padding: 0.625rem 0;
	border-bottom: 1px solid var(--r15t-farbe-linie);
	text-align: left;
	font-weight: 400;
}

.r15t-price .r15t-amount {
	text-align: right;
	white-space: nowrap;
}

.r15t-price .r15t-total th,
.r15t-price .r15t-total td {
	font-family: var(--r15t-schrift-titel);
	font-size: 1.25rem;
	font-weight: 700;
}

.r15t-consent a,
.r15t-hint a {
	color: var(--r15t-farbe-akzent);
}

/* Buttons: round like the buttons on the conference site */
.r15t-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-end;
	margin-top: 2rem;
}

.r15t-btn {
	min-height: 48px;
	padding: 0.875rem 2rem;
	border: 2px solid var(--r15t-farbe-akzent);
	border-radius: 999px;
	background: var(--r15t-farbe-akzent);
	color: #fff;
	font-family: var(--r15t-schrift);
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
}

.r15t-btn:hover {
	border-color: var(--r15t-farbe-akzent-dunkel);
	background: var(--r15t-farbe-akzent-dunkel);
}

a.r15t-btn {
	display: inline-block;
	text-decoration: none;
}

.r15t-btn-secondary {
	background: transparent;
	color: var(--r15t-farbe-text);
	border-color: var(--r15t-farbe-text);
}

.r15t-btn-secondary:hover {
	background: var(--r15t-farbe-text);
	border-color: var(--r15t-farbe-text);
	color: #fff;
}

.r15t-btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}

.r15t-done {
	padding: 2rem;
	border-radius: var(--r15t-radius);
	background: var(--r15t-farbe-flaeche);
	font-size: 1.125rem;
}

.r15t-done:focus {
	outline: none;
}

@media (max-width: 520px) {
	.r15t-progress li {
		font-size: 0;
	}

	.r15t-progress li::before {
		font-size: 0.875rem;
	}

	.r15t-card {
		grid-template-columns: auto 1fr;
	}

	.r15t-card-price {
		grid-column: 2;
		grid-row: auto;
	}

	.r15t-nav .r15t-btn {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.r15t-form * {
		scroll-behavior: auto;
		transition: none;
	}
}
