/* Tickets by WP Provider – booking widget & ticket page.
   Motif: Naarden's star fort. Step markers are bastions on a dashed "moat";
   the summary is an admission ticket with notches and a perforation. */

.wpptk {
	--wpptk-primary: #1F393C;
	--wpptk-accent: #9C1005;
	--wpptk-paper: #F5F0E6;
	--wpptk-ink: #1d2b2d;
	--wpptk-muted: #66777a;
	--wpptk-line: #ddd5c6;
	--wpptk-radius: 6px;
	color: var(--wpptk-ink);
	font-size: 16px;
	line-height: 1.5;
	max-width: 1040px;
	margin: 0 auto;
	box-sizing: border-box;
}
.wpptk *, .wpptk *::before, .wpptk *::after { box-sizing: inherit; }
.wpptk button { font: inherit; cursor: pointer; }
.wpptk button:disabled { cursor: not-allowed; }
.wpptk :focus-visible { outline: 3px solid var(--wpptk-accent); outline-offset: 2px; }
.wpptk h3, .wpptk .wpptk-h { margin: 0 0 18px; font-size: 1.35em; line-height: 1.25; color: var(--wpptk-primary); }
.wpptk h3:focus { outline: none; }

/* ---------- Top bar: steps + language ---------- */
.wpptk-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.wpptk-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; position: relative; }
.wpptk-steps li { display: flex; align-items: center; }
.wpptk-steps li + li::before { /* the moat */
	content: ""; width: 34px; height: 0; border-top: 2px dashed var(--wpptk-line); margin: 0 8px;
}
.wpptk-steps li.is-done + li::before, .wpptk-steps li.is-current::before { border-top-color: var(--wpptk-primary); }
.wpptk .wpptk-steps button,
.wpptk .wpptk-steps button:disabled { display: flex; align-items: center; gap: 8px; background: none; border: 0; box-shadow: none; padding: 4px 2px; margin: 0; color: var(--wpptk-muted); font-size: .95em; min-height: 0; opacity: 1; }
.wpptk-steps button:disabled { cursor: default; }
.wpptk-steps .is-done button { color: var(--wpptk-primary); }
.wpptk-steps .is-done button:hover span:last-child { text-decoration: underline; }
.wpptk .wpptk-steps .is-current button { color: var(--wpptk-ink); font-weight: 700; }
.wpptk .wpptk-steps .is-done button { color: var(--wpptk-primary); }
.wpptk-bastion {
	width: 30px; height: 30px; display: inline-grid; place-items: center;
	font-size: 13px; font-weight: 700; color: var(--wpptk-muted);
	background: #e8e1d3; border: 0;
	clip-path: polygon(50% 0, 100% 30%, 100% 70%, 50% 100%, 0 70%, 0 30%);
}
.wpptk-steps .is-done .wpptk-bastion { background: var(--wpptk-primary); color: #fff; }
.wpptk-steps .is-current .wpptk-bastion { background: var(--wpptk-accent); color: #fff; }

.wpptk-lang { display: inline-flex; border: 1px solid var(--wpptk-line); border-radius: 999px; overflow: hidden; background: #fff; }
.wpptk-lang button { border: 0; background: none; padding: 4px 11px; font-size: 12px; letter-spacing: .08em; color: var(--wpptk-muted); }
.wpptk-lang button[aria-pressed="true"] { background: var(--wpptk-primary); color: #fff; }

/* ---------- Layout ---------- */
.wpptk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.wpptk-panel { background: #fff; border: 1px solid var(--wpptk-line); border-radius: var(--wpptk-radius); padding: 26px 28px; }

/* ---------- Ticket types ---------- */
.wpptk-types { list-style: none; margin: 0; padding: 0; }
.wpptk-type { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px 18px; padding: 14px 0; border-top: 1px solid var(--wpptk-line); }
.wpptk-type:first-child { border-top: 0; padding-top: 0; }
.wpptk-type__name { display: block; font-weight: 700; }
.wpptk-type__desc { display: block; color: var(--wpptk-muted); font-size: .88em; }
.wpptk-type__price { font-variant-numeric: tabular-nums; color: var(--wpptk-muted); white-space: nowrap; }
.wpptk-type.has-qty .wpptk-type__price { color: var(--wpptk-ink); }
.wpptk-qty { display: inline-flex; align-items: center; border: 1px solid var(--wpptk-line); border-radius: 4px; }
.wpptk-qty button { width: 40px; height: 40px; border: 0; background: var(--wpptk-paper); color: var(--wpptk-primary); font-size: 20px; line-height: 1; }
.wpptk-qty button:not(:disabled):hover { background: var(--wpptk-primary); color: #fff; }
.wpptk-qty button:disabled { color: #c3bcae; background: #faf8f3; }
.wpptk-qty output { min-width: 40px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Calendar ---------- */
.wpptk-cal { max-width: 460px; }
.wpptk-cal.is-loading .wpptk-cal__days { opacity: .45; }
.wpptk-cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.wpptk-cal__head strong { text-transform: capitalize; }
.wpptk-cal__head button { width: 38px; height: 38px; border: 1px solid var(--wpptk-line); border-radius: 50%; background: #fff; color: var(--wpptk-primary); font-size: 20px; }
.wpptk-cal__head button:disabled { opacity: .35; }
.wpptk-cal__wd, .wpptk-cal__days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.wpptk-cal__wd span { text-align: center; font-size: 12px; color: var(--wpptk-muted); text-transform: uppercase; letter-spacing: .05em; padding: 4px 0; }
.wpptk-day { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: none; font-variant-numeric: tabular-nums; position: relative; }
.wpptk-day.is-blank { visibility: hidden; }
.wpptk-day.is-closed, .wpptk-day.is-full { color: #bdb6a8; }
.wpptk-day.is-full { text-decoration: line-through; }
.wpptk-day.is-open, .wpptk-day.is-few { background: var(--wpptk-paper); color: var(--wpptk-ink); font-weight: 600; }
.wpptk-day.is-open:hover, .wpptk-day.is-few:hover { border-color: var(--wpptk-primary); }
.wpptk-day.is-few::after { content: ""; position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: #c7861a; }
.wpptk-day.is-selected { background: var(--wpptk-accent); color: #fff; border-color: var(--wpptk-accent); }
.wpptk-day.is-selected::after { background: #fff; }
.wpptk-cal__legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--wpptk-muted); flex-wrap: wrap; }
.wpptk-cal__legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.wpptk-cal__legend .is-open::before { background: var(--wpptk-paper); border: 1px solid var(--wpptk-line); }
.wpptk-cal__legend .is-few::before { background: #c7861a; border-radius: 50%; width: 7px; height: 7px; }
.wpptk-cal__legend .is-closed::before { background: #fff; border: 1px solid var(--wpptk-line); }

/* ---------- Form ---------- */
.wpptk-intro { margin: -8px 0 18px; color: var(--wpptk-muted); }
.wpptk-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.wpptk-field { margin-bottom: 16px; }
.wpptk-field label { display: block; font-weight: 600; font-size: .92em; margin-bottom: 5px; }
.wpptk-field abbr { color: var(--wpptk-accent); text-decoration: none; border: 0; }
.wpptk-field input[type=text], .wpptk-field input[type=email] {
	width: 100%; height: 46px; padding: 0 12px; border: 1px solid #cfc7b7; border-radius: 4px; background: #fff; font: inherit; color: inherit;
}
.wpptk-field input:focus { border-color: var(--wpptk-primary); outline: 2px solid var(--wpptk-primary); outline-offset: 0; }
.wpptk-field.has-error input { border-color: var(--wpptk-accent); }
.wpptk-err { display: block; color: var(--wpptk-accent); font-size: .86em; margin-top: 4px; }
.wpptk-inline { display: flex; gap: 8px; }
.wpptk-inline input { flex: 1; text-transform: uppercase; }
.wpptk-check label { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.wpptk-check input { margin-top: 5px; }
.wpptk-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Buttons ---------- */
.wpptk-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--wpptk-line); }
.wpptk-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border: 0; border-radius: 4px; background: var(--wpptk-accent); color: #fff !important; font-weight: 700; text-decoration: none !important; transition: filter .15s; }
.wpptk-btn:hover:not(:disabled) { filter: brightness(1.12); }
.wpptk-btn:disabled { opacity: .45; }
.wpptk-btn--ghost { background: #fff; color: var(--wpptk-primary) !important; box-shadow: inset 0 0 0 1px var(--wpptk-primary); min-height: 46px; }
.wpptk-btn--pay[aria-busy="true"] { position: relative; color: transparent !important; }
.wpptk-btn--pay[aria-busy="true"]::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: wpptk-spin .7s linear infinite; }
.wpptk-link { background: none; border: 0; padding: 8px 0; color: var(--wpptk-primary); text-decoration: underline; text-underline-offset: 3px; }
.wpptk-notice { margin: 16px 0 0; padding: 10px 14px; border-left: 3px solid var(--wpptk-accent); background: #fbf1ef; }

/* ---------- Summary = admission ticket ---------- */
.wpptk-side { position: sticky; top: 24px; }
/* The step's buttons under the summary on wide screens, in the panel on small ones. */
.wpptk-panel .wpptk-actions { display: none; }
.wpptk-side__actions .wpptk-actions { margin-top: 16px; padding-top: 0; border-top: 0; }
.wpptk-sum {
	background: var(--wpptk-paper);
	border-radius: var(--wpptk-radius);
	filter: drop-shadow(0 1px 0 var(--wpptk-line)) drop-shadow(0 6px 14px rgba(31, 57, 60, .08));
	-webkit-mask: radial-gradient(circle 11px at 0 var(--wpptk-notch, 118px), transparent 98%, #000) left / 51% 100% no-repeat,
	              radial-gradient(circle 11px at 100% var(--wpptk-notch, 118px), transparent 98%, #000) right / 51% 100% no-repeat;
	        mask: radial-gradient(circle 11px at 0 var(--wpptk-notch, 118px), transparent 98%, #000) left / 51% 100% no-repeat,
	              radial-gradient(circle 11px at 100% var(--wpptk-notch, 118px), transparent 98%, #000) right / 51% 100% no-repeat;
}
.wpptk-sum__head { min-height: 118px; padding: 20px 24px 16px; background: var(--wpptk-primary); color: #fff; border-radius: var(--wpptk-radius) var(--wpptk-radius) 0 0; display: flex; flex-direction: column; gap: 2px; }
.wpptk-sum__kicker { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.wpptk-sum__head strong { font-size: 1.2em; }
.wpptk-sum__date { margin-top: 4px; text-transform: capitalize; }
.wpptk-sum__hours { font-size: .85em; opacity: .75; }
.wpptk-sum__body { padding: 18px 24px 22px; border-top: 2px dashed rgba(31, 57, 60, .25); }
.wpptk-sum__lines { list-style: none; margin: 0 0 8px; padding: 0; }
.wpptk-sum__lines li { display: grid; grid-template-columns: 30px 1fr auto; gap: 6px; padding: 4px 0; font-size: .95em; }
.wpptk-sum__q { color: var(--wpptk-muted); font-variant-numeric: tabular-nums; }
.wpptk-sum__lines li span:last-child { font-variant-numeric: tabular-nums; }
.wpptk-sum__empty { color: var(--wpptk-muted); margin: 0 0 8px; font-size: .95em; }
.wpptk-sum__row { display: flex; justify-content: space-between; font-size: .95em; color: #2f6b3a; }
.wpptk-sum__total { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(31, 57, 60, .18); font-weight: 700; font-size: 1.1em; font-variant-numeric: tabular-nums; }

/* ---------- Order page ---------- */
.wpptk-order { max-width: 760px; }
.wpptk-state { background: #fff; border: 1px solid var(--wpptk-line); border-radius: var(--wpptk-radius); padding: 28px; margin-bottom: 22px; }
.wpptk-state--ok { border-top: 4px solid var(--wpptk-primary); }
.wpptk-state--fail { border-top: 4px solid var(--wpptk-accent); }
.wpptk-state--wait { text-align: center; }
.wpptk-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 16px 0 20px; }
.wpptk-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--wpptk-muted); }
.wpptk-facts dd { margin: 0; font-weight: 600; }
.wpptk-spinner { display: inline-block; width: 34px; height: 34px; border: 3px solid var(--wpptk-line); border-top-color: var(--wpptk-primary); border-radius: 50%; animation: wpptk-spin .9s linear infinite; margin-bottom: 10px; }
@keyframes wpptk-spin { to { transform: rotate(360deg); } }

.wpptk-tickets { display: grid; gap: 16px; }
.wpptk-ticket { position: relative; display: grid; grid-template-columns: 170px 1fr; gap: 20px; align-items: center; padding: 16px 44px 16px 16px; background: #fff; border: 2px dashed var(--wpptk-line); border-radius: var(--wpptk-radius); break-inside: avoid; page-break-inside: avoid; }
.wpptk-ticket__qr svg { display: block; width: 100%; height: auto; }
.wpptk-ticket__count { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--wpptk-muted); }
.wpptk-ticket__type { display: block; font-size: 1.25em; color: var(--wpptk-primary); margin: 2px 0; }
.wpptk-ticket__date { display: block; }
.wpptk-ticket__code { display: inline-block; margin-top: 8px; font-size: 14px; letter-spacing: .2em; background: var(--wpptk-paper); padding: 2px 8px; border-radius: 3px; }
.wpptk-ticket__venue { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(180deg); writing-mode: vertical-rl; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--wpptk-muted); }
.wpptk-ticket.is-used, .wpptk-ticket.is-void { opacity: .45; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
	.wpptk-grid { grid-template-columns: 1fr; }
	.wpptk-side { position: static; order: -1; }
	.wpptk-panel .wpptk-actions { display: flex; }
	.wpptk-side__actions { display: none; }
	.wpptk-sum__head { min-height: 0; }
	.wpptk-sum { -webkit-mask: none; mask: none; }
}
@media (max-width: 560px) {
	.wpptk-panel { padding: 20px 16px; }
	.wpptk-steps li + li::before { width: 14px; margin: 0 4px; }
	.wpptk-steps button span:last-child { display: none; }
	.wpptk-steps .is-current button span:last-child { display: inline; }
	.wpptk-type { grid-template-columns: 1fr auto; }
	.wpptk-type__price { grid-row: 2; grid-column: 1; }
	.wpptk-qty { grid-row: 1 / span 2; grid-column: 2; }
	.wpptk-row { grid-template-columns: 1fr; }
	.wpptk-ticket { grid-template-columns: 120px 1fr; padding-right: 36px; }
}

/* ---------- Print ---------- */
@media print {
	.wpptk-noprint, .wpptk-state--ok p, .wpptk-state--ok .wpptk-btn { display: none !important; }
	.wpptk-state { border: 0; padding: 0; }
	.wpptk-ticket { border-color: #999; }
}
