/* TGC Arena: front end. Matches The Arena page design (dark panels, gold accents).
   Theme overrides: set these variables on .tga in your theme, e.g. --tga-display: "Teko", sans-serif; */
.tga {
	--tga-bg: #141414;
	--tga-panel: #1b1b1b;
	--tga-panel-2: #222;
	--tga-border: #2e2e2e;
	--tga-text: #f2f2f2;
	--tga-muted: #a3a3a3;
	--tga-gold: #e3b24f;
	--tga-gold-grad: linear-gradient(180deg, #f6d98a 0%, #e0ad48 55%, #c8952f 100%);
	--tga-green: #22c55e;
	--tga-silver: #d9dde3;
	--tga-bronze: #c4723f;
	--tga-navy: #10152e;
	--tga-navy-border: #3b4fd1;
	--tga-display: inherit;
	--tga-radius: 14px;

	color: var(--tga-text);
	font-size: 15px;
	line-height: 1.45;
	/* Break out of narrow theme content columns; place on a full-width row for best results. */
	width: 100%;
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
.tga *, .tga *::before, .tga *::after { box-sizing: border-box; }
.tga h2, .tga h3, .tga h4 { color: var(--tga-text); margin: 0; }
.tga a { color: inherit; }
.tga .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }

.tga-gold { color: var(--tga-gold); }
.tga-sep { color: var(--tga-muted); margin: 0 8px; }
.tga-empty { color: var(--tga-muted); padding: 24px; text-align: center; background: var(--tga-panel); border: 1px solid var(--tga-border); border-radius: var(--tga-radius); }

.tga-heading { text-align: center; font-family: var(--tga-display); font-weight: 800; font-size: clamp(26px, 4vw, 36px); text-transform: uppercase; letter-spacing: .02em; margin: 0 0 24px !important; }
.tga-heading em { font-style: normal; color: var(--tga-gold); }

/* Buttons */
.tga-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.tga-btn {
	display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; min-width: 140px;
	font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; font-size: 15px;
	border-radius: 6px; text-decoration: none !important; cursor: pointer; border: 1px solid transparent; line-height: 1.1;
}
.tga-btn--gold { background: var(--tga-gold-grad); color: #2a1d05 !important; box-shadow: 0 4px 14px rgba(227, 178, 79, .25); }
.tga-btn--gold:hover { filter: brightness(1.06); }
.tga-btn--dark { background: #2b2b2b; color: var(--tga-text) !important; border-color: #3a3a3a; }
.tga-btn--dark:hover { background: #333; }
.tga-btn--sm { padding: 10px 22px; min-width: 120px; font-size: 14px; }
.tga-link { color: var(--tga-muted) !important; font-size: 14px; }

.tga-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.tga-chip {
	display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px;
	background: var(--tga-navy); border: 1px solid var(--tga-navy-border); color: #fff !important;
	font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; text-decoration: none !important;
}
.tga-chip svg { width: 15px; height: 15px; }

/* Status badges */
.tga-badge {
	display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 5px; font-size: 12.5px; font-weight: 600;
	border: 1px solid currentColor; color: var(--tga-muted); background: rgba(255, 255, 255, .03); white-space: nowrap;
}
.tga-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tga-badge--open { color: var(--tga-green); background: rgba(34, 197, 94, .08); }
.tga-badge--full { color: #f59e0b; }
.tga-badge--live { color: #f43f5e; }
.tga-badge--completed { color: var(--tga-gold); }

/* Next event card */
.tga-next {
	display: grid; grid-template-columns: 230px 1fr; gap: 28px; align-items: center; padding: 26px;
	background: linear-gradient(180deg, #1e1e1e, #171717); border: 1px solid var(--tga-border); border-radius: 18px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .35); margin-bottom: 40px;
}
.tga-next__media .tga-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid #3a3020; display: block; }
.tga-img--blank { display: grid !important; place-items: center; background: radial-gradient(circle at 30% 20%, #4a3a16, #151515 70%); font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; color: var(--tga-gold); text-align: center; padding: 12px; font-size: 22px; }
.tga-next__body { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; }
.tga-next__title { font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3vw, 30px); letter-spacing: .01em; }
.tga-next__desc { margin: 0; color: #d4d4d4; font-size: 14px; }
.tga-prize { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 16px; border-radius: 10px; border: 1px solid #3a3226; background: linear-gradient(90deg, #2a2418, #1c1b19); }
.tga-prize svg { width: 30px; height: 30px; color: var(--tga-gold); flex: 0 0 30px; }
.tga-prize small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #cfcfcf; }
.tga-prize strong { font-size: 15px; }
.tga-next__actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; width: 100%; }

/* Tabs */
.tga-tabs, .tga-subtabs { display: flex; gap: 28px; border-bottom: 1px solid #6b5a33; margin-bottom: 26px; overflow-x: auto; }
.tga-tab, .tga-subtab {
	position: relative; background: none; border: 0; padding: 0 0 12px; cursor: pointer; white-space: nowrap;
	font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; letter-spacing: .03em; font-size: 17px; color: #b8b8b8;
}
.tga-tab.is-active, .tga-subtab.is-active { color: var(--tga-gold); }
.tga-tab:focus:not(:focus-visible), .tga-subtab:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.tga-tab:focus-visible, .tga-subtab:focus-visible { outline: 2px solid var(--tga-gold); outline-offset: 4px; }
.tga-tab.is-active::after, .tga-subtab.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--tga-gold-grad); }
.tga-tab.is-active::before { content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--tga-gold); }
.tga-subtabs { gap: 20px; border-bottom-color: var(--tga-border); margin-bottom: 18px; }
.tga-subtab { font-size: 14px; }

/* Event rows */
.tga-rows { display: flex; flex-direction: column; gap: 18px; }
.tga-row {
	display: grid; grid-template-columns: 54px 1fr auto; gap: 26px; align-items: center; padding: 18px 22px;
	background: linear-gradient(180deg, #1e1e1e, #181818); border: 1px solid var(--tga-border); border-radius: var(--tga-radius);
}
.tga-date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; border: 1px solid #3a3a3a; border-radius: 8px; background: #151515; line-height: 1; font-family: var(--tga-display); text-transform: uppercase; }
.tga-date b { font-size: 22px; }
.tga-date span { font-size: 12px; font-weight: 800; color: #d4d4d4; margin-top: 3px; }
.tga-row__info h4 { font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; font-size: 18px; letter-spacing: .01em; }
.tga-row__meta, .tga-row__prize { margin: 4px 0 0; font-size: 13px; color: #d4d4d4; }
.tga-row__end { display: flex; align-items: center; gap: 18px; }

/* Leaderboard */
.tga-board { background: linear-gradient(180deg, #1d1d1d, #171717); border: 1px solid var(--tga-border); border-radius: 18px; padding: 26px; }
.tga-board__head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.tga-board__icon { width: 48px; height: 48px; border-radius: 10px; border: 1px solid #3a3226; background: #201d17; display: grid; place-items: center; color: var(--tga-gold); }
.tga-board__icon svg { width: 26px; height: 26px; }
.tga-board__head h3 { font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; font-size: 18px; }
.tga-board__head p { margin: 2px 0 0; font-size: 12.5px; color: #cfcfcf; }
.tga-season { margin-left: auto; }
.tga-season select { background: #151515; color: var(--tga-text); border: 1px solid #3a3a3a; border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; }

.tga-table-wrap { overflow-x: auto; }
.tga-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; font-size: 13px; }
.tga-table th { text-align: left; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #bdbdbd; padding: 10px 14px; background: #232323; white-space: nowrap; }
.tga-table th:first-child { border-radius: 6px 0 0 6px; padding-left: 24px; }
.tga-table th:last-child { border-radius: 0 6px 6px 0; }
.tga-table td { padding: 13px 14px; background: #1f1f1f; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.tga-table td:first-child { border-left: 1px solid #2a2a2a; border-radius: 6px 0 0 6px; padding-left: 24px; }
.tga-table td:last-child { border-right: 1px solid #2a2a2a; border-radius: 0 6px 6px 0; }
.tga-num { text-align: center !important; }
.tga-rank { font-family: var(--tga-display); font-size: 16px; }
.tga-crown { width: 20px; height: 20px; vertical-align: -4px; margin-right: 8px; }
.tga-pts { color: var(--tga-gold); }
.tga-win { font-family: var(--tga-display); font-size: 16px; }
.tga-top--1 td { background: #2f2817; border-color: var(--tga-gold) !important; }
.tga-top--1 .tga-crown, .tga-top--1 .tga-win { color: var(--tga-gold); }
.tga-top--2 td { background: #26272a; border-color: var(--tga-silver) !important; }
.tga-top--2 .tga-crown { color: var(--tga-silver); }
.tga-top--3 td { background: #2f1f17; border-color: #7a4428 !important; }
.tga-top--3 .tga-crown, .tga-top--3 .tga-win { color: var(--tga-bronze); }

/* Single event page */
.tga-single__top { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; padding: 20px; background: var(--tga-panel); border: 1px solid var(--tga-border); border-radius: var(--tga-radius); }
.tga-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 24px; margin: 0; }
.tga-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--tga-muted); }
.tga-facts dd { margin: 2px 0 0; font-weight: 700; }
.tga-single__content { margin-bottom: 24px; }
.tga-register, .tga-results, .tga-me { padding: 22px; background: var(--tga-panel); border: 1px solid var(--tga-border); border-radius: var(--tga-radius); scroll-margin-top: 90px; }
.tga-register h3, .tga-results h3, .tga-me h3 { font-family: var(--tga-display); font-weight: 800; text-transform: uppercase; font-size: 20px; margin-bottom: 12px; }
.tga-register__spots { color: var(--tga-muted); font-size: 13px; margin: 0 0 12px; }
.tga-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.tga-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; flex: 1 1 240px; }
.tga-form input { padding: 11px 12px; border-radius: 6px; border: 1px solid #3a3a3a; background: #141414; color: var(--tga-text); font: inherit; }
.tga-msg { padding: 10px 14px; border-radius: 8px; background: #262626; margin: 0 0 12px; font-size: 14px; }
.tga-msg--ok { background: rgba(34, 197, 94, .1); color: #bbf7d0; }
.tga-msg--err { background: rgba(244, 63, 94, .1); color: #fecdd3; }

/* My Arena */
.tga-me { margin-bottom: 24px; }
.tga-me__season { margin: -6px 0 14px; color: var(--tga-muted); font-size: 13px; }
.tga-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tga-stat { padding: 12px; border-radius: 10px; background: #151515; border: 1px solid var(--tga-border); text-align: center; }
.tga-stat b { display: block; font-family: var(--tga-display); font-size: 24px; }
.tga-stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--tga-muted); }
.tga-stat--total { border-color: #6b5a33; }
.tga-stat--total b { color: var(--tga-gold); }
.tga-me__life { font-size: 13px; color: var(--tga-muted); margin: 12px 0 0; }
.tga-me h4 { font-size: 14px; text-transform: uppercase; margin: 16px 0 8px; }
.tga-mine { list-style: none; margin: 0; padding: 0; }
.tga-mine li { padding: 6px 0; border-top: 1px solid var(--tga-border); display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.tga-mine span { color: var(--tga-muted); }

/* Phones */
@media (max-width: 720px) {
	.tga-next { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
	.tga-next__media .tga-img { aspect-ratio: 16 / 9; }
	.tga-row { grid-template-columns: 50px 1fr; gap: 14px; padding: 14px; }
	.tga-row__end { grid-column: 1 / -1; justify-content: space-between; }
	.tga-board { padding: 16px; }
	.tga-tabs { gap: 18px; }
	.tga-tab { font-size: 15px; }
	.tga-stats { grid-template-columns: repeat(2, 1fr); }
	.tga-table td, .tga-table th { padding: 10px; }
	.tga-table td:first-child, .tga-table th:first-child { padding-left: 12px; }
}
