/* ============================================================
   All Star Voting v2.0.7 — NBA-inspired layout
   TEBA colour palette: white cards, #bcae8b gold/tan buttons
   ============================================================ */

:root {
	--asv-gold:    #bcae8b;
	--asv-red:     #dc1d3e;
	--asv-black:   #111111;
	--asv-dark:    #0d1b3e;
	--asv-grey:    #f4f4f4;
	--asv-border:  #e0e0e0;
	--asv-text:    #111111;
	--asv-muted:   #666666;
}

/* ============================================================
   Search bar
   ============================================================ */
.all-star-voting {
	font-family: inherit;
	position: relative;
}

.asv-search-bar {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin-bottom: 0;
}

.all-star-voting #search_players {
	flex: 1;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: .08em;
	padding: .9rem 1.5rem;
	border: 2px solid var(--asv-border);
	border-right: none;
	border-radius: 0;
	outline: none;
	background: #fff;
	color: var(--asv-text);
	height: auto;
	width: auto;
}

.all-star-voting #search_players::placeholder {
	color: #aaa;
	font-weight: 500;
}

.all-star-voting #search_players:focus {
	border-color: var(--asv-gold);
}

.asv-filter-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: .9rem 1.4rem;
	background: var(--asv-gold);
	color: #fff;
	border: none;
	cursor: pointer;
	font-weight: 700;
	font-size: .7rem;
	letter-spacing: .1em;
	transition: background .2s;
	min-width: 80px;
}

.asv-filter-btn:hover { background: #a89870; }
.asv-filter-btn svg { display: block; }

/* ============================================================
   Sort tab bar
   ============================================================ */
.asv-sort-bar {
	display: flex;
	align-items: center;
	gap: 0;
	padding: .5rem 0 1.5rem;
	border-bottom: 2px solid var(--asv-border);
	margin-bottom: 1.5rem;
}

.asv-sort {
	font-size: .85rem;
	font-weight: 700;
	letter-spacing: .1em;
	color: var(--asv-muted);
	text-decoration: none !important;
	padding: .5rem 1.2rem;
	border-bottom: 3px solid transparent;
	transition: color .2s, border-color .2s;
}

.asv-sort:hover {
	color: var(--asv-gold);
}

.asv-sort.actvBrd {
	color: var(--asv-gold) !important;
	border-bottom: 3px solid var(--asv-gold) !important;
	font-weight: 800;
}

/* ============================================================
   Player grid container
   ============================================================ */
.all-star-voting .asv_container {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
	align-items: start;
}

/* ============================================================
   Player card — DESKTOP vertical (number/photo/info/button stacked)
   MOBILE: switches to horizontal via media query below
   ============================================================ */
.asv-player-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--asv-border);
	border-radius: 8px;
	overflow: hidden;
	transition: transform .2s, box-shadow .2s;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.asv-player-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0,0,0,.12);
}

/* Photo column — full width on desktop (stacked layout) */
.asv-card-photo-col {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	width: 100%;
}

.asv-card-photo-wrap {
	position: relative;
	background: var(--asv-grey);
	overflow: hidden;
	height: 200px;
	max-height: 200px;
}

.asv-card-number {
	position: absolute;
	top: 4px;
	left: 8px;
	font-size: 3rem;
	font-weight: 900;
	color: rgba(0,0,0,.12);
	line-height: 1;
	z-index: 1;
	user-select: none;
}

.asv-card-photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center bottom;
	position: relative;
	z-index: 2;
}

.asv-card-photo--empty {
	width: 100%;
	height: 110px;
	background: var(--asv-grey);
}

.asv-card-team-badge {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 32px;
	height: 32px;
	object-fit: contain;
	z-index: 3;
	background: rgba(255,255,255,.85);
	border-radius: 50%;
	padding: 2px;
}

/* Vote button — sits at bottom of photo column */
.asv-vote-btn {
	display: block;
	width: 100%;
	padding: .7rem 0;
	text-align: center;
	font-size: .8rem;
	font-weight: 800;
	letter-spacing: .12em;
	color: #fff !important;
	background: var(--asv-gold);
	text-decoration: none !important;
	border: none;
	cursor: pointer;
	transition: background .2s;
}

