/* ==========================================================================
   Stran dogodka (template-parts/af-ticket-single.php)
   Gradniki (barve, pisava, čip z datumom, gumb) so v af-tickets.css.
   ========================================================================== */

.af-ev-page #primary .site-main { padding-top: clamp(18px, 3vw, 32px); }

/* Drobtine */
.af-ev-page .woocommerce-breadcrumb {
	display: flex;
	padding: 0;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0 0 clamp(18px, 2.5vw, 28px);
	font-size: 13px;
	font-weight: 500;
	color: var(--tix-muted);
}
.af-ev-page .woocommerce-breadcrumb a { color: var(--tix-soft); text-decoration: none; }
.af-ev-page .woocommerce-breadcrumb a:hover { color: var(--tix-red); }
.af-ev-crumb-sep { color: rgba(18, 18, 18, 0.25); }

/* Woo privzeto: lebdeči stolpci, ki jih ne rabimo */
.af-ev-page .product.af-ev { display: block; }
.af-ev-page .product.af-ev::before,
.af-ev-page .product.af-ev::after { display: none; }

/* --------------------------------------------------------------------------
   Zgornji del: plakat + vsebina
   ----------------------------------------------------------------------- */
.af-ev-hero {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
}

.af-ev-poster {
	position: sticky;
	top: calc(76px + var(--wp-admin--admin-bar--height, 0px) + 24px);
	margin: 0;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 16px;
	background: #e9e6e2;
	box-shadow: 0 30px 60px -34px rgba(18, 18, 18, 0.55);
	isolation: isolate;
}
.af-ev-poster::before {
	content: "";
	position: absolute;
	inset: -30px;
	z-index: -1;
	background: var(--af-poster, none) center / cover no-repeat;
	filter: blur(26px) saturate(1.2);
}
.af-ev-poster::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 5px;
	background: var(--tix-red);
}
.af-ev-page .af-ev-poster__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.af-ev-page.af-tix .af-ev-poster .af-tix-chip { z-index: 2; left: 18px; bottom: 22px; min-width: 70px; padding: 11px 10px 9px; border-radius: 8px; }
.af-ev-page .af-ev-poster .af-tix-chip__d { font-size: 32px; }
.af-ev-page .af-ev-poster .af-tix-chip__m { font-size: 12px; }
.af-ev.is-past .af-ev-poster__img { filter: grayscale(1); }
.af-ev.is-past .af-ev-poster::after { background: var(--tix-muted); }

.af-ev-main { display: flex; flex-direction: column; gap: 26px; min-width: 0; }

.af-ev-kicker {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 750;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--tix-red);
}
.af-ev-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 11px;
	border-radius: 999px;
	background: rgba(31, 157, 85, 0.1);
	color: #157a40;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
}
.af-ev-status--past { background: var(--tix-ink); color: #fff; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }

.af-tix .af-ev-title {
	margin: 0;
	font-family: var(--tix-font);
	font-size: clamp(32px, 4.4vw, 54px);
	font-weight: 800;
	line-height: 1.04;
	letter-spacing: -0.035em;
	color: var(--tix-ink);
	text-wrap: balance;
}

/* Ključni podatki */
.af-ev-facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	border-radius: 14px;
	background: var(--tix-paper);
	box-shadow: var(--tix-shadow);
	overflow: hidden;
}
.af-ev-fact { padding: 18px 20px; min-width: 0; }
.af-ev-fact + .af-ev-fact { border-left: 1px solid var(--tix-hair); }
.af-ev-fact--loc { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--tix-hair); }
.af-ev-fact dt {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0 0 6px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--tix-muted);
}
.af-ev-fact dt .af-tix-ico { width: 16px; height: 16px; color: var(--tix-red); }
.af-ev-fact dd {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--tix-ink);
}
.af-ev-fact--loc dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.af-ev-fact--loc dd span { font-size: 15px; font-weight: 500; color: var(--tix-soft); }
.af-tix .af-ev-fact--loc dd a {
	font-size: 14px;
	font-weight: 650;
	color: var(--tix-ink);
	text-decoration: underline;
	text-decoration-color: var(--tix-red);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.af-ev-lead { font-size: 16.5px; line-height: 1.65; color: var(--tix-soft); }
.af-ev-lead p { margin: 0 0 0.8em; }
.af-ev-lead p:last-child { margin-bottom: 0; }
.af-ev-lead p + p { color: var(--tix-muted); font-size: 15px; } /* angleška različica */

/* --------------------------------------------------------------------------
   Vstopnice
   ----------------------------------------------------------------------- */
.af-ev-tickets {
	scroll-margin-top: calc(76px + var(--wp-admin--admin-bar--height, 0px) + 16px);
	padding: clamp(20px, 2.4vw, 28px);
	border-radius: 16px;
	background: var(--tix-paper);
	box-shadow: var(--tix-shadow);
}
.af-ev-tickets__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 16px;
	margin-bottom: 18px;
}
.af-tix .af-ev-tickets__title {
	margin: 0;
	font-family: var(--tix-font);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--tix-ink);
}
.af-ev-tickets__note { font-size: 13px; font-weight: 500; color: var(--tix-muted); }

