/* StatChasers Depth Charts — front-end styles.
   Everything is scoped under .scdc-root and defines its own design tokens so it
   blends onto a white page without inheriting/leaking the host theme's styles. */

.scdc-root {
	--sc-bg: #f7f9fc;
	--sc-card: #ffffff;
	--sc-ink: #172033;
	--sc-muted: #64748b;
	--sc-border: #dbe3ef;
	--sc-navy: #111827;
	--sc-header: #1e3a6e;
	--sc-blue: #0f4fd8;
	--sc-gold: #f6c343;
	--sc-gold-dark: #c99700;
	--sc-gold-soft: #fff6d6;
	--sc-row: #f8fbf7;

	background: #ffffff;
	color: var(--sc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	box-sizing: border-box;
}
.scdc-root *,
.scdc-root *::before,
.scdc-root *::after {
	box-sizing: border-box;
}

/* ---- States ---- */
.scdc-empty,
.scdc-loading,
.scdc-error {
	background: var(--sc-card);
	border: 1px solid var(--sc-border);
	border-top: 4px solid var(--sc-gold);
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
	padding: 3rem 1.5rem;
	text-align: center;
	color: var(--sc-muted);
	font-weight: 500;
}

/* ---- Controls ---- */
.scdc-controls {
	background: var(--sc-card);
	border: 1px solid var(--sc-border);
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	padding: 1rem;
	margin-bottom: 1.5rem;
}
.scdc-controls-row {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 1rem;
}
@media (min-width: 768px) {
	.scdc-controls-row {
		flex-direction: row;
		align-items: center;
	}
}
.scdc-field {
	width: 100%;
}
@media (min-width: 768px) {
	.scdc-field-search { flex: 1 1 auto; }
	.scdc-field-pos { width: 12rem; flex: 0 0 auto; }
	.scdc-field-team { width: 16rem; flex: 0 0 auto; }
	.scdc-field-download { width: auto; flex: 0 0 auto; }
}

/* ---- Download button ---- */
.scdc-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	height: 2.75rem;
	padding: 0 1rem;
	background: var(--sc-header);
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.12s, opacity 0.12s;
}
.scdc-download:hover { background: var(--sc-navy); }
.scdc-download:disabled { opacity: 0.5; cursor: not-allowed; }
.scdc-download svg { display: block; }

.scdc-input,
.scdc-select {
	width: 100%;
	height: 2.75rem;
	padding: 0 0.75rem;
	font-size: 1rem;
	color: var(--sc-ink);
	background: #fff;
	border: 1px solid var(--sc-border);
	border-radius: 8px;
	outline: none;
}
.scdc-select { font-weight: 500; cursor: pointer; }
.scdc-input:focus,
.scdc-select:focus {
	border-color: var(--sc-blue);
	box-shadow: 0 0 0 3px rgba(15, 79, 216, 0.12);
}
.scdc-input::placeholder { color: var(--sc-muted); }

/* ---- Tabs ---- */
.scdc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	padding: 0.25rem;
	background: var(--sc-bg);
	border: 1px solid var(--sc-border);
	border-radius: 0.5rem;
}
.scdc-tab {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--sc-muted);
	font-weight: 600;
	font-size: 0.875rem;
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	cursor: pointer;
}
.scdc-tab:hover { color: var(--sc-navy); }
.scdc-tab.is-active {
	background: linear-gradient(to bottom, var(--sc-gold), var(--sc-gold-dark));
	color: var(--sc-navy);
	font-weight: 700;
	box-shadow: 0 2px 6px rgba(201, 151, 0, 0.35);
}

/* ---- Fantasy disclaimer note ---- */
.scdc-fantasy-note {
	margin: 0 0 1.25rem;
	padding: 0.6rem 0.85rem;
	background: var(--sc-gold-soft);
	border-left: 3px solid var(--sc-gold);
	border-radius: 6px;
	color: var(--sc-ink);
	font-size: 0.85rem;
	font-style: italic;
	line-height: 1.45;
}

/* ---- Team grid ---- */
.scdc-grid {
	display: grid;
	gap: 0.75rem;
	align-items: start;
}
.scdc-team-card {
	background: var(--sc-card);
	border: 1px solid var(--sc-border);
	border-top: 4px solid var(--sc-gold);
	border-radius: 12px;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
	padding: 1.25rem;
}
.scdc-team-head {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
	min-width: 0;
}
.scdc-logo {
	width: 3rem;
	height: 3rem;
	flex: 0 0 auto;
	border-radius: 9999px;
	background: var(--sc-bg);
	border: 1px solid var(--sc-border);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.scdc-logo img { width: 2.1rem; height: 2.1rem; object-fit: contain; }
.scdc-logo span { font-size: 0.7rem; font-weight: 700; color: var(--sc-navy); }
.scdc-team-name {
	font-weight: 700;
	color: var(--sc-navy);
	font-size: 1.05rem;
	line-height: 1.15;
}

/* ---- Position columns ---- */
.scdc-cols {
	overflow-x: auto;
	margin: 0 -0.25rem;
	padding: 0 0.25rem;
}
.scdc-cols-inner {
	display: grid;
	gap: 0.5rem;
}
.scdc-col { min-width: 0; }
.scdc-col-head {
	padding: 0.35rem 0.5rem;
	background: var(--sc-header);
	border: 1px solid var(--sc-header);
	border-bottom: 2px solid var(--sc-gold);
	border-radius: 6px 6px 0 0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.scdc-col-body {
	border: 1px solid var(--sc-border);
	border-top: 0;
	border-radius: 0 0 6px 6px;
	padding: 0.25rem;
	background: var(--sc-card);
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}
.scdc-col-empty { padding: 0.25rem 0.5rem; font-size: 0.75rem; color: rgba(100, 116, 139, 0.6); }

/* ---- Player rows ---- */
.scdc-player {
	display: flex;
	align-items: flex-start;
	gap: 0.375rem;
	padding: 0.25rem 0.5rem;
	border-radius: 6px;
	border: 1px solid transparent;
	background: var(--sc-row);
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.scdc-player:hover {
	background: var(--sc-gold-soft);
	border-color: var(--sc-gold);
}
.scdc-rank {
	width: 1.25rem;
	flex: 0 0 auto;
	text-align: right;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.25rem;
	color: var(--sc-muted);
}
.scdc-name {
	flex: 1 1 auto;
	min-width: 0;
	word-break: break-word;
	line-height: 1.25rem;
	font-size: 0.875rem;
	color: var(--sc-blue);
}
.scdc-move { flex: 0 0 auto; font-size: 0.7rem; line-height: 1.25rem; }
.scdc-move-up { color: #059669; }
.scdc-move-down { color: #ef4444; }

.scdc-badges { display: flex; align-items: center; gap: 0.25rem; flex: 0 0 auto; }
.scdc-badge {
	display: inline-flex;
	align-items: center;
	border-radius: 4px;
	padding: 0 0.25rem;
	font-size: 9px;
	line-height: 1rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}
.scdc-badge-new { background: #dbeafe; color: #1d4ed8; }
.scdc-badge-warn { background: #fef3c7; color: #b45309; }
.scdc-badge-out { background: #fee2e2; color: #dc2626; }