.asv-vote-btn:hover { background: #a89870 !important; }
.asv-vote-btn.asv-voted { background: var(--asv-red) !important; }
.asv-vote-btn.asv-voted:hover { background: #b8162f !important; }
.asv-vote-btn.loading { opacity: .6; pointer-events: none; cursor: wait; }

/* Right column — name, subtitle, stats */
.asv-card-info-col {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: .8rem 1rem;
	min-width: 0;
}

.asv-card-name {
	font-size: .9rem;
	font-weight: 800;
	letter-spacing: .04em;
	color: var(--asv-text) !important;
	margin: 0 0 .2rem !important;
	line-height: 1.2;
	text-decoration: none !important;
	border: none !important;
}

.asv-card-subtitle {
	font-size: .65rem;
	font-weight: 600;
	color: var(--asv-muted);
	letter-spacing: .06em;
	margin: 0 0 .5rem !important;
	text-decoration: none !important;
}

.asv-card-divider {
	border: none !important;
	border-top: 1px dotted #ccc !important;
	margin: .4rem 0 .5rem !important;
	background: none !important;
	height: 0 !important;
}

.asv-card-stats {
	display: flex;
	gap: .8rem;
	flex-wrap: wrap;
	margin-bottom: .4rem;
}

.asv-card-stats span {
	font-size: .75rem;
	font-weight: 700;
	color: var(--asv-text);
	text-decoration: none !important;
	white-space: nowrap;
}

.asv-card-vote-count {
	font-size: .7rem;
	font-weight: 700;
	color: var(--asv-red);
	text-decoration: none !important;
	white-space: nowrap;
}

/* ============================================================
   Filter overlay — full screen takeover
   ============================================================ */
.asv-menu-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.7);
	z-index: 99998;
	opacity: 0;
	transition: opacity .3s;
}

.asv-menu-overlay.asv-overlay-active {
	display: block;
	opacity: 1;
}

/* ============================================================
   Filter overlay panel
   ============================================================ */
.asv-filter-overlay {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(400px, 100vw);
	background: #0d1b3e;
	color: #fff;
	z-index: 99999;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 0 0 0;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	box-sizing: border-box;
}

.asv-filter-overlay.asv-filter-open {
	transform: translateX(0);
}

.asv-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.2rem 1.2rem .9rem;
	border-bottom: 1px solid rgba(255,255,255,.08);
	position: sticky;
	top: 0;
	background: #0d1b3e;
	z-index: 2;
}

.asv-filter-title {
	font-size: 1.3rem !important;
	font-weight: 900 !important;
	letter-spacing: .14em !important;
	color: #fff !important;
	margin: 0 !important;
	text-transform: uppercase;
	padding: 0 !important;
	border: none !important;
}

.asv-filter-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.4rem;
	cursor: pointer;
	padding: .4rem .6rem;
	line-height: 1;
	opacity: .6;
	transition: opacity .2s;
	flex-shrink: 0;
}

.asv-filter-close:hover { opacity: 1; }

.asv-filter-section {
	padding: 1.2rem 1.2rem 0;
}

.asv-filter-label {
	display: block;
	font-size: .68rem !important;
	font-weight: 800 !important;
	letter-spacing: .14em !important;
	color: rgba(255,255,255,.45) !important;
	text-transform: uppercase;
	margin: 0 0 .65rem !important;
	padding: 0 0 .35rem !important;
	border: none !important;
	border-bottom: 1px solid rgba(255,255,255,.08) !important;
	background: none !important;
}

/* ============================================================
   Position segmented buttons — wrapping flex for many positions
   ============================================================ */
.asv-seg-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border: none;
	border-radius: 0;
	overflow: visible;
}

.asv-seg-btn {
	flex: 0 0 auto;
	padding: .5rem .9rem;
	font-size: .68rem;
	font-weight: 800;
	letter-spacing: .08em;
	text-align: center;
	background: rgba(255,255,255,.07);
	color: rgba(255,255,255,.65);
	border: 1px solid rgba(255,255,255,.15) !important;
	border-radius: 3px;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
	white-space: nowrap;
}

