/*
 * Coach tools on the team page (page-team-status.php #nct-coach).
 * Shown only when GET teams/v1/{slug} answers is_coach. Extends the
 * .nct-ct-share panel from nct-team-flow.css; tokens from nct-tokens.css.
 */

.nct-coach {
	margin-top: 8px;
}

.nct-coach-head {
	padding: 24px min(32px, 5%) 20px;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px 28px;
	flex-wrap: wrap;
	background: #fff;
	border-bottom: 1px solid var(--nct-line);
}

.nct-coach-head .nct-ct-hint {
	margin: 4px 0 0;
}

.nct-coach-meta {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.nct-coach-chip {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 14px;
	border: 1px solid var(--nct-panel-border);
	border-radius: 14px;
	background: var(--nct-panel);
	min-width: 96px;
}

.nct-coach-chip span {
	font-size: 11px;
	line-height: 14px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--nct-text-faint);
}

.nct-coach-chip strong {
	font-family: var(--nct-font-heading);
	font-size: 18px;
	line-height: 22px;
	letter-spacing: .04em;
	color: var(--nct-text);
}

/* 2026-10-26: "Card design" chip - a design name is longer than a join code,
 * so it drops to the body font with a small thumbnail beside it. */
.nct-coach-chip-design strong {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font: 600 14px/20px var(--nct-font-body);
	letter-spacing: normal;
}

.nct-coach-design-thumb {
	width: 22px;
	height: auto;
	border-radius: 3px;
}

.nct-coach-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 18px min(32px, 5%) 0;
}

.nct-coach-actions .nct-ct-btn {
	width: auto;
}

.nct-coach-notice {
	margin: 12px min(32px, 5%) 0;
	padding: 10px 14px;
	border-radius: 12px;
	background: var(--nct-success-bg);
	color: var(--nct-success);
}

.nct-coach-notice.is-error {
	background: #fde8e6;
	color: var(--nct-error);
}

.nct-coach-table-wrap {
	padding: 18px min(32px, 5%) 24px;
	overflow-x: auto;
}

.nct-coach-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
	line-height: 20px;
}

.nct-coach-table th {
	text-align: left;
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--nct-text-faint);
	padding: 0 12px 10px 0;
	border-bottom: 1px solid var(--nct-line);
	font-weight: 600;
}

.nct-coach-table td {
	padding: 12px 12px 12px 0;
	border-bottom: 1px solid var(--nct-line);
	vertical-align: middle;
}

.nct-coach-table tr:last-child td {
	border-bottom: 0;
}

.nct-coach-th-actions,
.nct-coach-td-actions {
	text-align: right !important;
	padding-right: 0 !important;
	white-space: nowrap;
}

.nct-coach-player strong {
	display: block;
	color: var(--nct-text);
}

.nct-coach-player span {
	display: block;
	font-size: 13px;
	color: var(--nct-text-faint);
	overflow-wrap: anywhere;
}

.nct-coach-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	letter-spacing: .02em;
	background: #f1f2f4;
	color: var(--nct-text-dim);
}

.nct-coach-status.is-joined {
	background: #fff4e0;
	color: #8a5200;
}

.nct-coach-status.is-submitted {
	background: var(--nct-tint);
	color: var(--nct-primary-text);
}

.nct-coach-status.is-paid {
	background: var(--nct-success-bg);
	color: var(--nct-success);
}

.nct-coach-mini {
	appearance: none;
	border: 1px solid var(--nct-line-strong);
	background: #fff;
	color: var(--nct-text);
	border-radius: 999px;
	padding: 6px 12px;
	font: inherit;
	font-size: 13px;
	line-height: 16px;
	cursor: pointer;
	margin-left: 6px;
}

.nct-coach-mini:hover {
	border-color: var(--nct-text);
}

.nct-coach-mini:disabled {
	opacity: .5;
	cursor: default;
}

.nct-coach-mini.is-danger {
	color: var(--nct-error);
}

.nct-coach-mini:focus-visible {
	outline: var(--nct-focus-ring);
	outline-offset: var(--nct-focus-offset);
}

