/**
 * Registrační formulář festivalu.
 * Styly jsou záměrně samonosné, aby formulář vypadal stejně v jakémkoli tématu.
 */

/* Kotva pro odkaz z hlavičky — aby nadpis neskončil pod lištou menu. */
#registrace {
	scroll-margin-top: 100px;
}

/* --- Plakáty nad formulářem ----------------------------------------------- */

.fest-plakaty {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 22px;
	max-width: 940px;
	margin: 0 auto 34px;
}

.fest-plakaty img {
	flex: 1 1 300px;
	max-width: 440px;
	height: auto;
	border-radius: 10px;
	box-shadow: 0 3px 18px rgba(0, 0, 0, 0.14);
}

/* Na úzkém displeji jde plakát pod plakát a využije celou šířku. */
@media (max-width: 640px) {
	.fest-plakaty {
		gap: 16px;
	}

	.fest-plakaty img {
		flex-basis: 100%;
		max-width: 100%;
	}
}

.fest-wrap {
	--fest-barva: #b3541e;
	--fest-barva-tmava: #7d3a12;
	--fest-text: #22201d;
	--fest-slaby: #6d675f;
	--fest-ram: #e2ddd4;
	--fest-podklad: #fdfbf7;

	max-width: 780px;
	margin: 0 auto;
	padding: 8px 0 40px;
	color: var(--fest-text);
	font-size: 16px;
	line-height: 1.55;
	box-sizing: border-box;
}

.fest-wrap *,
.fest-wrap *::before,
.fest-wrap *::after {
	box-sizing: inherit;
}

/* --- Krabice se zprávami -------------------------------------------------- */

.fest-box {
	padding: 18px 22px;
	border-radius: 10px;
	margin-bottom: 24px;
	border: 1px solid var(--fest-ram);
	background: var(--fest-podklad);
}

.fest-box.fest-error {
	border-color: #e3b3b3;
	background: #fdf3f3;
}

.fest-box.fest-success {
	border-color: #b6d7b9;
	background: #f2f9f2;
}

.fest-box.fest-closed {
	text-align: center;
	font-size: 18px;
}

.fest-box ul {
	margin: 8px 0 0;
	padding-left: 20px;
}

.fest-box h3 {
	margin: 0 0 8px;
}

/* --- Důležité informace nad formulářem ------------------------------------ */

.fest-info {
	margin-bottom: 26px;
	padding: 18px 22px;
	border: 1px solid #e8d9b8;
	border-left: 4px solid #d9a441;
	border-radius: 10px;
	background: #fdf8ee;
}

.fest-info h4 {
	margin: 0 0 10px;
	font-size: 16px;
}

.fest-info ul {
	margin: 0;
	padding-left: 20px;
}

.fest-info li + li {
	margin-top: 7px;
}

/* Krátká poznámka uvnitř kroku. */
.fest-hint {
	margin: 0 0 18px;
	padding: 10px 14px;
	border-radius: 8px;
	background: #f6f3ec;
	font-size: 14px;
	color: #5a544b;
}

/* --- Ukazatel kroků ------------------------------------------------------- */

.fest-steps {
	display: flex;
	gap: 8px;
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	counter-reset: none;
}

.fest-steps li {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f2efe9;
	color: var(--fest-slaby);
	font-size: 14px;
	font-weight: 600;
}

.fest-steps li span {
	display: grid;
	place-items: center;
	width: 24px;
	height: 24px;
	flex: 0 0 24px;
	border-radius: 50%;
	background: #ddd7cc;
	color: #fff;
}

.fest-steps li.is-active {
	background: var(--fest-barva);
	color: #fff;
}

.fest-steps li.is-active span {
	background: rgba(255, 255, 255, 0.35);
}

.fest-steps li.is-done span {
	background: var(--fest-barva);
	color: #fff;
}

/* --- Kroky ---------------------------------------------------------------- */

.fest-step {
	display: none;
}

.fest-step.is-active {
	display: block;
}

.fest-step h3 {
	margin: 0 0 20px;
	font-size: 22px;
}

/* --- Pole ----------------------------------------------------------------- */

.fest-row {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.fest-row .fest-field {
	flex: 1 1 220px;
}

.fest-field {
	display: block;
	margin-bottom: 16px;
}

.fest-field > span {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.fest-field em {
	color: var(--fest-barva);
	font-style: normal;
}

.fest-field input,
.fest-field select,
.fest-field textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid var(--fest-ram);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	color: inherit;
}

.fest-field input:focus,
.fest-field select:focus,
.fest-field textarea:focus {
	outline: 2px solid var(--fest-barva);
	outline-offset: 1px;
	border-color: var(--fest-barva);
}

.is-invalid,
.fest-tickets.is-invalid,
.fest-fieldset.is-invalid {
	border-color: #c0392b !important;
	background: #fdf6f5;
}

/* --- Skupiny -------------------------------------------------------------- */

.fest-fieldset {
	margin: 0 0 22px;
	padding: 16px 18px;
	border: 1px solid var(--fest-ram);
	border-radius: 10px;
}

.fest-fieldset legend {
	padding: 0 8px;
	font-size: 14px;
	font-weight: 700;
}

.fest-sublegend {
	margin: 4px 0 2px;
	font-size: 13px;
	font-weight: 600;
	color: var(--fest-slaby);
}

.fest-sublegend em {
	color: var(--fest-barva);
	font-style: normal;
}

/* Výběr nocí se odkryje, až si účastník zvolí, kde přespí. */
.fest-noci {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--fest-ram);
}

