/**
 * Button — .slist-btn + variants.
 *
 * Usage:
 *   <a class="slist-btn slist-btn--primary">Buy</a>
 *   <button class="slist-btn slist-btn--secondary">Details</button>
 *   <a class="slist-btn slist-btn--ghost">Cancel</a>
 *   <button class="slist-btn slist-btn--sticky">Buy tickets</button>
 *
 * Sentence case by default. Radius 10px (Apple continuous corners).
 */

.slist-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--slist-space-2);
	padding: 12px 24px;
	font-family: var(--slist-font-body);
	font-weight: var(--slist-weight-bold);
	font-size: 14px;
	line-height: 1;
	letter-spacing: var(--slist-ls-none);
	text-decoration: none;
	text-transform: none;
	border: 1px solid transparent;
	border-radius: var(--slist-radius-md);  /* 10px */
	cursor: pointer;
	background: transparent;
	color: inherit;
	transition:
		background var(--slist-transition-fast),
		border-color var(--slist-transition-fast),
		color var(--slist-transition-fast),
		transform var(--slist-transition-fast);
	-webkit-appearance: none;
	appearance: none;
}

.slist-btn:focus-visible {
	box-shadow: var(--slist-focus-ring);
	outline: none;
}

.slist-btn:active {
	transform: translateY(1px);
}

/* ---- Variants ---- */

.slist-btn--primary {
	background: var(--slist-primary);
	color: #ffffff;
	border-color: var(--slist-primary);
}

.slist-btn--primary:focus-visible {
	background: var(--slist-primary-hover);
	border-color: var(--slist-primary-hover);
	color: #ffffff;
}

@media (hover: hover) {
	.slist-btn--primary:hover {
		background: var(--slist-primary-hover);
		border-color: var(--slist-primary-hover);
		color: #ffffff;
}
}

.slist-btn--secondary {
	background: rgba(255, 255, 255, 0.08);
	color: var(--slist-text-primary);
	border-color: transparent;
}

.slist-btn--secondary:focus-visible {
	background: rgba(255, 255, 255, 0.14);
	border-color: transparent;
}

@media (hover: hover) {
	.slist-btn--secondary:hover {
		background: rgba(255, 255, 255, 0.14);
		border-color: transparent;
}
}

.slist-btn--ghost {
	background: transparent;
	color: var(--slist-text-secondary);
	border-color: var(--slist-separator);
}

.slist-btn--ghost:focus-visible {
	background: rgba(255, 255, 255, 0.06);
	color: var(--slist-text-primary);
}

@media (hover: hover) {
	.slist-btn--ghost:hover {
		background: rgba(255, 255, 255, 0.06);
		color: var(--slist-text-primary);
}
}

/* ---- Sizes ---- */

.slist-btn--sm {
	padding: 8px 16px;
	font-size: 12px;
	border-radius: 8px;
}

.slist-btn--lg {
	padding: 14px 32px;
	font-size: 15px;
	border-radius: 12px;
}

.slist-btn--block {
	display: flex;
	width: 100%;
	text-align: center;
	border-radius: 12px;
	padding: 14px 24px;
	font-size: 15px;
}

/* ---- Sticky buy button (mobile CTA) ---- */

/*
 * Two render contracts driven by the markup:
 *
 *   1. Always-on (no data-observe-target) — event pages. Visible from
 *      first paint, JS only wires the click→smooth-scroll handler.
 *
 *   2. Scroll-past gated (data-observe-target=".some-selector") — shop
 *      PDPs. Hidden from first paint via the [data-observe-target]
 *      attribute selector below. JS adds .is-revealed once the inline
 *      target has scrolled above the viewport.
 *
 * The attribute selector is what eliminates FOUC on PDP — the button is
 * already in its correct (hidden) state at first paint, before any JS
 * runs. Footer-loaded scripts can't compete with first-paint timing
 * otherwise.
 */
