/* Zero Ticket components. Themes can restyle via the custom properties below. */
:root {
	--zt-ink: #14213D;
	--zt-ink-soft: #3E4A5C;
	--zt-park: #1F6F4A;
	--zt-park-dark: #185A3C;
	--zt-ticket: #FFC857;
	--zt-fog: #EEF2EF;
	--zt-line: #D5DDD8;
	--zt-photo: #D9E2DC;
	--zt-paper: #FFFFFF;
	--zt-error: #B3261E;
	--zt-radius: 16px;
	--zt-display: 'Bricolage Grotesque', system-ui, sans-serif;
}

/* Buttons and chips */
.zt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 48px; padding: 0 22px; border: 2px solid var(--zt-park); border-radius: 999px;
	background: var(--zt-park); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.zt-btn:hover { background: var(--zt-park-dark); border-color: var(--zt-park-dark); color: #fff; }
.zt-btn--ghost { background: transparent; color: var(--zt-ink); border-color: var(--zt-ink); }
.zt-btn--ghost:hover { background: var(--zt-ink); color: #fff; border-color: var(--zt-ink); }
.zt-btn:disabled { opacity: .55; cursor: default; }
.zt-btn:focus-visible, .zt-chip:focus-visible, .zt-card__link:focus-visible, .zt-city:focus-visible { outline: 3px solid var(--zt-ink); outline-offset: 3px; }
.zt-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.zt-chip {
	display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
	background: var(--zt-fog); color: var(--zt-ink); font-size: .875rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
a.zt-chip:hover { background: var(--zt-ink); color: #fff; }
.zt-chip[aria-current="page"] { background: var(--zt-ink); color: #fff; }
.zt-chip--ticket { background: var(--zt-ticket); }

/* Cards */
.zt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px 20px; }
.zt-card { position: relative; }
.zt-card__link { display: flex; flex-direction: column; gap: 8px; color: var(--zt-ink); text-decoration: none; }
.zt-card__photo { aspect-ratio: 4 / 3; border-radius: var(--zt-radius); overflow: hidden; background: var(--zt-photo); }
.zt-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.zt-card__link:hover .zt-card__photo img { transform: scale(1.03); }
.zt-card__title { margin: 4px 0 0; font-family: var(--zt-display); font-size: 1.25rem; line-height: 1.2; font-weight: 800; letter-spacing: -.01em; }
.zt-card__meta { margin: 0; color: var(--zt-ink-soft); font-size: .95rem; }
.zt-card .zt-chip--ticket { align-self: flex-start; }
.zt-card__save {
	position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
	background: #fff; color: var(--zt-ink); display: flex; align-items: center; justify-content: center; cursor: pointer;
	box-shadow: 0 1px 2px rgba(20, 33, 61, .2);
}
.zt-card__save[aria-pressed="true"] svg path { fill: var(--zt-park); stroke: var(--zt-park); }

/* Cities */
.zt-city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.zt-city { display: flex; flex-direction: column; gap: 6px; color: var(--zt-ink); text-decoration: none; }
.zt-city__photo { display: block; aspect-ratio: 4 / 5; border-radius: var(--zt-radius); overflow: hidden; background: var(--zt-photo); }
.zt-city__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zt-city__name { font-family: var(--zt-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; }
.zt-city__meta { color: var(--zt-ink-soft); font-size: .95rem; }
.zt-country { margin: 0 0 48px; }
.zt-country h2 a { color: inherit; text-decoration: none; }

/* The ticket */
.zt-ticket { position: relative; background: var(--zt-ticket); color: var(--zt-ink); border-radius: 18px; overflow: hidden; }
.zt-ticket__main { padding: 20px 22px 16px; display: flex; flex-direction: column; gap: 10px; }
.zt-ticket__main p { margin: 0; line-height: 1.45; }
.zt-ticket__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.zt-ticket__label { font-weight: 700; font-size: .95rem; }
.zt-ticket__price { font-family: var(--zt-display); font-weight: 800; font-size: 5rem; line-height: .9; letter-spacing: -.04em; }
.zt-ticket__stamp { padding: 8px 12px; border: 2px solid var(--zt-ink); border-radius: 10px; font-weight: 700; transform: rotate(-6deg); text-align: center; }
.zt-ticket__perf { display: flex; align-items: center; margin: 0 -14px; }
.zt-ticket__perf span { width: 28px; height: 28px; border-radius: 50%; background: var(--zt-notch, #fff); flex: none; }
.zt-ticket__perf i { flex: 1; height: 0; border-top: 3px dashed var(--zt-ink); margin: 0 10px; }
.zt-ticket__stub { padding: 14px 22px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; line-height: 1.4; }
.zt-ticket__ok { fill: none; stroke: var(--zt-park); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.zt-ticket__warn { padding: 4px 10px; border-radius: 999px; background: var(--zt-ink); color: #fff; font-size: .85rem; font-weight: 700; white-space: nowrap; }

/* Still free? */
.zt-verify { background: var(--zt-fog); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.zt-verify h2 { margin: 0; }
.zt-verify p { margin: 0; }
.zt-verify__buttons { display: flex; gap: 10px; }
.zt-verify__buttons .zt-btn { flex: 1; padding: 0 12px; white-space: nowrap; }
.zt-verify__msg { font-weight: 700; }

/* Forms */
.zt-form { display: flex; flex-direction: column; gap: 28px; max-width: 680px; }
.zt-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zt-form legend { font-family: var(--zt-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; margin-bottom: 8px; padding: 0; }
.zt-field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.zt-field > label, .zt-label, .zt-field legend { font-weight: 700; }
.zt-field legend { font-family: inherit; font-size: 1rem; letter-spacing: 0; }
.zt-optional { font-weight: 400; color: var(--zt-ink-soft); }
.zt-help { color: var(--zt-ink-soft); font-size: .9rem; }
.zt-form input[type=text], .zt-form input[type=url], .zt-form input[type=date], .zt-form input[type=email], .zt-form select, .zt-form textarea {
	width: 100%; box-sizing: border-box; min-height: 48px; padding: 10px 14px; border: 2px solid var(--zt-line); border-radius: 12px;
	background: #fff; color: var(--zt-ink); font: inherit;
}
.zt-form textarea { min-height: 120px; resize: vertical; }
.zt-form input:focus, .zt-form select:focus, .zt-form textarea:focus { outline: none; border-color: var(--zt-ink); box-shadow: 0 0 0 3px rgba(31, 111, 74, .25); }
.zt-form input[type=file] { font: inherit; }
.zt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.zt-grid-2[hidden] { display: none; }
.zt-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.zt-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 2px solid var(--zt-line); border-radius: 999px; cursor: pointer; background: #fff; }
.zt-form > fieldset > .zt-check { border-radius: 12px; padding: 10px 14px; align-items: flex-start; line-height: 1.4; }
.zt-check:has(input:checked) { border-color: var(--zt-park); background: #E3F0E8; }
.zt-check input { width: 18px; height: 18px; accent-color: var(--zt-park); margin: 0; flex: none; }
.zt-form--compact { gap: 16px; }
.zt-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.zt-notice { padding: 14px 18px; border-radius: 12px; font-weight: 700; margin: 0 0 20px; }
.zt-notice--ok { background: #E3F0E8; color: var(--zt-park-dark); }
.zt-notice--error { background: #FBE9E7; color: var(--zt-error); }
.zt-panel { background: var(--zt-fog); border-radius: 18px; padding: 24px; }
.zt-panel h2 { margin-top: 0; }
.zt-empty { color: var(--zt-ink-soft); }
.zt-inline-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.zt-inline-field select { min-height: 48px; padding: 0 12px; border: 2px solid var(--zt-line); border-radius: 12px; font: inherit; background: #fff; }

/* Maps */
.zt-map, .zt-picker { height: 320px; border-radius: var(--zt-radius); overflow: hidden; background: var(--zt-photo); z-index: 0; }
.zt-map[hidden] { display: none; }
.zt-map--nearby { height: 360px; margin: 16px 0 24px; }
.zt-picker { height: 300px; border: 2px solid var(--zt-line); cursor: crosshair; }
.zt-picker.needs-pin { border-color: var(--zt-error); }
.zt-picker.has-pin { border-color: var(--zt-park); }
.zt-marker { background: none; border: 0; }
.zt-marker svg { display: block; filter: drop-shadow(0 1px 2px rgba(20, 33, 61, .35)); }
.leaflet-popup-content a { font-weight: 700; color: var(--zt-ink); }

/* Nearby */
.zt-nearby__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.zt-nearby__status { color: var(--zt-ink-soft); margin: 14px 0 0; }

[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; background: var(--zt-ink); color: #fff; padding: 4px 10px; border-radius: 8px; font-size: .8rem; white-space: nowrap; }

@media (max-width: 600px) {
	.zt-grid-2 { grid-template-columns: 1fr; }
	.zt-grid { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
	.zt-card__title { font-size: 1.05rem; }
	.zt-city-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
	.zt-ticket__price { font-size: 4rem; }
}
@media (prefers-reduced-motion: reduce) {
	.zt-card__photo img { transition: none; }
}