.fest-noci.is-invalid {
	border-radius: 6px;
	padding: 8px 10px;
}

.fest-check small {
	color: var(--fest-slaby);
}

.fest-noc-hint {
	font-style: italic;
}

.fest-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 7px 0;
	cursor: pointer;
}

.fest-check input {
	margin-top: 4px;
	flex: 0 0 auto;
}

.fest-check.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.fest-check em {
	color: #c0392b;
	font-style: normal;
	font-size: 13px;
}

/* --- Vstupenky ------------------------------------------------------------ */

.fest-tickets {
	display: grid;
	gap: 12px;
	margin-bottom: 24px;
	padding: 2px;
	border-radius: 10px;
}

.fest-ticket {
	display: flex;
	gap: 12px;
	padding: 16px 18px;
	border: 1px solid var(--fest-ram);
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.fest-ticket:hover {
	border-color: var(--fest-barva);
}

.fest-ticket:has(input:checked) {
	border-color: var(--fest-barva);
	background: #fdf6f1;
	box-shadow: inset 0 0 0 1px var(--fest-barva);
}

.fest-ticket input {
	margin-top: 5px;
	flex: 0 0 auto;
}

.fest-ticket-body {
	display: block;
}

.fest-ticket-body strong {
	display: block;
	font-size: 17px;
	letter-spacing: 0.02em;
}

.fest-ticket-price {
	display: block;
	margin: 2px 0 6px;
	color: var(--fest-barva-tmava);
	font-weight: 600;
}

.fest-ticket-perks {
	display: block;
	font-size: 14px;
	color: var(--fest-slaby);
}

/* --- Shrnutí -------------------------------------------------------------- */

.fest-summary {
	width: 100%;
	margin-bottom: 22px;
	border-collapse: collapse;
}

.fest-summary th,
.fest-summary td {
	padding: 11px 4px;
	text-align: left;
	border-bottom: 1px solid var(--fest-ram);
	font-weight: 400;
}

.fest-summary td {
	text-align: right;
	white-space: nowrap;
}

.fest-summary tfoot th,
.fest-summary tfoot td {
	padding-top: 14px;
	border-bottom: none;
	font-size: 19px;
	font-weight: 700;
}

.fest-consent {
	padding: 14px 16px;
	border: 1px solid var(--fest-ram);
	border-radius: 10px;
	background: var(--fest-podklad);
}

.fest-note {
	margin: 14px 0 0;
	font-size: 14px;
	color: var(--fest-slaby);
}

/* --- Tlačítka ------------------------------------------------------------- */

.fest-nav {
	display: flex;
	gap: 12px;
	margin-top: 26px;
}

.fest-btn {
	padding: 13px 26px;
	border: 1px solid var(--fest-barva);
	border-radius: 8px;
	background: var(--fest-barva);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.fest-btn:hover {
	background: var(--fest-barva-tmava);
	border-color: var(--fest-barva-tmava);
}

.fest-btn.fest-ghost {
	background: transparent;
	color: var(--fest-barva);
}

.fest-btn.fest-ghost:hover {
	background: #fdf6f1;
}

.fest-submit {
	margin-left: auto;
}

/* --- Poznámka o rozepsaném formuláři -------------------------------------- */

.fest-storage-note {
	margin: 20px 0 0;
	font-size: 13px;
	color: var(--fest-slaby);
	text-align: center;
}

.fest-clear-draft {
	padding: 0;
	border: none;
	background: none;
	font: inherit;
	color: var(--fest-barva);
	text-decoration: underline;
	cursor: pointer;
}

/* --- Honeypot ------------------------------------------------------------- */

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

/* --- Platba --------------------------------------------------------------- */

.fest-payment {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
	align-items: flex-start;
	padding: 24px;
	border: 1px solid var(--fest-ram);
	border-radius: 12px;
	background: var(--fest-podklad);
}

.fest-payment-qr {
	flex: 0 0 240px;
	text-align: center;
}

.fest-payment-qr svg {
	width: 100%;
	height: auto;
	max-width: 240px;
	background: #fff;
	border-radius: 8px;
}

.fest-payment-info {
	flex: 1 1 260px;
}

.fest-payment-info h4 {
	margin: 0 0 8px;
	font-size: 16px;
}

.fest-payment-info h4 + dl {
	margin-bottom: 22px;
}

.fest-payment-info dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px 16px;
	margin: 0;
}

.fest-payment-info dt {
	color: var(--fest-slaby);
	font-size: 14px;
}

.fest-payment-info dd {
	margin: 0;
	text-align: right;
}

@media (max-width: 640px) {
	.fest-steps {
		font-size: 0;
		gap: 6px;
	}

	.fest-steps li span {
		font-size: 14px;
	}

	.fest-payment {
		padding: 18px;
	}

	.fest-payment-qr {
		flex-basis: 100%;
	}
}