.af-tix .af-ev-notice {
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--tix-page);
	font-size: 14px;
	line-height: 1.5;
	color: var(--tix-soft);
}
.af-tix .af-ev-notice a { color: var(--tix-ink); font-weight: 650; }

.af-ev-tickets__list { display: grid; gap: 12px; }

.af-ev-page form.cart.af-ev-ticket {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 14px 24px;
	margin: 0;
	padding: 18px 18px 18px 22px;
	border: 1.5px solid var(--tix-hair);
	border-radius: 12px;
	background: var(--tix-paper);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.af-ev-page form.cart.af-ev-ticket::before,
.af-ev-page form.cart.af-ev-ticket::after { display: none; }
.af-ev-page .af-ev-tickets__list form.cart.af-ev-ticket:first-child { border-color: var(--tix-ink); }
.af-ev-page form.cart.af-ev-ticket:hover,
.af-ev-page form.cart.af-ev-ticket:focus-within { border-color: var(--tix-red); box-shadow: 0 10px 24px -18px rgba(224, 0, 0, 0.6); }

.af-tix .af-ev-ticket__name {
	margin: 0;
	font-family: var(--tix-font);
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -0.015em;
	color: var(--tix-ink);
}
.af-ev-ticket__desc { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--tix-muted); }
.af-ev-ticket__desc p { margin: 0; }

.af-ev-ticket__price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.af-ev-ticket__amount {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--tix-ink);
	font-variant-numeric: tabular-nums;
}
.af-ev-ticket__amount .woocommerce-Price-currencySymbol { font-size: 0.66em; font-weight: 700; }
.af-ev-ticket__amount--free { font-size: 15px; font-weight: 700; letter-spacing: 0; color: #157a40; }
.af-ev-ticket__vat { font-size: 12.5px; font-weight: 600; color: var(--tix-muted); }

.af-ev-ticket__buy { display: flex; align-items: center; gap: 10px; }

.af-ev-qty {
	display: inline-flex;
	align-items: center;
	height: 46px;
	border: 1.5px solid var(--tix-hair);
	border-radius: 10px;
	background: #fff;
}
.af-ev-page .af-ev-qty__btn {
	display: grid;
	place-items: center;
	width: 38px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--tix-ink);
	font-family: var(--tix-font);
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
}
.af-ev-page .af-ev-qty__btn:hover,
.af-ev-page .af-ev-qty__btn:focus { background: var(--tix-page); color: var(--tix-red); }
.af-ev-page .af-ev-qty__input.qty {
	width: 40px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-family: var(--tix-font);
	font-size: 16px;
	font-weight: 700;
	color: var(--tix-ink);
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none;
}
.af-ev-qty__input::-webkit-outer-spin-button,
.af-ev-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.af-ev-page button.single_add_to_cart_button.af-ev-ticket__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 132px;
	height: 46px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 10px;
	background: var(--tix-red);
	color: #fff;
	font-family: var(--tix-font);
	font-size: 15px;
	font-weight: 750;
	line-height: 1;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.af-ev-page button.single_add_to_cart_button.af-ev-ticket__btn:hover { background: var(--tix-red-d); color: #fff; }
.af-ev-page .af-ev-ticket__btn:focus-visible,
.af-ev-page .af-ev-qty__btn:focus-visible,
.af-ev-free summary:focus-visible { outline: 3px solid var(--tix-red); outline-offset: 2px; }

.af-ev-ticket__soldout {
	padding: 8px 12px;
	border-radius: 8px;
	background: var(--tix-page);
	font-size: 13px;
	font-weight: 750;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tix-muted);
}
.af-ev-page form.cart.af-ev-ticket.is-soldout { opacity: 0.65; }

