/*
 * Ticketsectie [zzhr_tickets] — verzorgde, zelfstandige stijl.
 * Alles is gescoped onder .zzhr-tickets en stuurbaar via CSS-variabelen, zodat
 * het meekleurt met het thema en overschrijfbaar blijft.
 */

.zzhr-tickets {
	--zzhr-accent: #9e645f;
	--zzhr-accent-contrast: #fff;
	--zzhr-accent-soft: rgba( 158, 100, 95, 0.12 );
	--zzhr-accent-strong: #6f443f;
	--zzhr-border: rgba( 0, 0, 0, 0.12 );
	--zzhr-surface: #fff;
	--zzhr-card-bg: rgba( 0, 0, 0, 0.025 );
	--zzhr-muted: #64748b;
	--zzhr-radius: 12px;
	--zzhr-gap: 16px;

	font-family: inherit;
	color: inherit;
	max-width: 720px;
	margin: 0 auto;
}

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

/* Tickettype-kaarten */

.zzhr-types {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.zzhr-type {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --zzhr-gap );
	padding: 16px;
	border: 1px solid var( --zzhr-border );
	border-radius: var( --zzhr-radius );
	background: var( --zzhr-surface );
}

.zzhr-type__info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.zzhr-type__title {
	font-weight: 600;
	font-size: 1.05em;
}

.zzhr-type__desc {
	color: var( --zzhr-muted );
	font-size: 0.9em;
}

.zzhr-type__price {
	font-weight: 600;
	margin-top: 4px;
}

.zzhr-type__price small {
	font-weight: 400;
	color: var( --zzhr-muted );
}

.zzhr-type__max {
	font-size: 0.82em;
	color: var( --zzhr-muted );
}

/* Uitverkocht tickettype: blijft zichtbaar, maar gedimd met een "Volzet"-label. */
.zzhr-type--soldout {
	opacity: 0.6;
}

.zzhr-type__soldout {
	flex: none;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba( 179, 45, 46, 0.1 );
	color: #b32d2e;
	font-weight: 600;
	font-size: 0.9em;
	white-space: nowrap;
}

/* Stepper */

.zzhr-stepper {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
}

.zzhr-step {
	width: auto !important;
	min-width: 0 !important;
	padding: 10px !important;
	border: 1px solid var( --zzhr-border ) !important;
	border-radius: 6px !important;
	background: var( --zzhr-surface ) !important;
	font-size: 20px !important;
	line-height: 1 !important;
	cursor: pointer;
	color: inherit !important;
	transition: border-color 0.15s, background 0.15s;
}

.zzhr-step:hover {
	border-color: var( --zzhr-border );
	background: var( --e-global-color-primary ) !important;
	box-shadow: inset 0 0 0 100px rgba( 0, 0, 0, 0.15 );
	color: #fff !important;
}

.zzhr-qty {
	width: 4em !important;
	padding: 10px !important;
	text-align: center;
	border: 1px solid var( --zzhr-border ) !important;
	border-radius: 6px !important;
	font-size: 1em;
	-moz-appearance: textfield;
}

.zzhr-qty::-webkit-outer-spin-button,
.zzhr-qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Knoppen */

.zzhr-actions {
	margin-top: 20px;
}

.zzhr-open,
.zzhr-submit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto !important;
	padding: 14px 24px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: var( --zzhr-accent );
	color: var( --zzhr-accent-contrast );
	font-size: 1em;
	font-weight: normal !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: all 0.3s;
}

.zzhr-open:hover:not( :disabled ),
.zzhr-submit:hover {
	opacity: 0.9;
}

.zzhr-open:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Externe events: de CTA is een <a> die als knop moet ogen (geen thema-underline). */
.zzhr-external-link,
.zzhr-external-link:hover {
	text-decoration: none !important;
	color: var( --zzhr-accent-contrast ) !important;
}

/* Secundaire knop (Annuleren): subtiel, geen primary. Overschrijft de
   thema-knopstijl die alle <button>s als primary kleurt. */
.zzhr-btn-secondary {
	background: transparent !important;
	color: var( --zzhr-muted ) !important;
	border: 1px solid var( --zzhr-border );
	border-radius: 6px;
	padding: 14px 24px;
	font-size: 1em;
	font-weight: normal;
	line-height: 1;
	cursor: pointer;
	transition: all 0.3s;
}

.zzhr-btn-secondary:hover {
	color: inherit !important;
	border-color: var( --zzhr-muted );
}

/* Modal */

