/* Тэмцээнүүд — EventsPage.jsx */

@import url("board-wash.css");

.ev-page {
	--ink: #141821;
	--chrome: #16181a;
	--green: #17703d;
	--red: #c2211d;
	--gold: #f0a93c;
	--grey: #7f8894;
	--muted: #6c6754;
	--soft: #3f3c33;
	--mono: "IBM Plex Mono", ui-monospace, monospace;
	--display: "Oswald", sans-serif;
	--sans: "Manrope", system-ui, sans-serif;
	margin: 0;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	background: #efe7d0;
	color: var(--ink);
	font-family: var(--sans);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.ev-page *,
.ev-page *::before,
.ev-page *::after {
	box-sizing: border-box;
}

.ev-page a {
	color: inherit;
	text-decoration: none;
}

@keyframes tierSheen {
	0% { left: -40%; opacity: 0; }
	12% { opacity: 1; }
	55% { left: 120%; opacity: 0; }
	100% { left: 120%; opacity: 0; }
}

@keyframes livePulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.35; }
}

.ap-sheen {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: repeating-conic-gradient(
		from 0deg at 84% 120%,
		rgba(255, 255, 255, 0.035) 0deg 9deg,
		transparent 9deg 18deg
	);
}

.ap-sheen-beam {
	position: absolute;
	top: 0;
	height: 100%;
	left: -40%;
	width: 32%;
	pointer-events: none;
	background: linear-gradient(
		105deg,
		transparent,
		rgba(255, 255, 255, 0.14) 45%,
		rgba(255, 255, 255, 0.02) 60%,
		transparent
	);
	transform: skewX(-14deg);
	animation: tierSheen 5.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
	.ap-sheen-beam,
	.ev-live-dot {
		animation: none;
	}
}

/* ---------- header ---------- */

.ap-header {
	position: relative;
	overflow: hidden;
}

