/* DragonBet Fantasy Manager — squad picker UI. Inherits theme tokens. */

#dbfm-picker {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
	color: #1a1a1a;
	max-width: 1200px;
	margin: 0 auto;
}

/* ───── Top bar ───── */
.dbfm-bar {
	background: linear-gradient(135deg, #000 0%, #8B0000 100%);
	color: #fff;
	border-radius: 14px;
	padding: 18px 22px;
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 16px;
	align-items: center;
	margin-bottom: 24px;
	position: relative;
	overflow: hidden;
}
.dbfm-bar::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 85% 20%, rgba(255,180,0,.20), transparent 60%);
	pointer-events: none;
}
.dbfm-bar > * { position: relative; z-index: 1; }

#dbfm-team-name {
	background: rgba(255,255,255,.1);
	border: 1px solid rgba(255,255,255,.2);
	color: #fff;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 16px;
	font-weight: 700;
	width: 100%;
	max-width: 280px;
}
#dbfm-team-name::placeholder { color: rgba(255,255,255,.5); }
#dbfm-team-name:focus { outline: none; border-color: #FFB400; box-shadow: 0 0 0 3px rgba(255,180,0,.2); }

.dbfm-bar__stats {
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}
.dbfm-stat {
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: center;
	min-width: 60px;
}
.dbfm-stat span {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: rgba(255,255,255,.65);
	font-weight: 800;
}
.dbfm-stat strong {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 20px;
	font-weight: 800;
	color: #fff;
}
.dbfm-stat--pos strong { color: #FFB400; }
.dbfm-stat strong.is-complete { color: #1FAD5A; }
.dbfm-stat strong.is-overspend { color: #E31B23; }

.dbfm-btn {
	background: #E31B23;
	color: #fff;
	border: 0;
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	cursor: pointer;
	transition: all .15s ease;
}
.dbfm-btn:hover:not(:disabled) { background: #fff; color: #E31B23; }
.dbfm-btn:disabled { opacity: .4; cursor: not-allowed; }
.dbfm-btn--primary { background: #FFB400; color: #1A1A1A; }
.dbfm-btn--primary:hover:not(:disabled) { background: #fff; color: #8B0000; }

/* ───── Messages ───── */
#dbfm-msg { margin: 0 0 20px; }
.dbfm-alert {
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 12px;
	font-weight: 600;
}
.dbfm-alert--ok { background: #d4f8de; color: #0f6b33; }
.dbfm-alert--err { background: #ffe5e7; color: #8B0000; }

/* ───── Pitch ───── */
.dbfm-pitch {
	background: linear-gradient(180deg, #1FAD5A 0%, #178a47 100%);
	border-radius: 14px;
	padding: 24px 16px 8px;
	margin-bottom: 24px;
	position: relative;
	min-height: 400px;
}
.dbfm-pitch::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 24px;
	bottom: 130px;
	width: 1px;
	background: rgba(255,255,255,.12);
}
.dbfm-pitch::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100px;
	height: 100px;
	border: 1px solid rgba(255,255,255,.12);
	border-radius: 50%;
	pointer-events: none;
}

.dbfm-row {
	display: flex;
	justify-content: center;
	gap: 12px;
	min-height: 100px;
	margin-bottom: 18px;
	position: relative;
	z-index: 1;
	flex-wrap: wrap;
}

.dbfm-pitch-card {
	background: rgba(0,0,0,.65);
	color: #fff;
	border-radius: 10px;
	min-width: 88px;
	max-width: 120px;
	padding: 10px 8px;
	text-align: center;
	cursor: pointer;
	transition: transform .15s, box-shadow .15s;
	position: relative;
}
.dbfm-pitch-card:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.dbfm-pitch-card img {
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 50%;
	background: #fff;
	margin-bottom: 6px;
}
.dbfm-pitch-card__name {
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	min-height: 26px;
}
.dbfm-pitch-card__price {
	font-size: 10px;
	color: #FFB400;
	font-weight: 800;
	margin-top: 4px;
}
.dbfm-pitch-card__country {
	font-size: 9px;
	color: rgba(255,255,255,.7);
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-top: 2px;
}
.dbfm-pitch-card__remove {
	position: absolute;
	top: -6px;
	right: -6px;
	background: #E31B23;
	color: #fff;
	border: 0;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	display: none;
	font-weight: 800;
}
.dbfm-pitch-card:hover .dbfm-pitch-card__remove { display: block; }

.dbfm-pitch-card.is-captain::after,
.dbfm-pitch-card.is-vice::after {
	content: "C";
	position: absolute;
	top: 4px;
	left: 4px;
	background: #FFB400;
	color: #1A1A1A;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 900;
}
.dbfm-pitch-card.is-vice::after { content: "V"; background: #ccc; }

/* Drag-drop visual states */
.dbfm-pitch-card.is-dragging { opacity: 0.45; cursor: grabbing; }
.dbfm-pitch-card.is-drop-target {
	outline: 3px dashed #FFB400;
	outline-offset: -3px;
}
.dbfm-pitch-card { cursor: grab; }

.dbfm-pitch-card__captain-btn,
.dbfm-pitch-card__vice-btn {
	background: rgba(255,255,255,.1);
	color: #fff;
	border: 1px solid rgba(255,255,255,.2);
	padding: 3px 6px;
	border-radius: 4px;
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
	cursor: pointer;
	margin: 4px 2px 0;
}
.dbfm-pitch-card__captain-btn:hover { background: #FFB400; color: #1A1A1A; }

.dbfm-pitch-slot {
	background: rgba(255,255,255,.08);
	border: 2px dashed rgba(255,255,255,.25);
	border-radius: 10px;
	min-width: 88px;
	min-height: 88px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(255,255,255,.5);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
}

/* ───── Bench ───── */
.dbfm-bench {
	background: rgba(0,0,0,.35);
	border-radius: 10px;
	padding: 14px 16px;
	margin: 18px 0 0;
}
.dbfm-bench__label {
	color: #fff;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-weight: 800;
	margin-bottom: 10px;
	text-align: center;
}
.dbfm-bench__slots {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ───── Pool filters + list ───── */
.dbfm-pool {
	background: #fff;
	border: 1px solid #D8D8DE;
	border-radius: 14px;
	padding: 18px;
}
.dbfm-filters {
	display: grid;
	grid-template-columns: 1fr 1fr 2fr 1fr;
	gap: 10px;
	margin-bottom: 16px;
}
.dbfm-filters select,
.dbfm-filters input {
	padding: 10px 12px;
	border: 1px solid #D8D8DE;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	background: #fff;
}
.dbfm-filters select:focus, .dbfm-filters input:focus {
	outline: none;
	border-color: #E31B23;
}

#dbfm-players {
	max-height: 620px;
	overflow-y: auto;
}
.dbfm-pool-row {
	display: grid;
	grid-template-columns: 40px 1fr 100px 60px 70px 90px;
	gap: 12px;
	align-items: center;
	padding: 10px 8px;
	border-bottom: 1px solid #f4f4f6;
	font-size: 14px;
}
.dbfm-pool-row:hover { background: #fff5f5; }
.dbfm-pool-row img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	background: #f4f4f6;
}
.dbfm-pool-row__name strong {
	display: block;
	font-weight: 700;
	color: #1A1A1A;
}
.dbfm-pool-row__name small {
	font-size: 11px;
	color: #8B8B95;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-weight: 700;
}
.dbfm-pool-row__pos {
	font-size: 10px;
	font-weight: 800;
	background: #f4f4f6;
	color: #4A4A55;
	padding: 4px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	text-align: center;
}
.dbfm-pool-row__pos.is-GK { background: #fff5e0; color: #B47700; }
.dbfm-pool-row__pos.is-DEF { background: #e0f0ff; color: #1968ad; }
.dbfm-pool-row__pos.is-MID { background: #e8ffe5; color: #2a8c1a; }
.dbfm-pool-row__pos.is-FWD { background: #ffe5e7; color: #B40010; }
.dbfm-pool-row__price {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 18px;
	font-weight: 800;
	color: #1A1A1A;
	text-align: right;
}
.dbfm-pool-row__add {
	background: #E31B23;
	color: #fff;
	border: 0;
	padding: 7px 12px;
	border-radius: 999px;
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	cursor: pointer;
}
.dbfm-pool-row__add:hover { background: #8B0000; }
.dbfm-pool-row__add:disabled { background: #ccc; cursor: not-allowed; }
.dbfm-pool-row__add.is-picked { background: #1FAD5A; }

.dbfm-empty {
	padding: 40px;
	text-align: center;
	color: #8B8B95;
}

.dbfm-gate {
	background: #fff;
	border-radius: 12px;
	padding: 32px;
	border: 1px solid #D8D8DE;
	text-align: center;
}

/* ───── Responsive ───── */
@media (max-width: 800px) {
	.dbfm-bar { grid-template-columns: 1fr; }
	.dbfm-bar__stats { flex-wrap: wrap; gap: 10px; }
	.dbfm-filters { grid-template-columns: 1fr 1fr; }
	.dbfm-pool-row {
		grid-template-columns: 40px 1fr 50px 70px;
	}
	.dbfm-pool-row__country, .dbfm-pool-row__pos { display: none; }
}