.zzhr-modal {
	width: min( 560px, 94vw );
	max-height: 90vh;
	padding: 0;
	border: 0;
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba( 15, 23, 42, 0.28 );
	overflow: hidden;
	color: inherit;
	background: var( --zzhr-surface );
}

.zzhr-modal::backdrop {
	background: rgba( 15, 23, 42, 0.55 );
}

/* Fallback wanneer <dialog> niet ondersteund is. */
.zzhr-modal:not( [open] ) {
	display: none;
}

/* Kop: eyebrow (eventtitel) + grote titel + subtitel, gestapeld. */
.zzhr-modal__head {
	padding: 26px 56px 16px 28px;
}

.zzhr-modal__eyebrow {
	margin: 0 0 8px;
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var( --zzhr-accent );
}

.zzhr-modal__title {
	margin: 0;
	font-size: 1.6em;
	font-weight: 600;
	line-height: 1.2;
}

.zzhr-modal__title:empty {
	display: none;
}

.zzhr-modal__subtitle {
	margin: 8px 0 0;
	font-size: 0.95em;
	line-height: 1.5;
	color: var( --zzhr-muted );
}

.zzhr-modal__subtitle:empty {
	display: none;
}

/* Ronde sluitknop rechtsboven. */
.zzhr-modal > .zzhr-close {
	position: absolute;
	top: 18px;
	right: 18px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 36px !important;
	height: 36px !important;
	min-width: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba( 15, 23, 42, 0.06 ) !important;
	box-shadow: none !important;
	color: #1f2937 !important;
	font-size: 0 !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: background 0.15s ease;
}

.zzhr-modal > .zzhr-close:hover {
	background: rgba( 15, 23, 42, 0.12 ) !important;
}

.zzhr-close__icon {
	display: block;
}

/* Gesegmenteerde voortgangsbalk + "Stap X van Y". */
.zzhr-progress {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 0 28px 18px;
}

.zzhr-progress__segments {
	display: flex;
	flex: 1;
	gap: 6px;
}

.zzhr-progress__seg {
	flex: 1;
	height: 6px;
	border-radius: 999px;
	background: rgba( 15, 23, 42, 0.1 );
	transition: background 0.25s ease;
}

.zzhr-progress__seg.is-filled {
	background: var( --zzhr-accent );
}

.zzhr-progress__label {
	flex: none;
	margin: 0;
	font-size: 0.82em;
	font-weight: 600;
	color: var( --zzhr-muted );
	white-space: nowrap;
}

/* Zelf-invullen-vinkje. */
/* "Vul automatisch in"-vinkje: staat nu binnen de body (net als het
   "Later invullen"-vinkje) zodat stap 1 en 2 dezelfde padding hebben. */
#zzhr-attendees .zzhr-modal__self {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px;
}

/* Body. */
.zzhr-modal__body {
	padding: 14px 28px 8px;
	overflow-y: auto;
	max-height: 46vh;
}

/* Voettekst: links hint/terug, rechts primaire actie. */
.zzhr-modal__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 28px 24px;
}

.zzhr-modal__foot-left {
	display: flex;
	align-items: center;
	min-width: 0;
}

.zzhr-modal__hint {
	font-size: 0.84em;
	color: var( --zzhr-muted );
}

.zzhr-prev {
	padding: 11px 20px !important;
	border: 1px solid var( --zzhr-border ) !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var( --zzhr-muted ) !important;
	font-size: 0.9em;
	font-weight: 500 !important;
	line-height: 1 !important;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.zzhr-prev:hover {
	border-color: var( --zzhr-muted ) !important;
	color: inherit !important;
}

.zzhr-modal__nav {
	display: inline-flex;
	gap: 8px;
	flex: none;
}

/* Knoppen respecteren het hidden-attribuut (anders wint de expliciete
   display van .zzhr-submit en blijft de finish-knop zichtbaar). */
.zzhr-modal__foot [hidden] {
	display: none !important;
}

/* Pill-knoppen in de modal-voettekst (inschrijf-nav én de winkelmand-Opslaan,
   die niet in .zzhr-modal__nav zit). */
.zzhr-modal__foot .zzhr-submit {
	padding: 12px 22px !important;
	border-radius: 999px !important;
	font-size: 0.95em;
}

/* In de wizard staat de deelnemer al binnen de modalkaart: geen extra kader. */
.zzhr-modal__body .zzhr-attendee {
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
}

.zzhr-modal__body .zzhr-attendee--optional {
	opacity: 1;
}

/* Wizard: één stap tegelijk zichtbaar. */
.zzhr-modal__body .zzhr-group__title {
	display: none;
}

#zzhr-attendees .zzhr-attendee,
#zzhr-attendees .zzhr-summary {
	display: none;
}

