/**
 * Presale Core
 *
 * Shared Presale styling: CTA buttons and the Urgentiebalk.
 * Colors come from Presale → Kleuren (--kls-presale-* variables).
 * Functional base; the global design pass refines this.
 *
 * @author Elian Meran Rosario
 * @package Klasse_Child_Theme
 */


/* =========================================
   DESIGN TOKENS
   Derived from the client colors (Presale → Kleuren), so every
   club gets its own warm tint without touching this file.
   Direction: soft wellness surfaces (A) + bold, energetic
   accents and micro-motion (C).
   ========================================= */

:root {
	--kls-ps-radius-sm: 10px;
	--kls-ps-radius: 16px;
	--kls-ps-radius-lg: 24px;
	--kls-ps-shadow: 0 12px 32px rgba(16, 29, 48, 0.08);
	--kls-ps-shadow-lift: 0 20px 44px rgba(16, 29, 48, 0.16);
	/* Alternating sections: Kleuren → Afwisselende secties, else a light accent tint. */
	--kls-ps-soft: var(--kls-presale-section, color-mix(in srgb, var(--kls-presale-accent, #6FA7A3) 9%, #FFFFFF));
	--kls-ps-soft-strong: color-mix(in srgb, var(--kls-presale-accent, #6FA7A3) 20%, #FFFFFF);
	--kls-ps-line: color-mix(in srgb, var(--kls-presale-text, #101D30) 12%, transparent);
	--kls-ps-muted: color-mix(in srgb, var(--kls-presale-text, #101D30) 62%, transparent);
	--kls-ps-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes kls-ps-pulse {
	0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
	70%  { box-shadow: 0 0 0 8px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

@keyframes kls-ps-grow {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}


/* =========================================
   BUTTONS
   .kls-presale-btn + --filled | --outline | --soft | --pill
   Pill = main CTA style of the presale pages.
   ========================================= */

.kls-presale-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	box-sizing: border-box;
	padding: 6px 16px;
	/* Variants set these; components may override them (component-styles.php). */
	border: 1px solid var(--kls-btn-border, transparent);
	border-radius: var(--kls-btn-radius, var(--kls-ps-radius-sm));
	background: var(--kls-btn-bg, transparent);
	color: var(--kls-btn-fg, currentColor);
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition:
		transform 0.25s var(--kls-ps-ease),
		box-shadow 0.25s var(--kls-ps-ease),
		background-color 0.2s ease,
		color 0.2s ease,
		border-color 0.2s ease;
}

/* Phones: a long button text wraps instead of running off the screen. */
@media (max-width: 480px) {
	.kls-presale-btn {
		max-width: 100%;
		white-space: normal;
		text-align: center;
	}
}

.kls-presale-btn > span[aria-hidden] {
	display: inline-block;
	transition: transform 0.25s var(--kls-ps-ease);
}

.kls-presale-btn:hover {
	transform: translateY(-2px);
}

.kls-presale-btn:hover > span[aria-hidden] {
	transform: translateX(4px);
}

.kls-presale-btn:active {
	transform: translateY(0);
}

.kls-presale-btn:focus-visible {
	outline: 3px solid var(--kls-presale-accent, #6FA7A3);
	outline-offset: 3px;
}

.kls-presale-btn--filled,
.kls-presale-btn--pill {
	--kls-btn-bg: var(--kls-presale-accent, #6FA7A3);
	/* White or dark, whichever reads best on the accent (settings.php). */
	--kls-btn-fg: var(--kls-presale-on-accent, #FFFFFF);
}

.kls-presale-btn--pill {
	--kls-btn-radius: 999px;
}

.kls-presale-btn--filled:hover,
.kls-presale-btn--pill:hover {
	box-shadow: 0 10px 24px color-mix(in srgb, var(--kls-presale-accent, #6FA7A3) 40%, transparent);
}

.kls-presale-btn--outline {
	--kls-btn-border: var(--kls-presale-accent, #6FA7A3);
	--kls-btn-fg: var(--kls-presale-accent, #6FA7A3);
}

.kls-presale-btn--outline:hover {
	--kls-btn-bg: var(--kls-presale-accent, #6FA7A3);
	--kls-btn-fg: var(--kls-presale-on-accent, #FFFFFF);
}

.kls-presale-btn--soft {
	--kls-btn-bg: rgba(255, 255, 255, 0.12);
	--kls-btn-fg: var(--kls-presale-white, #FFFFFF);
}

.kls-presale-btn--soft:hover {
	--kls-btn-bg: rgba(255, 255, 255, 0.22);
}


/* =========================================
   URGENTIEBALK
   ========================================= */

.kls-presale-urgency {
	/* No z-index: the bar must never cover the (fixed) Klasse navigation. */
	position: relative;
	width: 100%;
	box-sizing: border-box;
	/* --kls-u-*: Presale → Urgentiebalk → Stijl (component-styles.php). */
	background: var(--kls-u-bg, var(--kls-presale-dark, #101D30));
	border-bottom: var(--kls-u-line-width, 1px) solid var(--kls-u-line, var(--kls-presale-accent, #6FA7A3));
	color: var(--kls-u-text, var(--kls-presale-white, #FFFFFF));
}

.kls-presale-urgency .kls-presale-btn {
	border-color: var(--kls-u-btn-bg, var(--kls-btn-border, transparent));
	border-radius: var(--kls-u-btn-radius, var(--kls-btn-radius, var(--kls-ps-radius-sm)));
	background: var(--kls-u-btn-bg, var(--kls-btn-bg, transparent));
	color: var(--kls-u-btn-text, var(--kls-btn-fg, currentColor));
}

.kls-presale-urgency-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--kls-u-justify, center);
	gap: 6px 14px;
	padding: var(--kls-u-pad, 8px) 15px;
	font-size: var(--kls-u-size, 14px);
	font-weight: var(--kls-u-weight, 600);
	line-height: 1.3;
	text-align: center;
}

.kls-presale-urgency-time {
	color: var(--kls-u-time, inherit);
	font-variant-numeric: tabular-nums;
	opacity: 0.85;
}

/*
 * Desktop and mobile navigation both print the bar.
 * Show one per breakpoint (tablet uses the mobile navigation).
 */
.kls-presale-urgency--mobile {
	display: none;
}

@media (max-width: 1024px) {

	.kls-presale-urgency--desktop {
		display: none;
	}

	.kls-presale-urgency--mobile {
		display: block;
	}

	.kls-presale-urgency-inner {
		padding: var(--kls-u-pad, 7px) 10px;
		font-size: var(--kls-u-size, 13px);
		gap: 4px 10px;
	}

}

@media (max-width: 480px) {

	.kls-presale-urgency-inner {
		font-size: var(--kls-u-size, 12px);
	}

	.kls-presale-urgency .kls-presale-btn {
		min-height: 28px;
		padding: 3px 10px;
	}

}

@media (prefers-reduced-motion: reduce) {

	.kls-presale-btn,
	.kls-presale-btn > span[aria-hidden] {
		transition: none;
	}

	.kls-presale-btn:hover,
	.kls-presale-btn:hover > span[aria-hidden] {
		transform: none;
	}

}
