/* Verified Sports Core — Athletic Director Dashboard Styles
   Reuses the --ce-* tokens from sideline-core.css (enqueued alongside this
   file) so the AD dashboard matches the coach-facing dashboards. */

.vsc-ad-dashboard {
	padding: 20px;
	max-width: 1200px;
}

/* Stats Cards */
.vsc-ad-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-bottom: 40px;
}

/* Fixed 3-across (2 rows of 3) for the six % stat cards, matching the
   auto-fit top row's look but explicit since 6 cards otherwise wrap 4+2
   depending on viewport width. */
.vsc-ad-stats--pct {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
	.vsc-ad-stats--pct {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.vsc-ad-stats--pct {
		grid-template-columns: 1fr;
	}
}

.vsc-ad-stat-card {
	display: flex;
	align-items: center;
	gap: 16px;
	background: var(--ce-accent-light, #eff6ff);
	border: 1px solid var(--ce-accent, #1D4ED8);
	border-radius: var(--ce-radius, 8px);
	padding: 20px;
}

.vsc-ad-stat-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--ce-bg, #fff);
}

.vsc-ad-stat-icon svg {
	width: 24px;
	height: 24px;
}

.vsc-ad-stat-icon--accent { color: var(--ce-accent-brand, #0047AB); }
.vsc-ad-stat-icon--success { color: var(--ce-success, #15803D); }
.vsc-ad-stat-icon--navy { color: var(--ce-header-navy, #0D1B4B); }

.vsc-ad-stat-body { min-width: 0; }

.vsc-ad-stat-number {
	font-size: 32px;
	font-weight: 700;
	color: var(--ce-accent-brand, #0047AB);
	line-height: 1.1;
	margin-bottom: 4px;
}

.vsc-ad-stat-label {
	font-size: 14px;
	color: var(--ce-text, #111827);
	font-weight: 600;
}

/* Sections */
.vsc-ad-section {
	margin-bottom: 40px;
}

.vsc-ad-section h2 {
	font-size: 20px;
	font-weight: 700;
	color: var(--ce-text, #111827);
	margin-bottom: 20px;
}

/* Tables */
/* Lets a wide table (many columns, e.g. Recruiting Process) scroll within its
   own box instead of forcing the whole page to scroll horizontally. */
.vsc-ad-table-wrap {
	width: 100%;
	overflow-x: auto;
	border-radius: var(--ce-radius, 8px);
}

.vsc-ad-table {
	width: 100%;
	table-layout: auto;
	border-collapse: collapse;
	background: var(--ce-bg, #fff);
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	box-shadow: var(--ce-shadow-sm, 0 1px 3px rgba(0,0,0,.10));
}

.vsc-ad-table thead {
	background: var(--ce-accent-light, #eff6ff);
	border-bottom: 2px solid var(--ce-accent, #1D4ED8);
}

.vsc-ad-table th {
	padding: 8px 10px;
	text-align: left;
	font-weight: 700;
	font-size: 12px;
	/* Forced black: this table's header color has drifted back to the shared
	   app shell's --ce-text-secondary gray more than once even after setting
	   color:var(--ce-text) here — !important guarantees it stays black
	   regardless of load-order/specificity from sideline-core.css. */
	color: #000 !important;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	line-height: 1.3;
}

.vsc-ad-table td {
	padding: 8px 10px;
	font-size: 13px;
	color: #000 !important;
}

.vsc-ad-table tbody tr {
	border-bottom: 1px solid var(--ce-border, #D1D5DB);
	transition: background-color 0.15s ease;
}

.vsc-ad-table tbody tr:hover {
	background-color: var(--ce-bg-alt, #F9FAFB);
}

.vsc-ad-table tbody tr:last-child {
	border-bottom: none;
}

.vsc-ad-table a {
	color: var(--ce-accent-brand, #0047AB);
	font-weight: 600;
}

.vsc-ad-table a:focus-visible,
.vsc-ad-stat-card:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 2px;
}

/* Column-header tooltips */
.vsc-ad-th-tip {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	cursor: help;
}

.vsc-ad-th-tip-icon {
	font-size: 14px;
	color: var(--ce-accent-brand, #0047AB) !important;
}

.vsc-ad-th-tip-bubble {
	display: none;
	position: absolute;
	/* Opens downward (not upward) — the scroll wrapper's overflow-x:auto
	   forces an implicit overflow-y:auto too, which clipped an upward-opening
	   bubble (and .vsc-ad-table's own overflow:hidden clipped it a second
	   way). Downward stays inside the table's own box instead of escaping it. */
	top: 100%;
	left: 0;
	margin-top: 6px;
	width: 240px;
	max-width: 60vw;
	padding: 10px 12px;
	background: #111827;
	color: #fff;
	font-size: 12px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: normal;
	white-space: normal;
	border-radius: 6px;
	box-shadow: var(--ce-shadow-sm, 0 2px 8px rgba(0,0,0,.25));
	z-index: 50;
}

.vsc-ad-th-tip:hover .vsc-ad-th-tip-bubble,
.vsc-ad-th-tip:focus-visible .vsc-ad-th-tip-bubble {
	display: block;
}

/* For a table's rightmost column(s) — opens toward the left of the icon
   instead of the right, so the bubble doesn't run off the edge of the screen. */
.vsc-ad-th-tip--right .vsc-ad-th-tip-bubble {
	left: auto;
	right: 0;
}

.vsc-ad-th-tip:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Buttons */
.vsc-ad-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 700;
	border-radius: var(--ce-radius, 8px);
	border: 1.5px solid transparent;
	cursor: pointer;
	font-family: var(--ce-font, inherit);
}

.vsc-ad-btn--primary {
	background: var(--ce-accent-brand, #0047AB);
	border-color: var(--ce-accent-brand, #0047AB);
	color: #fff;
}

.vsc-ad-btn--primary:hover { background: var(--ce-accent-dark, #1E3A8A); border-color: var(--ce-accent-dark, #1E3A8A); }

.vsc-ad-btn--ghost {
	background: var(--ce-bg, #fff);
	border-color: var(--ce-border, #D1D5DB);
	color: var(--ce-text, #111827);
}

.vsc-ad-btn--ghost:hover { background: var(--ce-bg-alt, #F9FAFB); }

.vsc-ad-btn--danger {
	background: var(--ce-bg, #fff);
	border-color: var(--ce-danger, #B91C1C);
	color: var(--ce-danger, #B91C1C);
	min-height: 36px;
	padding: 6px 14px;
	font-size: 13px;
}

.vsc-ad-btn--danger:hover { background: var(--ce-danger-light, #fef2f2); }

.vsc-ad-btn:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 2px;
}

/* Badges */
.vsc-ad-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	border: 1.5px solid transparent;
}

.vsc-ad-badge--yes { background: var(--ce-success-light, #f0fdf4); color: var(--ce-success, #15803D); border-color: var(--ce-success, #15803D); }
.vsc-ad-badge--no { background: var(--ce-bg-alt, #F9FAFB); color: var(--ce-text, #111827); border-color: var(--ce-border, #D1D5DB); }
.vsc-ad-badge--manual { background: var(--ce-accent-light, #eff6ff); color: var(--ce-accent-brand, #0047AB); border-color: var(--ce-accent, #1D4ED8); margin-left: 8px; }

/* School search / manual add */
.vsc-ad-hint {
	font-size: 14px;
	color: var(--ce-text, #111827);
	margin-bottom: 16px;
}

.vsc-ad-school-search {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.vsc-ad-school-search input,
.vsc-ad-school-manual-row input {
	flex: 1 1 280px;
	min-height: 44px;
	padding: 10px 14px;
	font-size: 14px;
	color: var(--ce-text, #111827);
	border: 1.5px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	font-family: var(--ce-font, inherit);
}

.vsc-ad-school-search input:focus-visible,
.vsc-ad-school-manual-row input:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 1px;
}

.vsc-ad-filters label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ce-text, #111827);
}

.vsc-ad-filters select {
	min-height: 44px;
	min-width: 180px;
	padding: 8px 12px;
	font-size: 14px;
	color: var(--ce-text, #111827);
	border: 1.5px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	font-family: var(--ce-font, inherit);
}

.vsc-ad-filters select:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 1px;
}

.vsc-ad-school-results {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 16px;
}

.vsc-ad-school-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: var(--ce-bg-alt, #F9FAFB);
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	font-size: 14px;
	color: var(--ce-text, #111827);
}

.vsc-ad-school-manual-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 12px;
}

.vsc-ad-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Resources */
.vsc-ad-resources-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.vsc-ad-resource-card {
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: var(--ce-bg, #fff);
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	box-shadow: var(--ce-shadow-sm, 0 1px 3px rgba(0,0,0,.10));
	padding: 20px;
}

.vsc-ad-resource-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--ce-accent-light, #eff6ff);
	color: var(--ce-accent-brand, #0047AB);
}

.vsc-ad-resource-icon svg {
	width: 22px;
	height: 22px;
}

.vsc-ad-resource-body h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
	color: var(--ce-text, #111827);
}

.vsc-ad-resource-body p {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--ce-text, #111827);
}

.vsc-ad-resource-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

.vsc-ad-resource-actions .vsc-ad-btn {
	min-height: 40px;
	padding: 8px 14px;
	font-size: 13px;
}

/* School detail cards */
.vsc-ad-school-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
	gap: 20px;
}

.vsc-ad-school-card {
	background: var(--ce-bg, #fff);
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	box-shadow: var(--ce-shadow-sm, 0 1px 3px rgba(0,0,0,.10));
	padding: 20px;
}

.vsc-ad-school-card h3 {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
	color: var(--ce-text, #111827);
}

.vsc-ad-school-card-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
	margin-bottom: 16px;
}

.vsc-ad-school-card-stat {
	background: var(--ce-accent-light, #eff6ff);
	border: 1px solid var(--ce-accent, #1D4ED8);
	border-radius: var(--ce-radius, 8px);
	padding: 10px 12px;
	text-align: center;
}

.vsc-ad-school-card-stat-num {
	font-size: 22px;
	font-weight: 700;
	color: var(--ce-accent-brand, #0047AB);
	line-height: 1.1;
}

.vsc-ad-school-card-stat-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--ce-text, #111827);
	margin-top: 2px;
}

.vsc-ad-school-card-programs-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--ce-text, #111827);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.vsc-ad-school-card .vsc-ad-table th,
.vsc-ad-school-card .vsc-ad-table td {
	padding: 8px 12px;
	font-size: 13px;
}

/* Account page — mirrors the coach account page's .ce-acct-* structure
   (class-ce-account.php) so both feel like the same product. */
.vsc-ad-acct-wrap {
	max-width: 680px;
	padding: 20px;
}

.vsc-ad-acct-card {
	background: var(--ce-bg, #fff);
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	padding: 24px;
	margin-bottom: 20px;
}

.vsc-ad-acct-card h3 {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 700;
	color: var(--ce-text, #111827);
}

.vsc-ad-acct-avatar-row {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
}

.vsc-ad-acct-avatar-preview {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--ce-border, #D1D5DB);
	flex-shrink: 0;
}

.vsc-ad-acct-avatar-controls {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.vsc-ad-acct-avatar-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.vsc-ad-acct-msg {
	font-size: 13px;
	display: none;
	margin-top: 4px;
}

.vsc-ad-acct-msg.ok { color: var(--ce-success, #15803D); display: block; }
.vsc-ad-acct-msg.err { color: var(--ce-danger, #991B1B); display: block; }

.vsc-ad-acct-field {
	margin-bottom: 14px;
	max-width: 360px;
}

.vsc-ad-acct-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 14px;
	color: var(--ce-text, #111827);
}

.vsc-ad-acct-field input {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--ce-border, #D1D5DB);
	border-radius: var(--ce-radius, 8px);
	font-size: 14px;
	box-sizing: border-box;
	color: var(--ce-text, #111827);
	font-family: var(--ce-font, inherit);
}

.vsc-ad-acct-field input:focus-visible {
	outline: 3px solid var(--ce-accent-brand, #0047AB);
	outline-offset: 2px;
}

.vsc-ad-acct-pw-wrap {
	position: relative;
}

.vsc-ad-acct-pw-wrap input {
	padding-right: 44px !important;
}

.vsc-ad-acct-pw-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--ce-text, #111827);
	padding: 4px;
	display: flex;
	align-items: center;
	line-height: 1;
}

.vsc-ad-acct-pw-toggle:hover { color: var(--ce-text, #111827); }

.vsc-ad-acct-pw-toggle:focus-visible {
	outline: 2px solid var(--ce-accent-brand, #0047AB);
	border-radius: 2px;
	outline-offset: 1px;
}

.vsc-ad-acct-kv {
	display: flex;
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid var(--ce-border, #D1D5DB);
	font-size: 14px;
}

.vsc-ad-acct-kv dt {
	font-weight: 600;
	color: var(--ce-text, #111827);
	min-width: 100px;
	flex-shrink: 0;
	margin: 0;
}

.vsc-ad-acct-kv dd {
	margin: 0;
	color: var(--ce-text, #111827);
}

.vsc-ad-acct-logout {
	font-size: 14px;
	margin-top: 4px;
}

.vsc-ad-acct-logout a {
	color: var(--ce-accent-brand, #0047AB);
	font-weight: 600;
	text-decoration: none;
}

.vsc-ad-acct-logout a:hover { text-decoration: underline; }