#zzhr-attendees .zzhr-attendee.is-active,
#zzhr-attendees .zzhr-summary.is-active {
	display: block;
}

/* Winkelmand-modal: alle deelnemers staan tegelijk onder elkaar. */
.zzhr-cart-modal .zzhr-attendee + .zzhr-attendee {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var( --zzhr-border );
}

/* Slotstap: visueel duidelijk dat alles gelukt is. */
.zzhr-summary {
	text-align: center;
	padding: 12px 0 20px;
}

.zzhr-summary__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	border-radius: 50%;
	background: var( --zzhr-accent-soft );
	color: var( --zzhr-accent );
}

.zzhr-summary__title {
	margin: 0 0 8px;
	font-size: 1.3em;
	font-weight: 600;
}

.zzhr-summary__line {
	margin: 0 auto;
	max-width: 34ch;
	color: var( --zzhr-muted );
	line-height: 1.5;
}

/* Deelnemergroepen en -blokken */

.zzhr-group {
	margin-top: 20px;
}

.zzhr-group:first-child {
	margin-top: 8px;
}

/* In de wizard toont maar één deelnemer tegelijk: groepsmarges neutraliseren
   zodat elke stap op dezelfde hoogte onder de voortgangsbalk begint. */
#zzhr-attendees .zzhr-group {
	margin-top: 0;
}

.zzhr-group__title {
	margin: 0 0 8px;
	font-size: 1em;
	color: var( --zzhr-muted );
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.zzhr-attendee {
	padding: 16px 18px;
	border: 1px solid var( --zzhr-border );
	border-radius: 12px;
	margin-bottom: 14px;
	background: var( --zzhr-card-bg );
}

.zzhr-attendee__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 14px;
	font-weight: 600;
	font-size: 1.02em;
}

.zzhr-attendee__grid {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 14px 16px;
}

.zzhr-attendee label {
	display: flex;
	flex-direction: column;
	gap: 5px;
	font-size: 0.9em;
}

/* Labeltekst met icoontje. */
.zzhr-field-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: inherit;
}

.zzhr-ico {
	width: 15px;
	height: 15px;
	flex: none;
	stroke: currentColor;
	fill: none;
}

.zzhr-attendee input[type="text"],
.zzhr-attendee input[type="email"],
.zzhr-attendee select {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var( --zzhr-border );
	border-radius: 10px;
	font-size: 1em;
	background: #f7f5f4;
	color: inherit;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.zzhr-attendee input[type="text"]:focus,
.zzhr-attendee input[type="email"]:focus,
.zzhr-attendee select:focus {
	outline: none;
	border-color: var( --zzhr-accent );
}

/* Select: eigen chevron + verticale uitlijning zodat de tekst niet afgeknipt
   wordt en de pijl niet tegen de rand plakt. */
.zzhr-attendee select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	height: 46px !important;
	min-height: 46px !important;
	padding: 0 40px 0 14px !important;
	font-size: 1em !important;
	line-height: 44px !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5l4 4 4-4' fill='none' stroke='%239e645f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px 12px;
}

.zzhr-attendee__check {
	flex-direction: row !important;
	align-items: flex-start;
	gap: 8px;
	margin-top: 12px;
	font-size: 0.9em;
	line-height: 1.4;
}

/* Vinkje bovenaan uitlijnen (bij tweeregelige tekst blijft het bij de eerste
   regel). De nudge compenseert de leading van de tekst (~0.2em) zodat het vinkje
   optisch met de eerste tekstregel meeloopt i.p.v. net te hoog te staan. */
.zzhr-attendee__check input {
	margin: 0;
	margin-top: 0.2em;
	flex-shrink: 0;
}

/* Optionele (niet-hoofdboeker) deelnemerblokken. */
.zzhr-attendee--optional {
	opacity: 0.95;
}

.zzhr-attendee__hint {
	font-weight: 400;
	font-size: 0.82em;
	color: var( --zzhr-muted );
}

.zzhr-modal__note {
	margin: 4px 20px 8px;
	padding: 0;
	font-size: 0.85em;
	line-height: 1.5;
	color: var( --zzhr-muted );
}

/* Extra deelnemer: "Later invullen"-vinkje. Deelt de rij-stijl van
   .zzhr-attendee__check (zoals het "vul automatisch in"-vinkje), staat boven de
   "Deelnemer"-titel zodat stap 1 en 2 dezelfde volgorde hebben. */