.asv-seg-btn:hover {
	background: rgba(255,255,255,.14);
	color: #fff;
	border-color: rgba(255,255,255,.35) !important;
}

.asv-seg-btn.active {
	background: var(--asv-gold);
	color: #fff;
	border-color: var(--asv-gold) !important;
}

/* Court group buttons — bolder border to visually separate from individual positions */
.asv-court-btn {
	border-color: var(--asv-gold) !important;
	color: var(--asv-gold);
	font-style: normal;
}

.asv-court-btn.active {
	background: var(--asv-gold);
	color: #fff;
}

/* ============================================================
   Team grid — 3 columns
   ============================================================ */
.asv-team-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-top: .25rem;
}

.asv-team-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: .7rem .4rem;
	background: rgba(255,255,255,.05);
	border: 1px solid rgba(255,255,255,.1);
	border-radius: 6px;
	cursor: pointer;
	transition: background .2s, border-color .2s;
	min-height: 85px;
}

.asv-team-tile:hover {
	background: rgba(255,255,255,.1);
	border-color: var(--asv-gold);
}

.asv-team-tile.active {
	background: rgba(188,174,139,.25);
	border-color: var(--asv-gold);
	border-width: 2px;
}

/* ALL tile — no logo so needs stronger text styling */
.asv-team-tile-all {
	font-size: .85rem;
	font-weight: 900;
	letter-spacing: .1em;
	color: #fff;
}

.asv-team-tile-all.active,
.asv-team-tile.active .asv-team-tile-all {
	color: #fff;
}

.asv-team-tile img {
	width: 44px;
	height: 44px;
	object-fit: contain;
	display: block;
}

.asv-team-tile-label {
	font-size: .58rem;
	font-weight: 800;
	letter-spacing: .04em;
	color: rgba(255,255,255,.8);
	text-align: center;
	line-height: 1.3;
	word-break: break-word;
}

/* ============================================================
   Vote History tab
   ============================================================ */
.voteHistory table th { font-size: 14px; }
.voteHistory table tr td { font-size: 14px; vertical-align: middle; text-decoration: none !important; }
.voteHistory table tr td img { width: 40px; border-radius: 50%; border: 2px solid var(--asv-border); }

/* ============================================================
   Leaderboard shortcodes
   ============================================================ */
