/* Tournament Team additions on top of the Seven theme (same conventions as ScoutCircle / bsa.mailer).
   Brand: AYSO Blue #0033A0 (primary), AYSO Red #C8102E (accent). */
.text-prewrap { white-space: pre-wrap; }
.ayso-red { color: #C8102E !important; }

table.dataTable td { vertical-align: middle; }
.text-prewrap { white-space: pre-wrap; }

/* AYSO brand: the primary nav rail uses the AYSO Blue. */
:root, [data-bs-theme="light"], [data-bs-theme="dark"] {
	--ayso-blue: #0033A0;
	--ayso-red: #C8102E;
	--ayso-blue-dark: #00287D;
	--ayso-blue-deep: #00226B;  /* nav rail */
	--ayso-ink: #232528;
	--bs-aside-bg-color-primary: var(--ayso-blue-deep);
	--bs-aside-btn-active-bg-color: var(--ayso-blue);
}
.aside .aside-primary { background-color: var(--ayso-blue-deep); }
.aside .btn-custom i, .aside .btn-custom .svg-icon { color: rgba(255, 255, 255, .72); }
.aside .btn-custom i [class^="path"]::before { color: inherit; }
.aside .btn-custom.active i, .aside .btn-custom:hover:not(.btn-active) i, .aside .btn-custom.show i { color: #fff; }
.aside-primary .symbol-label.bg-light-primary { background-color: rgba(255, 255, 255, .16) !important; color: #fff !important; }

/* Data tables: text 15% smaller than the theme's sizes (fs-6 1.075rem, fs-7 .95rem, fs-8 .85rem). */
.table.fs-6 { font-size: calc(1.075rem * .85) !important; }
.table.fs-7, .table thead tr.fs-7, .table .fs-7 { font-size: calc(.95rem * .85) !important; }
.table .fs-6 { font-size: calc(1.075rem * .85) !important; }
.table .fs-8 { font-size: calc(.85rem * .85) !important; }
.table .btn.btn-sm { font-size: calc(.95rem * .85); }

/* Data tables: first column uses the same weight as the rest of the row (no bold). */
.table > tbody > tr > td:first-child.fw-bold,
.table > tbody > tr > td:first-child .fw-bold,
.table > tbody > tr > td:first-child .fw-bolder { font-weight: inherit !important; }

/* AYSO brand: "primary" (buttons, active/hover states, links, checks, pills, light tints) = AYSO Blue #0033A0.
   Overrides the Seven theme's purple (#7239EA light / #883FFF dark). */
:root, [data-bs-theme="light"] {
	--bs-primary: #0033A0;
	--bs-primary-rgb: 0, 51, 160;
	--bs-primary-active: #00287D;
	--bs-primary-light: #E6ECF7;
	--bs-primary-clarity: rgba(0, 51, 160, 0.2);
	--bs-primary-inverse: #ffffff;
	--bs-primary-bg-subtle: #CCD6EC;
	--bs-primary-border-subtle: #99ADD9;
	--bs-primary-text-emphasis: #001440;
	--bs-text-primary: #0033A0;
	--bs-component-active-bg: #0033A0;
	--bs-component-checked-bg: #0033A0;
	--bs-component-hover-color: #0033A0;
	--bs-link-color: #0033A0;
	--bs-link-color-rgb: 0, 51, 160;
	--bs-link-hover-color: #00287D;
	--bs-link-hover-color-rgb: 0, 48, 106;
}
[data-bs-theme="dark"] {
	--bs-primary: #5B83D6;
	--bs-primary-rgb: 91, 131, 214;
	--bs-primary-active: #87A6E3;
	--bs-primary-light: #18213A;
	--bs-primary-clarity: rgba(91, 131, 214, 0.2);
	--bs-primary-inverse: #ffffff;
	--bs-primary-bg-subtle: #0D1830;
	--bs-primary-border-subtle: #25407A;
	--bs-primary-text-emphasis: #BFD0F2;
	--bs-text-primary: #5B83D6;
	--bs-component-active-bg: #5B83D6;
	--bs-component-checked-bg: #5B83D6;
	--bs-component-hover-color: #87A6E3;
	--bs-link-color: #5B83D6;
	--bs-link-color-rgb: 91, 131, 214;
	--bs-link-hover-color: #87A6E3;
	--bs-link-hover-color-rgb: 122, 165, 216;
}

/* Places where the theme compiled the purple in directly instead of using --bs-primary. */
:root, [data-bs-theme="light"] {
	--bs-menu-link-color-hover: #0033A0;
	--bs-menu-link-color-show: #0033A0;
	--bs-menu-link-color-here: #0033A0;
	--bs-menu-link-color-active: #0033A0;
	--bs-scrolltop-bg-color: #0033A0;
	--bs-scrolltop-bg-color-hover: #00287D;
	--bs-ribbon-label-bg: #0033A0;
	--bs-focus-ring-color: rgba(0, 51, 160, 0.25);
}
[data-bs-theme="dark"] {
	--bs-menu-link-color-hover: #87A6E3;
	--bs-menu-link-color-show: #87A6E3;
	--bs-menu-link-color-here: #87A6E3;
	--bs-menu-link-color-active: #87A6E3;
	--bs-scrolltop-bg-color: #5B83D6;
	--bs-scrolltop-bg-color-hover: #87A6E3;
	--bs-ribbon-label-bg: #5B83D6;
	--bs-focus-ring-color: rgba(91, 131, 214, 0.25);
}
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate,
.form-check.form-check-solid .form-check-input[type=checkbox]:indeterminate { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.form-check.form-check-solid .form-check-input:checked { background-color: var(--bs-primary); }
.form-control:focus, .nav-link:focus-visible { box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-range::-webkit-slider-thumb { background-color: var(--bs-primary); }
.form-range::-moz-range-thumb { background-color: var(--bs-primary); }
.form-range:focus::-webkit-slider-thumb, .form-range:focus::-moz-range-thumb { box-shadow: 0 0 0 1px #fff, 0 0 0 .25rem var(--bs-focus-ring-color); }
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--bs-primary-active);
	--bs-btn-hover-border-color: var(--bs-primary-active); --bs-btn-active-bg: var(--bs-primary-active); --bs-btn-active-border-color: var(--bs-primary-active);
	--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.btn-outline-primary { --bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--bs-primary);
	--bs-btn-hover-border-color: var(--bs-primary); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
	--bs-btn-disabled-color: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.separator.separator-content.border-primary::after, .separator.separator-content.border-primary::before { border-color: var(--bs-primary) !important; }

/* Dashboard header KPI tiles: solid fill, share the full row width equally, wrap on narrow screens */
.kpi-tiles { display: flex; flex-wrap: wrap; gap: 1rem; width: 100%; }
.kpi-tile { flex: 1 1 0; min-width: 150px; border-radius: .625rem; padding: .9rem 1.25rem; }

/* Table rows with a 5px status bar at the left edge (first cell): row-bar + row-bar-{danger,warning,success,gray,none} */
td.row-bar { box-shadow: inset 5px 0 0 var(--row-bar-color, transparent); padding-left: 1.25rem !important; }
th.row-bar-head { padding-left: 1.25rem !important; }
td.row-bar-danger { --row-bar-color: var(--bs-danger); }
td.row-bar-warning { --row-bar-color: var(--bs-warning); }
td.row-bar-success { --row-bar-color: var(--bs-success); }
td.row-bar-gray { --row-bar-color: var(--bs-gray-400); }
td.row-bar-none { --row-bar-color: var(--bs-gray-200); }

/* Card headers: more room between a card title and its subtitle */
.card-header .card-title.flex-column > .card-label + span { margin-top: .6rem !important; }

/* Card headers: no divider line under the header */
.card .card-header { border-bottom: 0 !important; }

/* Card headers: on desktop keep the toolbar (buttons) top-right even when the title/subtitle is long */
@media (min-width: 992px) {
	.card > .card-header, .card > form > .card-header { flex-wrap: nowrap; }
	.card-header > .card-title { flex: 1 1 auto; min-width: 0; }
	.card-header > .card-toolbar { flex-shrink: 0; margin-left: 1.5rem; align-self: flex-start; }
}



/* Jersey number chip */
.jersey { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .35rem;
	border-radius: .45rem; background: var(--bs-primary-light); color: var(--bs-primary); font-weight: 700; font-size: .9rem; }

/* Pipeline board */
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(210px, 1fr)); gap: 1rem; overflow-x: auto; padding-bottom: .5rem; }
.pipeline-col { background: var(--bs-gray-100); border-radius: .75rem; padding: .75rem; min-height: 200px; }
[data-bs-theme="dark"] .pipeline-col { background: var(--bs-gray-200); }
.pipeline-card { display: block; background: var(--bs-body-bg); border-radius: .625rem; padding: .8rem .9rem; margin-bottom: .65rem;
	box-shadow: 0 1px 3px rgba(0,0,0,.06); border-left: 4px solid var(--card-tone, var(--bs-gray-300)); color: inherit; }
.pipeline-card:hover { box-shadow: 0 3px 10px rgba(0,0,0,.10); color: inherit; }

/* Status stepper on a tournament */
.stepper-line { display: flex; flex-wrap: wrap; gap: .4rem; }
.stepper-line .step { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .7rem; border-radius: 2rem;
	background: var(--bs-gray-100); color: var(--bs-gray-600); font-weight: 600; font-size: .85rem; border: 0; }
.stepper-line .step.done { background: var(--bs-primary-light); color: var(--bs-primary); }
.stepper-line .step.current { background: var(--bs-primary); color: #fff; }
.stepper-line button.step:hover:not(.current) { background: var(--bs-primary-light); color: var(--bs-primary); }

/* Lineup pitch */
.pitch { position: relative; width: 100%; aspect-ratio: 68 / 80; max-width: 420px; margin: 0 auto; border-radius: .75rem;
	background: repeating-linear-gradient(0deg, #2E8B47 0 10%, #33964D 10% 20%); border: 3px solid #fff; box-shadow: 0 0 0 2px #2E8B47; overflow: hidden; }
.pitch::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid rgba(255,255,255,.8); }
.pitch::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%);
	border: 2px solid rgba(255,255,255,.8); border-radius: 50%; }
.pitch .box { position: absolute; left: 25%; right: 25%; height: 14%; border: 2px solid rgba(255,255,255,.8); }
.pitch .box.top { top: -2px; border-top: 0; } .pitch .box.bottom { bottom: -2px; border-bottom: 0; }
.pitch .spot { position: absolute; transform: translate(-50%, -50%); text-align: center; z-index: 2; width: 26%; }
.pitch .spot .dot { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
	background: #fff; color: #0033A0; font-weight: 800; font-size: .8rem; box-shadow: 0 2px 4px rgba(0,0,0,.25); }
.pitch .spot.gk .dot { background: #FFD43B; color: #222; }
.pitch .spot .who { display: block; margin-top: .2rem; color: #fff; font-weight: 600; font-size: .78rem; line-height: 1.1;
	text-shadow: 0 1px 2px rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pitch .spot.empty .dot { background: rgba(255,255,255,.35); color: #fff; }

/* Lineup grid */
.lineup-grid select.form-select { min-width: 8.5rem; padding-top: .35rem; padding-bottom: .35rem; font-size: .9rem; }
.lineup-grid td.pos { font-weight: 700; color: var(--bs-gray-700); white-space: nowrap; }
.lineup-grid select.dup { border-color: var(--bs-danger) !important; box-shadow: 0 0 0 .15rem rgba(248, 40, 90, .25); }
.qcount { display: inline-flex; gap: 2px; }
.qcount i { display: inline-block; width: .55rem; height: .9rem; border-radius: 2px; background: var(--bs-gray-300); }
.qcount i.on { background: var(--bs-success); } .qcount i.gk { background: #F6C000; }
.qcount.low i.on { background: var(--bs-danger); }

/* Stats entry */
.stat-input { width: 4.2rem; text-align: center; }
.stat-input::-webkit-inner-spin-button { opacity: 1; }

/* Print: lineup cards and paperwork previews */
@media print {
	.aside, #kt_header, #kt_footer, .no-print, .btn { display: none !important; }
	.wrapper { padding: 0 !important; margin: 0 !important; }
	.card { box-shadow: none !important; border: 1px solid #ddd !important; }
	body { background: #fff !important; }
}
