/* Organization themes are intentionally scoped to team league roots. */
.wdm-team-theme-root {
	--wdm-portal-ink: var(--wdm-theme-text, #172033);
	--wdm-portal-muted: var(--wdm-theme-muted, #5d6b82);
	--wdm-portal-line: var(--wdm-theme-border, #cfded7);
	--wdm-portal-soft: var(--wdm-theme-surface-alt, #eef4f1);
	--wdm-mode-team: var(--wdm-theme-primary, #17362f);
	background: var(--wdm-theme-bg, #f7faf9);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
	color-scheme: light;
}

.wdm-team-theme-root:is(.wdm-theme-navyred, .wdm-theme-remscheid, .wdm-theme-matchnight, .wdm-theme-finalsnight) {
	color-scheme: dark;
}

.wdm-team-theme-root.wdm-theme-navyred {
	box-shadow: 0 18px 48px rgba(3, 9, 18, .28);
}

.wdm-team-theme-root :is(h2, h3, h4, h5, strong, label) {
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root :is(small, .wdm-kicker, .wdm-team-form-note, .wdm-team-fixture-venue) {
	color: var(--wdm-theme-muted, #5d6b82);
}

.wdm-team-theme-root .wdm-public-header {
	background: var(--wdm-theme-secondary, #10231f);
	border: 1px solid var(--wdm-theme-border, #cfded7);
	border-top: 4px solid var(--wdm-theme-primary, #17362f);
	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08);
	color: #fff;
}

.wdm-team-theme-root .wdm-public-header :is(h2, h3, strong, small, .wdm-kicker) {
	color: #fff;
}

.wdm-team-theme-root .wdm-team-brand {
	align-items: center;
	display: flex;
	gap: 1rem;
	min-width: 0;
}

.wdm-team-theme-root .wdm-team-brand > div {
	min-width: 0;
}

.wdm-team-theme-root .wdm-team-brand h2 {
	overflow-wrap: anywhere;
}

.wdm-team-theme-root .wdm-team-organization-logo {
	background: var(--wdm-theme-surface, #fff);
	border: 1px solid rgba(255, 255, 255, .28);
	border-radius: 8px;
	box-sizing: border-box;
	flex: 0 0 auto;
	height: 72px;
	object-fit: contain;
	padding: .35rem;
	width: 72px;
}

.wdm-team-theme-root .wdm-portal-nav,
.wdm-team-theme-root .wdm-team-public__nav {
	background: var(--wdm-theme-secondary, #10231f);
	border-color: var(--wdm-theme-border, #cfded7);
	scrollbar-color: var(--wdm-theme-primary, #17362f) var(--wdm-theme-secondary, #10231f);
}

.wdm-team-theme-root .wdm-player-nav {
	background: var(--wdm-theme-surface, #fff);
	border-color: var(--wdm-theme-border, #cfded7);
	box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

.wdm-team-theme-root .wdm-player-nav__context {
	border-color: var(--wdm-theme-border, #cfded7);
}

.wdm-team-theme-root .wdm-player-nav__link {
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root .wdm-player-nav__link:hover,
.wdm-team-theme-root .wdm-player-nav__link:focus-visible,
.wdm-team-theme-root .wdm-player-nav__switcher > summary {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root .wdm-player-nav__link.is-active {
	background: var(--wdm-theme-primary, #17362f);
	color: var(--wdm-theme-on-primary, #fff);
}

.wdm-team-theme-root .wdm-team-public__nav a:hover,
.wdm-team-theme-root .wdm-team-public__nav a:focus-visible {
	background: var(--wdm-theme-primary, #17362f);
	border-color: var(--wdm-theme-accent, #b98218);
	color: var(--wdm-theme-on-primary, #fff);
}

.wdm-team-theme-root :is(
	.wdm-metric,
	.wdm-public-notice,
	.wdm-team-export__grid form,
	.wdm-team-import__upload,
	.wdm-team-import__preview,
	.wdm-team-admin-grid form,
	.wdm-team-admin-grid__notice,
	.wdm-team-entry-overview__competitions > section,
	.wdm-team-news-manager > form,
	.wdm-team-registration-form,
	.wdm-team-news-list article,
	.wdm-team-news-grid article,
	.wdm-team-member-summary > div,
	.wdm-team-member-register,
	.wdm-team-member-transfer,
	.wdm-team-member-registration,
	.wdm-team-member-requests,
	.wdm-team-member-free,
	.wdm-team-public__directory a,
	.wdm-team-public__team-grid article,
	.wdm-team-fixture-group,
	.wdm-team-public__fixture,
	.wdm-team-form-card,
	.wdm-team-result-grid article,
	.wdm-team-entity__columns > section,
	.wdm-team-entity__metrics > div,
	.wdm-team-entity__roster li,
	.wdm-team-entity__results li,
	.wdm-team-player-history li,
	.wdm-team-player-games li,
	.wdm-team-roster-manager__assign,
	.wdm-team-roster-manager__teams > section,
	.wdm-team-lineup,
	.wdm-team-matchday__results
) {
	background: var(--wdm-theme-surface, #fff);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root :is(
	.wdm-team-setup-link > span,
	.wdm-team-import__upload input[type="file"],
	.wdm-team-import__option,
	.wdm-team-member-registration__roster li,
	.wdm-team-matchday__schedule,
	.wdm-team-registration-status,
	.wdm-team-entity__metrics > div,
	.wdm-team-season-nav,
	.wdm-team-season-nav a,
	.wdm-team-public__competitions a
) {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root .wdm-team-setup-progress li.is-current,
.wdm-team-theme-root .wdm-team-setup-progress li.is-complete {
	background: var(--wdm-theme-surface-alt, #eef4f1);
}

.wdm-team-theme-root .wdm-team-setup-progress li.is-current {
	border-left-color: var(--wdm-theme-accent, #b98218);
}

.wdm-team-theme-root .wdm-team-setup-progress li.is-complete {
	border-left-color: var(--wdm-theme-primary, #17362f);
}

.wdm-team-theme-root .wdm-team-setup-progress li.is-complete .wdm-team-setup-link > span {
	background: var(--wdm-theme-primary, #17362f);
	border-color: var(--wdm-theme-primary, #17362f);
}

.wdm-team-theme-root :is(
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="number"],
	input[type="date"],
	input[type="time"],
	input[type="datetime-local"],
	input[type="file"],
	select,
	textarea
) {
	background: var(--wdm-theme-surface, #fff);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root :is(input, select, textarea):focus-visible {
	border-color: var(--wdm-theme-accent, #b98218);
	box-shadow: 0 0 0 2px var(--wdm-theme-accent, #b98218);
	outline: 0;
}

.wdm-team-theme-root input[type="color"] {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border: 1px solid var(--wdm-theme-border, #cfded7);
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
	height: 44px;
	padding: 3px;
	width: 64px;
}

.wdm-team-theme-root .wdm-public-table {
	background: var(--wdm-theme-surface, #fff);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root .wdm-public-table th {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border-color: var(--wdm-theme-border, #cfded7);
	color: var(--wdm-theme-text, #172033);
}

.wdm-team-theme-root .wdm-public-table td {
	border-color: var(--wdm-theme-border, #cfded7);
}

.wdm-team-theme-root :is(
	.wdm-team-public__competitions a.is-active,
	.wdm-team-season-nav a.is-active,
	.button.button-primary,
	button.button-primary,
	.wdm-badge,
	.wdm-team-fixture-state
) {
	background: var(--wdm-theme-primary, #17362f);
	border-color: var(--wdm-theme-primary, #17362f);
	color: var(--wdm-theme-on-primary, #fff) !important;
}

.wdm-team-theme-root :is(.button.button-primary, button.button-primary):hover,
.wdm-team-theme-root :is(.button.button-primary, button.button-primary):focus-visible {
	background: var(--wdm-theme-secondary, #10231f);
	border-color: var(--wdm-theme-accent, #b98218);
	color: #fff !important;
}

.wdm-team-theme-root :is(
	.wdm-team-public__directory a,
	.wdm-team-public__fixture > a,
	.wdm-team-public__team-grid article > a,
	.wdm-team-form-heading a,
	.wdm-team-master-index li a,
	.wdm-team-news-list article > a
) {
	color: var(--wdm-theme-primary, #17362f);
}

.wdm-team-theme-root .wdm-team-entity-link {
	color: var(--wdm-theme-text, #172033);
	text-decoration-color: transparent;
	text-decoration-thickness: 2px;
	text-underline-offset: .18em;
}

.wdm-team-theme-root .wdm-team-entity-link:hover,
.wdm-team-theme-root .wdm-team-entity-link:focus-visible {
	color: var(--wdm-theme-text, #172033);
	text-decoration-line: underline;
	text-decoration-color: var(--wdm-theme-accent, #b98218);
}

.wdm-team-theme-root .wdm-team-registration-callout {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border-left-color: var(--wdm-theme-primary, #17362f);
}

.wdm-team-theme-root .wdm-team-registration-callout.is-closed {
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border-left-color: var(--wdm-theme-accent, #b98218);
}

.wdm-team-theme-root .wdm-team-theme-settings {
	border-bottom: 1px solid var(--wdm-theme-border, #cfded7);
	border-top: 1px solid var(--wdm-theme-border, #cfded7);
	padding: 1rem 0 1.25rem;
}

.wdm-team-theme-root .wdm-team-theme-settings > form {
	background: var(--wdm-theme-surface, #fff);
	border: 1px solid var(--wdm-theme-border, #cfded7);
	border-radius: 8px;
	padding: 1rem;
}

.wdm-team-theme-root .wdm-team-theme-settings__grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
}

.wdm-team-theme-root .wdm-team-theme-settings__logo {
	align-items: center;
	display: grid;
	gap: 1rem;
	grid-column: 1 / -1;
	grid-template-columns: 112px minmax(0, 1fr);
	min-width: 0;
}

.wdm-team-theme-root .wdm-team-theme-settings__logo-preview,
.wdm-team-theme-root .wdm-team-theme-settings__logo-copy {
	min-width: 0;
}

.wdm-team-theme-root .wdm-team-theme-settings__logo-preview {
	align-items: center;
	background: color-mix(in srgb, var(--wdm-theme-surface-alt, #eef4f1) 76%, transparent);
	border: 1px solid var(--wdm-theme-border, #cfded7);
	border-radius: 12px;
	display: flex;
	justify-content: center;
	min-height: 112px;
	padding: .45rem;
}

.wdm-team-theme-root .wdm-team-theme-settings__logo-preview .wdm-team-organization-logo,
.wdm-team-theme-root .wdm-team-theme-settings__logo-preview .wdm-team-logo-placeholder {
	background: transparent;
	border: 0;
	height: 96px;
	padding: 0;
	width: 96px;
}

.wdm-team-theme-root .wdm-team-theme-settings__logo-copy {
	display: grid;
	gap: .45rem;
}

.wdm-team-theme-root .wdm-team-theme-settings__logo-copy p {
	color: var(--wdm-theme-muted, #5d6b82);
	margin: 0;
}

.wdm-team-theme-root .wdm-team-logo-upload {
	display: grid;
	font-size: .82rem;
	font-weight: 800;
	gap: .35rem;
	margin-top: .35rem;
	max-width: 640px;
}

.wdm-team-theme-root .wdm-team-logo-upload input[type="file"] {
	border: 1px dashed var(--wdm-theme-border, #cfded7);
	border-radius: 8px;
	box-sizing: border-box;
	color: var(--wdm-theme-text, #172033);
	cursor: pointer;
	min-height: 48px;
	padding: .4rem;
	width: 100%;
}

.wdm-team-theme-root .wdm-team-logo-upload input[type="file"]::file-selector-button {
	background: var(--wdm-theme-primary, #17362f);
	border: 0;
	border-radius: 6px;
	color: var(--wdm-theme-on-primary, #fff);
	cursor: pointer;
	font-weight: 800;
	margin-right: .75rem;
	padding: .62rem .8rem;
}

.wdm-team-theme-root .wdm-team-logo-upload small {
	color: var(--wdm-theme-muted, #5d6b82);
	font-weight: 600;
}

.wdm-team-theme-root .wdm-team-logo-placeholder {
	align-items: center;
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border: 1px dashed var(--wdm-theme-border, #cfded7);
	border-radius: 8px;
	box-sizing: border-box;
	color: var(--wdm-theme-muted, #5d6b82);
	display: inline-flex;
	flex: 0 0 auto;
	font-size: .75rem;
	font-weight: 800;
	height: 72px;
	justify-content: center;
	text-align: center;
	width: 72px;
}

.wdm-team-theme-root .wdm-team-theme-settings__preset {
	display: grid;
	font-size: .82rem;
	font-weight: 800;
	gap: .35rem;
}

.wdm-team-theme-root .wdm-team-theme-settings__colors {
	display: grid;
	gap: .65rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wdm-team-theme-root .wdm-team-theme-settings__colors label {
	align-items: center;
	background: var(--wdm-theme-surface-alt, #eef4f1);
	border: 1px solid var(--wdm-theme-border, #cfded7);
	border-radius: 6px;
	display: flex;
	font-size: .78rem;
	font-weight: 800;
	gap: .6rem;
	justify-content: space-between;
	min-width: 0;
	padding: .55rem;
}

.wdm-team-theme-root .wdm-team-theme-settings__colors label > span {
	align-items: center;
	display: flex;
	gap: .35rem;
	min-width: 0;
}

.wdm-team-theme-root .wdm-team-theme-settings__actions {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
	margin-top: 1rem;
}

@media (max-width: 760px) {
	.wdm-team-theme-root .wdm-team-theme-settings__grid,
	.wdm-team-theme-root .wdm-team-theme-settings__colors {
		grid-template-columns: minmax(0, 1fr);
	}

	.wdm-team-theme-root .wdm-team-brand {
		align-items: flex-start;
	}

	.wdm-team-theme-root .wdm-team-organization-logo,
	.wdm-team-theme-root .wdm-team-logo-placeholder {
		height: 56px;
		width: 56px;
	}

	.wdm-team-theme-root .wdm-team-theme-settings__logo {
		align-items: flex-start;
		grid-template-columns: 76px minmax(0, 1fr);
	}

	.wdm-team-theme-root .wdm-team-theme-settings__logo-preview {
		min-height: 76px;
		padding: .3rem;
	}

	.wdm-team-theme-root .wdm-team-theme-settings__logo-preview .wdm-team-organization-logo,
	.wdm-team-theme-root .wdm-team-theme-settings__logo-preview .wdm-team-logo-placeholder {
		height: 64px;
		width: 64px;
	}
}