/* Brezplačne prijave (govorci, gostje, sponzorji) */
.af-ev-free {
	margin-top: 14px;
	border-radius: 12px;
	background: var(--tix-page);
}
.af-ev-free summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
	border-radius: 12px;
	cursor: pointer;
	list-style: none;
}
.af-ev-free summary::-webkit-details-marker { display: none; }
.af-ev-free summary strong { display: block; font-size: 14.5px; font-weight: 700; color: var(--tix-ink); }
.af-ev-free summary small { display: block; margin-top: 2px; font-size: 13px; color: var(--tix-muted); }
.af-ev-free__chev {
	flex: none;
	width: 10px;
	height: 10px;
	margin-right: 4px;
	border-right: 2px solid var(--tix-ink);
	border-bottom: 2px solid var(--tix-ink);
	transform: translateY(-3px) rotate(45deg);
	transition: transform 0.2s ease;
}
.af-ev-free[open] .af-ev-free__chev { transform: translateY(2px) rotate(-135deg); }
.af-ev-free__list { display: grid; gap: 8px; padding: 0 10px 10px; }
.af-ev-page form.cart.af-ev-ticket--compact { padding: 10px 10px 10px 16px; gap: 10px 16px; border-color: transparent; }
.af-ev-page .af-ev-ticket--compact .af-ev-ticket__name { font-size: 15.5px; font-weight: 700; }
.af-ev-page .af-ev-ticket--compact .af-ev-qty { height: 40px; }
.af-ev-page .af-ev-ticket--compact button.single_add_to_cart_button.af-ev-ticket__btn {
	min-width: 96px;
	height: 40px;
	background: var(--tix-ink);
	font-size: 14px;
}
.af-ev-page .af-ev-ticket--compact button.single_add_to_cart_button.af-ev-ticket__btn:hover { background: #000; }

.af-ev-assure {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 22px;
	margin: 18px 0 0;
	padding: 16px 0 0;
	border-top: 1px dashed var(--tix-hair);
	list-style: none;
	font-size: 13px;
	color: var(--tix-muted);
}
.af-ev-assure li { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.af-ev-assure .af-tix-ico { width: 17px; height: 17px; color: var(--tix-soft); }

/* --------------------------------------------------------------------------
   Spodnji del: opis + stranski stolpec
   ----------------------------------------------------------------------- */
.af-ev-more {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
	gap: clamp(28px, 4vw, 64px);
	align-items: start;
	margin-top: clamp(48px, 7vw, 96px);
	padding-top: clamp(36px, 5vw, 56px);
	border-top: 1px solid var(--tix-hair);
}

.af-tix .af-ev-h2 {
	margin: 0 0 22px;
	font-family: var(--tix-font);
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -0.03em;
	color: var(--tix-ink);
	text-wrap: balance;
}
.af-ev-prose {
	max-width: 68ch;
	font-size: 17px;
	line-height: 1.75;
	color: var(--tix-text);
}
.af-ev-prose p { margin: 0 0 1.1em; }
.af-ev-prose p:empty { display: none; }
.af-ev-prose a { color: var(--tix-ink); text-decoration-color: var(--tix-red); text-underline-offset: 3px; }
.af-ev-prose img { max-width: 100%; height: auto; border-radius: 10px; }

.af-ev-aside {
	position: sticky;
	top: calc(76px + var(--wp-admin--admin-bar--height, 0px) + 24px);
	display: grid;
	gap: 16px;
}
.af-ev-card {
	overflow: hidden;
	border-radius: 14px;
	background: var(--tix-paper);
	box-shadow: var(--tix-shadow);
}
.af-tix .af-ev-card__title {
	margin: 0;
	padding: 18px 20px 0;
	font-family: var(--tix-font);
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--tix-ink);
}
.af-ev-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 20px 20px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--tix-soft);
}
.af-ev-card__body p { margin: 0 0 0.6em; }
.af-ev-card__body p:last-child { margin: 0; }
.af-ev-card__body strong { color: var(--tix-ink); font-size: 15.5px; }
.af-ev-card--map .af-ev-card__body { padding-top: 16px; }
.af-ev-map { display: block; width: 100%; height: 220px; border: 0; filter: grayscale(0.35); }
.af-tix .af-ev-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 6px;
	font-weight: 700;
	color: var(--tix-red);
	text-decoration: none;
}
.af-ev-link .af-tix-ico { width: 16px; height: 16px; transition: transform 0.2s ease; }
.af-ev-link:hover .af-tix-ico { transform: translateX(3px); }
.af-ev-card--help { background: var(--tix-ink); }
.af-tix .af-ev-card--help .af-ev-card__title { color: #fff; }
.af-tix .af-ev-card--help a {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
	font-size: 15.5px;
	font-weight: 650;
	color: #fff;
	text-decoration: none;
}
.af-tix .af-ev-card--help a:hover { color: #ff6b6b; }
.af-ev-card--help .af-tix-ico { width: 18px; height: 18px; color: #ff4a4a; }

/* Lepljiva vrstica na telefonu */
.af-ev-bar { display: none; }

/* --------------------------------------------------------------------------
   Odzivnost
   ----------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.af-ev-more { grid-template-columns: 1fr; }
	.af-ev-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.af-ev-card--help { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
	.af-ev-hero { grid-template-columns: 1fr; gap: 24px; }
	.af-ev-poster { position: relative; top: auto; max-width: 560px; width: 100%; margin: 0 auto; }
}

@media (max-width: 759px) {
	.af-ev-facts { grid-template-columns: 1fr; }
	.af-ev-fact + .af-ev-fact { border-left: 0; border-top: 1px solid var(--tix-hair); }
	.af-ev-tickets { margin: 0 -4px; padding: 18px 16px; }
	.af-ev-page form.cart.af-ev-ticket {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"info price"
			"buy buy";
		padding: 16px;
	}
	.af-ev-ticket__info { grid-area: info; }
	.af-ev-ticket__price { grid-area: price; }
	.af-ev-ticket__buy { grid-area: buy; }
	.af-ev-ticket__buy .af-ev-ticket__btn { flex: 1; }
	.af-ev-page form.cart.af-ev-ticket--compact { padding: 12px; }
	.af-ev-aside { grid-template-columns: 1fr; }
	.af-ev-prose { font-size: 16px; }

	.af-ev-bar {
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: 12px;
		z-index: 990;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
		padding: 10px 10px 10px 18px;
		border-radius: 14px;
		background: var(--tix-ink);
		color: #fff;
		box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
		transform: translateY(140%);
		transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
	}
	.af-ev-bar[hidden] { display: none; }
	.af-ev-bar.is-visible { transform: none; }
	.af-ev-bar__price small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #bcb5af; }
	.af-ev-bar__price strong,
	.af-ev-bar__price strong .woocommerce-Price-amount { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
	.af-ev-bar__price { line-height: 1.15; white-space: nowrap; }
	.af-ev-bar__price span { font-size: 12px; color: #bcb5af; }
	.af-tix .af-ev-bar .af-tix-btn { flex: none; min-height: 46px; padding: 0 20px; }
}

/* Na mobilnem naj glava preseže plakat: naslov pred sliko */
@media (max-width: 899px) {
	.af-ev-hero { display: flex; flex-direction: column; }
	.af-ev-main { display: contents; }
	.af-ev-head { order: 1; }
	.af-ev-poster { order: 2; }
	.af-ev-facts { order: 3; }
	.af-ev-lead { order: 4; }
	.af-ev-tickets { order: 5; }
}

@media (prefers-reduced-motion: reduce) {
	.af-ev-bar,
	.af-ev-free__chev,
	.af-ev-link .af-tix-ico { transition: none; }
}