.ap-header-in {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
	padding: 16px 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.ap-mark {
	display: flex;
	flex-direction: column;
	line-height: 0.84;
	flex: none;
}

.ap-mark-row {
	display: flex;
	align-items: center;
	gap: 1px;
}

.ap-mark-letter,
.ap-mark-dart {
	font-family: var(--display);
	font-weight: 700;
	font-size: 26px;
	color: #ffffff;
}

.ap-mark-dart {
	letter-spacing: 0.08em;
	margin-top: 3px;
}

.ap-mark-o {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

.ap-mark-bull {
	width: 36%;
	height: 36%;
	border-radius: 50%;
	background: #e0322e;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.ap-nav {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}

.ap-nav a {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.16em;
	color: #cfc9b6;
	padding: 10px 15px;
	border-radius: 8px;
}

.ap-nav a:hover {
	color: #ffffff;
	background: rgba(255, 255, 255, 0.06);
}

.ap-nav-go {
	color: #ffffff !important;
	background: var(--green);
	border-radius: 999px !important;
	padding: 11px 17px !important;
}

.ap-nav-go:hover {
	filter: brightness(1.08);
	background: var(--green) !important;
	color: #ffffff !important;
}

.ap-nav-cta {
	color: var(--gold) !important;
	border: 1px solid var(--gold);
	border-radius: 999px !important;
	padding: 10px 16px !important;
}

.ap-nav-cta:hover {
	color: #ffffff !important;
	background: rgba(240, 169, 60, 0.12) !important;
}

.ap-header-bar {
	height: 3px;
	background: linear-gradient(
		to right,
		#c2211d 0%,
		#c2211d 34%,
		#17703d 34%,
		#17703d 62%,
		rgba(255, 255, 255, 0.14) 62%
	);
}

/* ---------- main / flash / search ---------- */

.ev-main {
	flex: 1;
	max-width: 1240px;
	margin: 0 auto;
	padding: clamp(30px, 5vw, 52px) 32px clamp(40px, 6vw, 72px);
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
}

.pl-flash {
	position: relative;
	overflow: hidden;
	background: var(--chrome);
	border-radius: 6px 26px 6px 26px;
	padding: 24px 26px;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
}

.pl-flash-copy {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 11px;
	min-width: 0;
	max-width: 680px;
}

.pl-kicker {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--gold);
}

.pl-flash h1 {
	margin: 0;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(28px, 4vw, 42px);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #ffffff;
}

.pl-flash-copy p {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: #c6c0b0;
	text-wrap: pretty;
}

.pl-flash-total {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 5px;
	align-items: flex-end;
}

.pl-flash-total span {
	font-family: var(--display);
	font-size: 34px;
	line-height: 1;
	color: #ffffff;
	font-variant-numeric: tabular-nums;
}

.pl-flash-total small {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	color: #a8a294;
}

.pl-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.pl-search {
	flex: 1 1 420px;
	min-width: 240px;
	display: flex;
	align-items: center;
	gap: 12px;
	background: #fff;
	border: 1px solid rgba(20, 24, 33, 0.14);
	border-radius: 4px 16px 4px 16px;
	padding: 14px 18px;
}

.pl-search-icon {
	display: flex;
	color: var(--muted);
	flex: none;
}

.pl-search input {
	border: 0;
	outline: none;
	background: transparent;
	font-family: var(--sans);
	font-size: 14px;
	color: var(--ink);
	width: 100%;
	min-width: 0;
}

.pl-search input::placeholder {
	color: #5c5648;
}

.ev-search-clear {
	flex: none;
	width: 28px;
	height: 28px;
	border: 0;
	border-radius: 999px;
	background: rgba(20, 24, 33, 0.08);
	color: var(--ink);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.ev-search-clear.hidden {
	display: none;
}

.pl-sort {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pl-sort button {
	cursor: pointer;
	border: 1px solid rgba(20, 24, 33, 0.18);
	background: #fff;
	color: var(--soft);
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.14em;
	padding: 12px 16px;
	border-radius: 999px;
}

.pl-sort button.on {
	border-color: var(--chrome);
	background: var(--chrome);
	color: #fff;
}

.ev-note {
	margin: 0;
	min-height: 0;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	color: var(--muted);
}

.ev-note:empty {
	display: none;
}

.ev-host {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ev-empty {
	padding: 22px;
	text-align: center;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.12em;
	color: var(--muted);
	background: #fff;
	border: 1px solid rgba(20, 24, 33, 0.12);
	border-radius: 6px 24px 6px 24px;
}

.ev-empty.hidden {
	display: none;
}

/* ---------- accordion ---------- */

.ev-acc {
	border-radius: 6px 24px 6px 24px;
	overflow: hidden;
	border: 1px solid rgba(20, 24, 33, 0.12);
}

.ev-acc-head {
	width: 100%;
	cursor: pointer;
	border: 0;
	text-align: left;
	position: relative;
	overflow: hidden;
	background: var(--chrome);
	padding: 16px 22px;
	display: flex;
	align-items: center;
	gap: 16px;
	font-family: var(--sans);
}

.ev-acc-head::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image: repeating-conic-gradient(
		from 0deg at 88% 130%,
		rgba(255, 255, 255, 0.03) 0deg 9deg,
		transparent 9deg 18deg
	);
}

.ev-acc-bar {
	position: relative;
	width: 4px;
	align-self: stretch;
	min-height: 34px;
	background: var(--green);
	border-radius: 2px;
	flex: none;
}

.ev-acc.is-red .ev-acc-bar { background: var(--red); }
.ev-acc.is-amber .ev-acc-bar { background: var(--gold); }
.ev-acc.is-grey .ev-acc-bar { background: var(--grey); }

.ev-acc-titles {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.ev-acc-titles strong {
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(17px, 2vw, 21px);
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #fff;
	text-wrap: pretty;
}

.ev-acc-titles small {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	color: #a8a294;
}

.ev-acc-count {
	position: relative;
	font-family: var(--display);
	font-size: 19px;
	line-height: 1;
	color: #4cd8a8;
	font-variant-numeric: tabular-nums;
	flex: none;
}

.ev-acc.is-red .ev-acc-count { color: #f4726d; }
.ev-acc.is-amber .ev-acc-count { color: var(--gold); }
.ev-acc.is-grey .ev-acc-count { color: #c6c0b0; }

.ev-acc-chev {
	position: relative;
	font-family: var(--mono);
	font-size: 13px;
	color: #a8a294;
	flex: none;
	width: 14px;
	text-align: center;
}

.ev-acc-body {
	background: #fff;
}

.ev-acc-body[hidden] {
	display: none;
}

.ev-acc-list {
	display: flex;
	flex-direction: column;
}

.ev-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 15px 22px;
	border-top: 1px solid rgba(20, 24, 33, 0.08);
	background: #fff;
}

.ev-row:nth-child(even) {
	background: #fcfaf4;
}

.ev-row:hover {
	background: #f3eee0;
}

.ev-row-copy {
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
}

.ev-row-copy strong {
	font-family: var(--display);
	font-weight: 500;
	font-size: 19px;
	line-height: 1.1;
	text-transform: uppercase;
	color: var(--ink);
	text-wrap: pretty;
}

.ev-row-meta {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.08em;
	color: var(--muted);
	text-wrap: pretty;
}

.ev-row-when {
	display: flex;
	align-items: baseline;
	gap: 9px;
	flex-wrap: wrap;
}

.ev-row-when .date-abs {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.06em;
	color: var(--ink);
	font-variant-numeric: tabular-nums;
}

.ev-row-when .when-rel {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.1em;
	color: var(--muted);
	font-style: normal;
}

.ev-row-right {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.ev-live-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--red);
	animation: livePulse 1.4s ease-in-out infinite;
}

.ev-badge {
	font-family: var(--mono);
	font-size: 9.5px;
	letter-spacing: 0.14em;
	padding: 7px 12px;
	border-radius: 999px;
	white-space: nowrap;
	border: 1px solid transparent;
}

.ev-badge.is-open {
	color: #fff;
	background: var(--green);
	border-color: var(--green);
}

.ev-badge.is-live {
	color: #fff;
	background: var(--red);
	border-color: var(--red);
}

.ev-badge.is-done,
.ev-badge.is-prep {
	color: var(--soft);
	background: transparent;
	border-color: rgba(20, 24, 33, 0.28);
}

.scroll-sentinel {
	height: 8px;
}

/* ---------- footer / toast ---------- */

.ap-foot {
	position: relative;
	overflow: hidden;
	margin-top: auto;
}

.ap-foot-in {
	position: relative;
	max-width: 1240px;
	margin: 0 auto;
	padding: 22px 32px;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.12em;
	color: #a8a294;
	text-align: center;
	text-transform: uppercase;
}

.ap-foot-in a {
	color: var(--gold);
}

.ap-foot-in a:hover {
	color: #ffffff;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%) translateY(1rem);
	background: rgba(22, 24, 26, 0.94);
	color: #fff;
	padding: 0.55rem 1rem;
	border-radius: 0.4rem;
	opacity: 0;
	pointer-events: none;
	transition: 0.18s;
	z-index: 50;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.08em;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

@media (max-width: 720px) {
	.ap-header-in,
	.ev-main,
	.ap-foot-in {
		padding-inline: 16px;
	}

	.pl-flash {
		padding: 20px 18px;
	}

	.pl-flash-total {
		align-items: flex-start;
	}

	.ev-row {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.ev-row-right {
		justify-content: flex-start;
	}
}