@media (max-width: 640px) {
	.nct-coach-table thead {
		display: none;
	}
	.nct-coach-table tr {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 6px 12px;
		padding: 12px 0;
		border-bottom: 1px solid var(--nct-line);
	}
	.nct-coach-table td {
		display: block;
		padding: 0;
		border: 0;
	}
	.nct-coach-td-actions {
		grid-column: 1 / -1;
		text-align: left !important;
	}
	.nct-coach-mini {
		margin: 0 6px 0 0;
	}
}

/* Front/back card renders per player. */
.nct-coach-th-card,
.nct-coach-td-card {
	width: 132px;
}

.nct-coach-cards {
	display: flex;
	gap: 6px;
}

.nct-coach-cards a {
	display: block;
	width: 56px;
	height: 78px;
	border-radius: 6px;
	overflow: hidden;
	background: #f1f2f4;
	border: 1px solid var(--nct-line);
	transition: transform .15s ease, box-shadow .15s ease;
}

.nct-coach-cards a:hover {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.nct-coach-cards img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nct-coach-cards-none {
	font-size: 12px;
	color: var(--nct-text-faint);
}

@media (max-width: 640px) {
	.nct-coach-table tr {
		grid-template-columns: auto 1fr auto;
	}
}

/* Payment status column. */
.nct-coach-th-pay,
.nct-coach-td-pay {
	width: 120px;
	text-align: center !important;
}

.nct-coach-pay {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	line-height: 14px;
	font-weight: 600;
}

.nct-coach-pay-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
}

.nct-coach-pay.is-paid {
	color: var(--nct-success);
}

.nct-coach-pay.is-paid .nct-coach-pay-icon {
	background: var(--nct-success);
	color: #fff;
}

.nct-coach-pay.is-pending {
	color: #8a5200;
}

.nct-coach-pay.is-pending .nct-coach-pay-icon {
	background: #fff4e0;
	color: #8a5200;
	font-size: 14px;
}

@media (max-width: 640px) {
	.nct-coach-table tr {
		grid-template-columns: auto auto 1fr auto;
	}
	.nct-coach-td-pay {
		text-align: left !important;
	}
}

/* ======================================================================
 * Coach portal (client mockup 2026-10-27) - only in body.nct-cp-mode
 * (the viewer is the coach). Public players keep the original page.
 * ==================================================================== */
body.nct-cp-mode .nct-ct-join-hero,
body.nct-cp-mode #nct-join-section,
body.nct-cp-mode .nct-ct-share:not(.nct-coach) { display: none !important; }
/* Both the coach portal and the player page use the wide column so the
 * 2.25:1 artwork gets room (the copy sits under its baked-in wordmark). */
.nct-team-status .nct-ct-join-inner { max-width: 1040px; }

.nct-cp { margin-bottom: 18px; }
/* The client artwork (coach-hero-*.jpg) carries the NCASE CARDS wordmark
 * at centre-left, so the hero keeps the image's own 2.25:1 shape and the
 * copy sits bottom-left underneath that wordmark. */