.slist-btn--sticky {
	position: fixed;
	bottom: calc(env(safe-area-inset-bottom, 0px) + var(--slist-space-3));
	/*
	 * Content-sized + centered. Comfortable padding for thumb-tappable
	 * size without dominating the viewport (full-width was covering the
	 * footer area on narrow phones).
	 */
	left: 50%;
	transform: translateX(-50%);
	width: max-content;
	max-width: calc(100vw - var(--slist-space-7));
	margin: 0;
	padding: 14px 40px;
	font-size: 16px;
	/*
	 * Outlined CTA pattern: TRUE BLACK bg + red text + 1.5px red border + a
	 * subtle outer red glow for visual lift. Surface gray was rejected by
	 * user — they want pure black. Visibility comes from border weight + the
	 * glow ring, not bg contrast.
	 */
	background: var(--slist-bg, #000000);
	color: var(--slist-primary);
	border: 1.5px solid var(--slist-primary);
	border-radius: 12px;
	font-size: 15px;
	font-weight: var(--slist-weight-semibold);
	z-index: var(--slist-z-sticky);
	/* Outer red glow ring + ambient shadow — lifts the all-black button off
	   the all-black page bg without surrendering true-black identity. */
	box-shadow:
		0 0 0 1px rgba(255, 0, 0, 0.25),
		0 0 16px rgba(255, 0, 0, 0.15),
		var(--slist-shadow-md);
	cursor: pointer;
	transition:
		opacity var(--slist-transition-default),
		transform var(--slist-transition-default),
		background var(--slist-transition-fast),
		color var(--slist-transition-fast);
}

/* Scroll-past-gated surfaces: hidden by default until JS reveals. */
.slist-btn--sticky[data-observe-target] {
	opacity: 0;
	transform: translateY(120%);
	pointer-events: none;
}

.slist-btn--sticky[data-observe-target].is-revealed {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.slist-btn--sticky:focus-visible {
	background: var(--slist-primary);
	color: #ffffff;
}

@media (hover: hover) {
	.slist-btn--sticky:hover {
		background: var(--slist-primary);
		color: #ffffff;
}
}

.slist-btn--sticky:active {
	transform: scale(0.985);
}

/*
 * NOTE: no `@media (min-width: 1024px) { .slist-btn--sticky { display: none } }`
 * desktop-hide block. Perfmatters' used-CSS scanner strips simple @media
 * wrappers where the inner rule has only one declaration, leaving the naked
 * rule to apply universally — caught a `display:none` leaking onto mobile via
 * this exact path on 2026-04-27 (commit context: 30b8f5f → 8a7***).
 *
 * The sticky CTA is now allowed on desktop. The IO observer hides it whenever
 * the inline ATC is in viewport, which on desktop with sticky gallery is most
 * of the time anyway. Pattern matches Apple Store + Shopify desktop behavior.
 */


/* ---- Pill button — for tags and filters ---- */

.slist-btn--pill {
	padding: 6px 14px;
	font-size: 12px;
	border-radius: var(--slist-radius-pill);
	letter-spacing: 0.01em;
	text-transform: none; /* sentence case — per brand rule. Long labels
	                         (DARK CULTURE, RECOMMENDATIONS) were shouting
	                         in ALL CAPS per audit. */
	font-weight: var(--slist-weight-medium);
	background: rgba(255, 255, 255, 0.06);
	color: var(--slist-text-secondary);
	border: 1px solid var(--slist-separator);
}

.slist-btn--pill:focus-visible {
	background: rgba(255, 255, 255, 0.10);
	border-color: var(--slist-separator-medium);
	color: var(--slist-text-primary);
}

@media (hover: hover) {
	.slist-btn--pill:hover {
		background: rgba(255, 255, 255, 0.10);
		border-color: var(--slist-separator-medium);
		color: var(--slist-text-primary);
}
}

.slist-btn--pill.is-active {
	background: var(--slist-primary);
	border-color: var(--slist-primary);
	color: #ffffff;
}

/* ---- Disabled ---- */

.slist-btn[disabled],
.slist-btn.is-disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* ---- Platform brand colors (chats page) ---- */

.slist-btn--whatsapp {
	color: #25d366;
	border-color: #25d366;
}

.slist-btn--telegram {
	color: #0088cc;
	border-color: #0088cc;
}

.slist-btn--discord {
	color: #5865f2;
	border-color: #5865f2;
}