.zzhr-attendee__later {
	margin: 0 0 12px;
}

/* Gereserveerde plaats: velden grijs en niet bewerkbaar. */
.zzhr-attendee--reserved .zzhr-attendee__fields {
	opacity: 0.5;
	pointer-events: none;
}

/* Gereserveerde/optionele plaatsen: geen verplicht-asterisk tonen. */
.zzhr-attendee--optional .zzhr-req,
.zzhr-attendee--reserved .zzhr-req {
	display: none;
}

/* Extra vragen */

.zzhr-question {
	margin-top: 14px;
}

.zzhr-question:first-of-type {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid var( --zzhr-border );
}

.zzhr-question__label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 6px;
}

.zzhr-question .zzhr-attendee__check {
	margin-top: 6px;
}

.zzhr-req {
	color: #b32d2e;
}

/* Melding */

.zzhr-notice--error {
	padding: 12px 16px;
	margin-bottom: 16px;
	border-radius: 10px;
	border: 1px solid rgba( 179, 45, 46, 0.35 );
	background: rgba( 179, 45, 46, 0.08 );
}

.zzhr-notice--error p {
	margin: 0;
}

.zzhr-notice--success {
	padding: 12px 16px;
	margin-bottom: 16px;
	border-radius: 10px;
	border: 1px solid rgba( 22, 128, 61, 0.35 );
	background: rgba( 22, 128, 61, 0.08 );
}

.zzhr-notice--success p {
	margin: 0;
}

/* Wachtlijstformulier (§8): eenvoudige gestapelde velden. */
.zzhr-waitlist {
	margin-top: 12px;
}

.zzhr-waitlist .zzhr-field {
	display: block;
	margin-bottom: 12px;
}

.zzhr-waitlist .zzhr-field > span {
	display: block;
	margin-bottom: 4px;
	font-weight: 500;
	font-size: 0.9em;
	color: var( --zzhr-muted );
}

.zzhr-waitlist input[type="text"],
.zzhr-waitlist input[type="email"],
.zzhr-waitlist input[type="number"] {
	width: 100%;
	max-width: 340px;
	padding: 9px 11px;
	border: 1px solid var( --zzhr-border );
	border-radius: 8px;
	font-size: 1em;
	background: #fff;
	box-sizing: border-box;
}

.zzhr-waitlist .zzhr-field--qty input {
	max-width: 100px;
}

/* "Deelnemers aanpassen"-link onder de winkelmandregel. Als <button> pikt het
   de thema-knopstijl op; daarom overal !important om er een discrete tekstlink
   van te maken (buiten .zzhr-tickets, dus met letterlijke waarden). */
.zzhr-cart-edit {
	display: inline-block !important;
	width: auto !important;
	margin: 4px 0 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	box-shadow: none !important;
	color: #64748b !important;
	font-size: 0.82em !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: underline !important;
	cursor: pointer;
}

.zzhr-cart-edit:hover {
	color: #1f2937 !important;
	background: none !important;
	box-shadow: none !important;
}

.zzhr-cart-error {
	margin: 12px 20px 0;
}

/* Smal scherm */

@media ( max-width: 480px ) {
	.zzhr-type {
		flex-direction: column;
		align-items: stretch;
	}

	/* Compacte, links uitgelijnde stepper i.p.v. over de volle breedte. */
	.zzhr-stepper {
		justify-content: flex-start;
	}

	.zzhr-attendee__grid {
		grid-template-columns: 1fr;
	}

	/* Voettekst gestapeld zodat lange knoppen niet overlappen. */
	.zzhr-modal__foot {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 10px;
	}

	.zzhr-modal__foot-left,
	.zzhr-modal__nav {
		width: 100%;
	}

	.zzhr-modal__nav {
		flex-direction: column;
		gap: 8px;
	}

	.zzhr-modal__foot .zzhr-submit,
	.zzhr-modal__foot .zzhr-prev {
		width: 100% !important;
		justify-content: center;
	}
}

/* Statusmelding van [zzhr_tickets] (afgelopen/volzet/…): gecentreerd, geen marge
   onder de tekst; de afgelopen/geannuleerd-melding in hetzelfde rood als de
   single-event labels. */
.zzhr-tickets--message,
.zzhr-tickets--external {
	text-align: center;
}

.zzhr-tickets--message p {
	margin-bottom: 0;
}

.zzhr-tickets--afgelopen p {
	color: #c0392b;
}