.asv-leaderboard-wrap { margin: 20px 0; }
.asv-leaderboard-title { margin: 0 0 12px; font-size: 22px; font-weight: 800; }
.asv-leaderboard { display: flex; flex-direction: column; gap: 8px; }
.asv-leaderboard-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 6px; background: #111; color: #fff; }
.asv-leaderboard-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.asv-rank { font-weight: 900; color: var(--asv-gold); min-width: 32px; font-size: .85rem; }
.asv-leaderboard-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.asv-leaderboard-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.asv-leaderboard-votes { font-weight: 700; font-size: .85rem; }
.asv-empty-state { padding: 16px; border: 1px dashed #ccc; border-radius: 6px; background: #fafafa; }
.asv-notice { padding: 12px 16px; border-radius: 4px; margin: 10px 0; }
.asv-notice-warning { background: #fff8e1; border: 1px solid var(--asv-gold); color: #7a5c00; }

/* ============================================================
   Toastr
   ============================================================ */
.toast-success { background-color: #51A351 !important; }
.toast-warning { background-color: #F89406 !important; }
.toast-info    { background-color: #2F96B4 !important; }

/* ============================================================
   WooCommerce
   ============================================================ */
.woocommerce-form-row input[type="checkbox"] { display: block !important; }

/* ============================================================
   Responsive — mobile (≤ 640px)
   ============================================================ */
/* ============================================================
   Responsive — tablet (≤ 900px): 2 columns
   ============================================================ */
@media (max-width: 900px) {
	.all-star-voting .asv_container {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
}

/* ============================================================
   Responsive — mobile (≤ 640px): horizontal card list
   ============================================================ */
@media (max-width: 640px) {
	/* Switch to single-column horizontal cards */
	.all-star-voting .asv_container {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	/* Card becomes horizontal: photo-col left, info-col right */
	.asv-player-card {
		flex-direction: row;
	}

	.asv-card-photo-col {
		width: 110px;
		flex-shrink: 0;
	}

	.asv-card-info-col {
		flex: 1;
		min-width: 0;
	}

	.asv-card-number    { font-size: 2.2rem; }
	.asv-card-name      { font-size: .82rem !important; }
	.asv-card-subtitle  { font-size: .6rem; }
	.asv-card-stats     { gap: .5rem; }
	.asv-card-stats span { font-size: .68rem; }
	.asv-sort           { font-size: .75rem; padding: .5rem .7rem; }
	.asv-filter-btn     { min-width: 64px; padding: .9rem .8rem; }
}

@media (max-width: 400px) {
	.asv-card-photo-col { width: 95px; }
	.asv-card-number    { font-size: 1.8rem; }
	.asv-team-grid      { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Leaderboard responsive
   ============================================================ */
@media (max-width: 767px) {
	.asv-leaderboard-item { flex-direction: column; align-items: flex-start; }
	.asv-leaderboard-votes { padding-left: 42px; }
}

/* asv-court-btn styles moved to filter panel section above */

/* ============================================================
   Leaderboard position filter bar
   ============================================================ */
.asv-lb-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 14px;
}

.asv-lb-filter-btn {
	padding: .4rem .9rem;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .08em;
	background: transparent;
	color: var(--asv-muted);
	border: 1px solid var(--asv-border);
	border-radius: 3px;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
	white-space: nowrap;
}

.asv-lb-filter-btn:hover {
	border-color: var(--asv-gold);
	color: var(--asv-gold);
}

.asv-lb-filter-btn.active {
	background: var(--asv-gold);
	border-color: var(--asv-gold);
	color: #fff;
}

/* ============================================================
   Player card — vote rank badge
   Positioned bottom-left of the photo area
   ============================================================ */
.asv-card-rank {
	position: absolute;
	bottom: 6px;
	left: 6px;
	z-index: 4;
	font-size: .65rem;
	font-weight: 900;
	letter-spacing: .04em;
	color: #fff;
	background: #888;
	padding: 2px 6px;
	border-radius: 3px;
	line-height: 1.4;
	white-space: nowrap;
}

.asv-card-rank--gold   { background: #c9a227; }
.asv-card-rank--silver { background: #8a9ba8; }
.asv-card-rank--bronze { background: #a0522d; }

/* ============================================================
   Filter panel — sticky "View Your Picks" CTA at bottom
   ============================================================ */
.asv-filter-cta {
	position: relative;
	width: 100%;
	background: #0d1b3e;
	padding: 1rem 1.2rem 1.5rem;
	border-top: 1px solid rgba(255,255,255,.1);
	box-sizing: border-box;
	margin-top: 1.5rem;
}

.asv-filter-cta-btn {
	display: block;
	width: 100%;
	padding: .9rem;
	text-align: center;
	font-size: .8rem;
	font-weight: 900;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #fff !important;
	background: transparent;
	border: 2px solid var(--asv-gold);
	border-radius: 4px;
	cursor: pointer;
	transition: background .2s, color .2s;
	text-decoration: none !important;
}

.asv-filter-cta-btn:hover {
	background: var(--asv-gold);
	color: #fff !important;
}

/* ============================================================
   Leaderboard search bar
   ============================================================ */
.asv-lb-search-wrap {
	margin-bottom: 14px;
}

.asv-lb-search {
	width: 100%;
	box-sizing: border-box;
	font-size: .9rem;
	font-weight: 600;
	letter-spacing: .04em;
	padding: .65rem 1rem;
	border: 2px solid var(--asv-border);
	border-radius: 4px;
	outline: none;
	background: #fff;
	color: var(--asv-text);
	transition: border-color .2s;
}

.asv-lb-search::placeholder {
	color: #aaa;
	font-weight: 400;
}

.asv-lb-search:focus {
	border-color: var(--asv-gold);
}