.nct-cp-hero {
	position: relative;
	aspect-ratio: 2.25 / 1;
	min-height: 360px;
	border-radius: 22px;
	overflow: hidden;
	background: #0e1b33 var(--cp-hero) center / cover no-repeat;
	color: #fff;
	display: flex;
	align-items: flex-end;
}
.nct-cp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 12, 28, 0) 45%, rgba(5, 12, 28, .72) 100%); }
.nct-cp-hero-inner { position: relative; padding: 24px 32px 28px; max-width: 56%; display: grid; gap: 10px; justify-items: start; }
.nct-cp-brand { display: none; }
.nct-cp-wordmark { font: 900 30px/1 var(--nct-font-body); letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.nct-cp-wordmark::first-letter { color: #2b9df4; }
.nct-cp-brand-sub { font: 700 12px/1 var(--nct-font-body); letter-spacing: 4px; text-transform: uppercase; color: #dbe8f7; }
.nct-cp-title { display: grid; gap: 2px; }
.nct-cp-title-1, .nct-cp-title-2 { font: 900 clamp(30px, 3.8vw, 44px)/.95 var(--nct-font-body); text-transform: uppercase; letter-spacing: -1px; }
.nct-cp-title-1 { color: #fff; text-shadow: 0 4px 18px rgba(0,0,0,.45); }
.nct-cp-title-2 { color: #7cc4ff; background: linear-gradient(180deg, #fff 0%, #8ecbff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nct-cp-title-tag { font: 700 12px/1 var(--nct-font-body); letter-spacing: 4px; text-transform: uppercase; color: #fff; padding-bottom: 10px; border-bottom: 3px solid #2b9df4; margin-top: 4px; }
.nct-cp-logo { max-width: 220px; max-height: 110px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.nct-cp-upload { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 11px 20px; border-radius: 999px; background: #fff; color: #0e1b33; font: 700 14px/1 var(--nct-font-body); cursor: pointer; }
.nct-cp-upload:hover { background: #e9f3ff; }

.nct-cp-bar { display: grid; grid-template-columns: repeat(4, 1fr); margin: -28px 16px 0; position: relative; background: rgba(40, 48, 66, .92); border-radius: 18px; padding: 18px 10px; backdrop-filter: blur(6px); }
.nct-cp-tile { display: grid; justify-items: center; gap: 8px; padding: 6px 10px; border: 0; background: transparent; color: #fff; text-align: center; font: inherit; cursor: default; border-right: 1px solid rgba(255,255,255,.14); }
.nct-cp-tile:last-child { border-right: 0; }
button.nct-cp-tile { cursor: pointer; }
button.nct-cp-tile:hover .nct-cp-ico { transform: translateY(-2px); background: #3aa8ff; }
.nct-cp-ico { width: 60px; height: 60px; border-radius: 50%; background: #fff; color: #1d7fe0; display: grid; place-items: center; transition: transform .15s ease, background .15s ease; }
.nct-cp-ico svg { width: 28px; height: 28px; }
.nct-cp-tile-label { font: 700 14px/1.25 var(--nct-font-body); }
.nct-cp-tile-sub { font: 500 11px/1.3 var(--nct-font-body); color: #c9d6e6; }
.nct-cp-tile-stat strong { font: 900 30px/1 var(--nct-font-body); color: #7cc4ff; }

/* TEAM STATUS panel: coach photo on the right */
body.nct-cp-mode #nct-coach-copy, body.nct-cp-mode .nct-coach-logo-btn { display: none !important; }
body.nct-cp-mode .nct-cp-status-art { display: block; position: absolute; top: 0; right: 0; bottom: 0; width: 42%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%); mask-image: linear-gradient(90deg, transparent 0, #000 35%); pointer-events: none; }
.nct-cp-status-art { display: none; }
.nct-cp-status-art picture, .nct-cp-status-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right top; }
body.nct-cp-mode .nct-coach-head { position: relative; min-height: 240px; padding-right: 44%; overflow: hidden; border-radius: 16px; }
body.nct-cp-mode #nct-coach-heading { font: 900 clamp(34px, 5vw, 52px)/1 var(--nct-font-body); text-transform: uppercase; letter-spacing: -.5px; }
body.nct-cp-mode .nct-coach-head .nct-ct-eyebrow { color: #1d7fe0; }

/* Add Your Players popup (fades in) */
.nct-cp-modal { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; opacity: 0; transition: opacity .25s ease; }
.nct-cp-modal.is-open { opacity: 1; }
.nct-cp-modal-backdrop { position: absolute; inset: 0; background: rgba(5, 12, 28, .72); }
.nct-cp-modal-box { position: relative; width: min(560px, calc(100% - 32px)); max-height: 90vh; overflow: auto; background: #fff; border-radius: 20px; padding: 28px 28px 24px; box-shadow: 0 30px 80px rgba(0,0,0,.4); transform: translateY(12px); transition: transform .25s ease; }
.nct-cp-modal.is-open .nct-cp-modal-box { transform: none; }
.nct-cp-modal-close { position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eef3f9; font-size: 24px; line-height: 1; cursor: pointer; color: #0e1b33; }
.nct-cp-modal-box h2 { margin: 0 0 6px; font: 900 26px/1.1 var(--nct-font-body); }
.nct-cp-modal-box p { margin: 0 0 14px; font-size: 14px; color: #3d4d66; }
.nct-cp-invite-rows { display: grid; gap: 8px; }
.nct-cp-invite-row { display: grid; grid-template-columns: 1fr 1.3fr 32px; gap: 8px; align-items: center; }
.nct-cp-invite-row input { height: 44px; padding: 0 14px; border: 1px solid #d9e6f5; border-radius: 999px; font: 500 14px/1 var(--nct-font-body); min-width: 0; }
.nct-cp-inv-remove { border: 0; background: transparent; font-size: 22px; color: #6b7a90; cursor: pointer; }
.nct-cp-text-btn { margin-top: 10px; border: 0; background: transparent; color: #1d7fe0; font: 700 14px/1 var(--nct-font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }
.nct-cp-invite-note { min-height: 18px; margin: 8px 0 0 !important; font-size: 13px; color: #b42318 !important; }
.nct-cp-send { display: block; width: 100%; margin-top: 10px; padding: 14px; border: 0; border-radius: 999px; background: #1d7fe0; color: #fff; font: 800 16px/1 var(--nct-font-body); cursor: pointer; }
.nct-cp-send:disabled { opacity: .6; cursor: wait; }

@media (max-width: 760px) {
	.nct-cp-hero { aspect-ratio: auto; min-height: 420px; background-position: 62% center; }
	.nct-cp-hero-inner { max-width: 100%; padding: 20px 20px 26px; }
	.nct-cp-bar { grid-template-columns: repeat(2, 1fr); gap: 14px 0; margin: -20px 8px 0; }
	.nct-cp-tile:nth-child(2) { border-right: 0; }
	body.nct-cp-mode .nct-cp-status-art { display: none; }
	body.nct-cp-mode .nct-coach-head { padding-right: 0; min-height: 0; }
	.nct-cp-invite-row { grid-template-columns: 1fr 32px; }
	.nct-cp-invite-row .nct-cp-inv-email { grid-column: 1; }
}

/* ======================================================================
 * Player page (client mockup 2026-10-28) - what a player/parent sees when
 * they open the team link. Sport artwork hero, 2-step flow.
 * ==================================================================== */
.nct-team-status .nct-ct-join-hero.nct-pp-hero {
	position: relative;
	aspect-ratio: 2.25 / 1;
	min-height: 340px;
	padding: 0;
	border-radius: 22px;
	overflow: hidden;
	background: #0e1b33 var(--pp-hero) center / cover no-repeat;
	color: #fff;
	display: flex;
	flex-direction: row;
	gap: 0;
	align-items: flex-end;
	text-align: left;
}
.nct-pp-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5, 12, 28, 0) 40%, rgba(5, 12, 28, .78) 100%); }
.nct-pp-hero-inner { position: relative; padding: 24px 32px 24px; max-width: 58%; display: grid; gap: 6px; justify-items: start; }
.nct-pp-league { display: flex; align-items: center; gap: 10px; }
.nct-pp-league-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: rgba(255,255,255,.9); padding: 2px; }
.nct-pp-league-name { font: 700 13px/1 var(--nct-font-body); letter-spacing: 4px; text-transform: uppercase; color: #fff; text-decoration: none; }
.nct-pp-league-name:hover { color: #7cc4ff; }
.nct-pp-team { display: flex; align-items: center; gap: 14px; }
.nct-pp-team-logo { width: 56px; height: 56px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0,0,0,.45)); }
.nct-team-status .nct-pp-team h1 { margin: 0; font: 900 clamp(30px, 4.2vw, 48px)/.95 var(--nct-font-body); text-transform: uppercase; letter-spacing: -1px; color: #fff; background: linear-gradient(180deg, #fff 0%, #cfe6ff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none; filter: drop-shadow(0 4px 14px rgba(0,0,0,.5)); }
.nct-pp-sport { display: inline-block; margin-top: 4px; padding: 7px 20px; border-radius: 4px; background: #1d7fe0; color: #fff; font: 800 15px/1 var(--nct-font-body); letter-spacing: 4px; text-transform: uppercase; transform: skewX(-8deg); }

.nct-team-status .nct-ct-share.nct-pp { padding-top: 22px; }
.nct-pp-steps { display: flex; justify-content: center; align-items: flex-start; gap: 0; margin: 0 0 22px; padding: 0; list-style: none; }
.nct-pp-step { position: relative; display: grid; justify-items: center; gap: 8px; width: 150px; color: #0e1b33; }
.nct-pp-step + .nct-pp-step::before { content: ""; position: absolute; top: 15px; right: calc(50% + 18px); width: calc(100% - 36px); height: 3px; background: #c9d6e6; }
.nct-pp-step.is-current + .nct-pp-step::before, .nct-pp-step.is-done + .nct-pp-step::before { background: linear-gradient(90deg, #1d7fe0, #c9d6e6); }
.nct-pp-step.is-done + .nct-pp-step.is-current::before { background: #1d7fe0; }
.nct-pp-step-num { width: 32px; height: 32px; border-radius: 50%; background: #aab8c8; color: #fff; font: 800 15px/32px var(--nct-font-body); text-align: center; }
.nct-pp-step.is-current .nct-pp-step-num { background: #1d7fe0; box-shadow: 0 0 0 4px rgba(29, 127, 224, .18); }
.nct-pp-step.is-done .nct-pp-step-num { background: #1d7fe0; }
.nct-pp-step-label { font: 600 15px/1.2 var(--nct-font-body); }

.nct-pp-panel { display: grid; gap: 18px; }
.nct-pp-head { display: grid; grid-template-columns: 72px 1fr; gap: 20px; align-items: start; }
.nct-pp-ico { width: 72px; height: 72px; border-radius: 50%; background: #d6ecff; color: #1d7fe0; display: grid; place-items: center; }
.nct-pp-ico svg { width: 36px; height: 36px; }
.nct-pp-head h2 { margin: 0 0 6px; font: 900 clamp(28px, 4vw, 44px)/1.05 var(--nct-font-body); color: #0e1b33; letter-spacing: -.5px; }
.nct-pp-head p { margin: 0; font: 400 16px/1.45 var(--nct-font-body); color: #2d3c52; }
.nct-pp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0; }
.nct-pp-facts > div { padding: 14px 16px; border-radius: 14px; background: #f3f8fd; border: 1px solid #e1ecf7; }
.nct-pp-facts dt { font: 700 11px/1 var(--nct-font-body); letter-spacing: 2px; text-transform: uppercase; color: #5b6b82; margin-bottom: 8px; }
.nct-pp-facts dd { margin: 0; font: 800 18px/1.2 var(--nct-font-body); color: #0e1b33; }
.nct-pp-facts .nct-ct-bar { margin-top: 8px; }
.nct-pp-form .nct-field { font: 600 16px/1.3 var(--nct-font-body); color: #0e1b33; }
.nct-pp-input { position: relative; display: block; margin-top: 8px; }
.nct-pp-input svg { position: absolute; left: 18px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: #8a9ab0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.nct-team-status .nct-pp-form .nct-pp-input input { width: 100%; height: 58px; padding: 0 18px 0 54px !important; border: 1.5px solid #c9d6e6; border-radius: 12px; background: #fff; font: 400 17px/1 var(--nct-font-body); color: #0e1b33; }
.nct-pp-input input:focus { outline: none; border-color: #1d7fe0; box-shadow: 0 0 0 4px rgba(29, 127, 224, .15); }
.nct-pp-back { justify-self: center; margin-top: 4px; border: 0; background: transparent; color: #1d7fe0; font: 600 14px/1 var(--nct-font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 760px) {
	.nct-team-status .nct-ct-join-hero.nct-pp-hero { aspect-ratio: auto; min-height: 400px; background-position: 65% center; }
	.nct-pp-hero-inner { max-width: 100%; padding: 20px 20px 22px; }
	.nct-pp-step { width: 120px; }
	.nct-pp-head { grid-template-columns: 56px 1fr; gap: 14px; }
	.nct-pp-ico { width: 56px; height: 56px; }
	.nct-pp-ico svg { width: 28px; height: 28px; }
}
