/* EBCS member area — sidebar app layout. Reuses theme tokens (--green, --teal,
   .card, .status-pill, .pill--*) which load globally via the theme's main.css. */

.ebcs-member-body { margin: 0; background: var(--bg-light, #f4f7fb); }
.ebcs-app { display: flex; min-height: 100vh; font-family: var(--font, 'Inter', sans-serif); }

/* Sidebar */
.ebcs-sidebar {
	width: 240px; flex: 0 0 240px; background: var(--green, #132a60); color: #fff;
	display: flex; flex-direction: column; padding: 20px 0; position: sticky; top: 0; height: 100vh;
}
.ebcs-sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 0 22px 20px; font-weight: 700; font-size: 1.2rem; }
.ebcs-sidebar__brand img { width: 34px; height: 34px; }
.ebcs-sidebar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.ebcs-sidebar__nav a {
	color: rgba(255,255,255,.85); text-decoration: none; padding: 11px 22px; font-size: .95rem;
	display: flex; align-items: center; gap: 10px; border-left: 3px solid transparent;
}
.ebcs-sidebar__nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.ebcs-sidebar__nav a.is-active { background: rgba(255,255,255,.14); color: #fff; border-left-color: var(--teal, #93c5c6); font-weight: 600; }
.ebcs-sidebar__icon { width: 18px; text-align: center; opacity: .9; }
.ebcs-sidebar__logout { color: rgba(255,255,255,.75); text-decoration: none; padding: 12px 22px; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.12); }
.ebcs-sidebar__logout:hover { color: #fff; }

/* Main column */
.ebcs-app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ebcs-topbar {
	background: #fff; border-bottom: 1px solid var(--border, #e0e0e0);
	padding: 14px 28px; display: flex; align-items: center; justify-content: space-between;
}
.ebcs-topbar__title { font-weight: 700; color: var(--text, #1a1a1a); font-size: 1.05rem; }
.ebcs-topbar__user { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text, #1a1a1a); }
.ebcs-app__content { padding: 28px; max-width: 1100px; }

/* Avatar */
.ebcs-avatar { border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
	background: var(--teal, #93c5c6); color: #fff; font-weight: 700; font-size: .8rem; flex: 0 0 auto; }
.ebcs-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Dashboard */
.ebcs-dash__greeting { margin: 0 0 20px; color: var(--text, #1a1a1a); }
.ebcs-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.ebcs-metric { background: #fff; border: 1px solid var(--border,#e0e0e0); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.ebcs-metric__label { color: var(--text-muted, #6b7280); font-size: .82rem; }
.ebcs-metric__value { align-self: flex-start; font-size: .95rem; }
.ebcs-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 900px) { .ebcs-metrics { grid-template-columns: repeat(2,1fr); } .ebcs-cols { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
	.ebcs-sidebar { width: 64px; flex-basis: 64px; }
	.ebcs-sidebar__brand span, .ebcs-sidebar__nav a span:not(.ebcs-sidebar__icon), .ebcs-sidebar__logout { display: none; }
}

.ebcs-compliance-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #eff1f5; }
.ebcs-compliance-row:last-child { border-bottom: 0; }

.ebcs-announcements { list-style: none; margin: 0; padding: 0; }
.ebcs-announcements li { padding: 12px 0; border-bottom: 1px solid #eff1f5; }
.ebcs-announcements li:last-child { border-bottom: 0; }
.ebcs-announcements__date { display: block; color: var(--text-light, #9ca3af); font-size: .78rem; margin-bottom: 2px; }

/* Resources */
.ebcs-res__list { display: flex; flex-direction: column; gap: 12px; }
.ebcs-res { background: #fff; border: 1px solid var(--border,#e0e0e0); border-radius: 8px; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ebcs-res__main h3 { margin: 0 0 4px; font-size: 1rem; color: var(--green,#132a60); }
.ebcs-res__main p { margin: 0 0 8px; color: var(--text-muted,#6b7280); font-size: .88rem; }
.ebcs-res__badge { background: #f0f8f8; color: #3c6f70; font-size: .72rem; padding: 3px 9px; border-radius: 999px; }
.ebcs-res__mini { list-style: none; margin: 0 0 10px; padding: 0; }
.ebcs-res__mini li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eff1f5; font-size: .9rem; }
.ebcs-link { color: var(--teal-dark, #437576); font-weight: 600; text-decoration: none; font-size: .9rem; }

/* Trainer / Assessor pathway promo (Level 2+ coaches) */
.ebcs-ta-banner {
	background: #f0f8f8; border: 1px solid #93c5c6; border-radius: 8px;
	padding: 12px 16px; margin: 0 0 18px; font-size: .92rem; color: #3c6f70;
	display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.ebcs-ta-banner a { color: #132a60; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.ebcs-ta-section { margin-top: 24px; }
.ebcs-ta-section h2 { color: var(--green,#132a60); margin-top: 0; }
.ebcs-ta-section h3 { color: var(--green,#132a60); font-size: 1rem; margin: 0 0 6px; }
.ebcs-ta-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 14px 0; }
@media (max-width: 640px) { .ebcs-ta-cols { grid-template-columns: 1fr; } }
.ebcs-ta-cols p { margin: 0; font-size: .9rem; color: var(--text-muted,#6b7280); }

/* Profile + compliance forms */
.ebcs-photo-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ebcs-compliance__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 16px; }
@media (max-width: 760px) { .ebcs-compliance__grid { grid-template-columns: 1fr; } }
.ebcs-breadcrumb { color: var(--text-muted,#6b7280); font-size: .85rem; margin: 0 0 8px; }

/* Shared member helpers (page heading, muted text, inline notices) */
.ebcs-page-head { margin: 0 0 20px; }
.ebcs-page-head h1 { margin: 0 0 4px; font-size: 1.5rem; color: var(--green,#132a60); }
.ebcs-muted { color: var(--text-muted,#6b7280); }
.ebcs-notice { border-radius: 8px; padding: 12px 16px; margin: 0 0 18px; font-size: .92rem; border: 1px solid transparent; }
.ebcs-notice--ok { background: #eef8f1; border-color: #bfe3cb; color: #1c6b3a; }

/* Certificates & ID page */
.ebcs-cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 760px) { .ebcs-cert-grid { grid-template-columns: 1fr; } }
.ebcs-cert-card { display: flex; flex-direction: column; }
.ebcs-cert-card h2 { margin: 6px 0 8px; font-size: 1.15rem; color: var(--green,#132a60); }
.ebcs-cert-card p { flex: 1 1 auto; }
.ebcs-cert-card .btn { margin-top: 14px; align-self: flex-start; }
.ebcs-cert-icon { font-size: 1.8rem; line-height: 1; }
.ebcs-cert-history { list-style: none; margin: 8px 0 0; padding: 0; }
.ebcs-cert-history li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid #eff1f5; font-size: .92rem; }
.ebcs-cert-history li span { font-weight: 600; min-width: 48px; }
.ebcs-cert-history li a { color: var(--teal-dark,#437576); font-weight: 600; text-decoration: none; }
.ebcs-regen-form { margin-top: 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ebcs-regen-hint { font-size: .85rem; }
.ebcs-breadcrumb a { color: var(--teal-dark,#437576); text-decoration: none; }

/* ── Coaching records (Phase 8a) ─────────────────────────────────────────── */
.ebcs-records__totals { display: flex; gap: 12px; margin: 0 0 20px; flex-wrap: wrap; }
.ebcs-records__stat {
	flex: 1; min-width: 120px; background: #f4f7fb; border: 1px solid #e0e0e0;
	border-radius: 8px; padding: 14px 16px; text-align: center;
}
.ebcs-records__stat strong { display: block; color: #132a60; font-size: 1.5rem; line-height: 1.2; }
.ebcs-records__stat span { color: #666; font-size: .8rem; }

.ebcs-timeline { list-style: none; margin: 0; padding: 0; }
.ebcs-timeline__item {
	display: grid; grid-template-columns: 110px 1fr auto; gap: 14px; align-items: start;
	padding: 14px 0; border-bottom: 1px solid #eef1f6;
}
.ebcs-timeline__item:last-child { border-bottom: 0; }
.ebcs-timeline__date { color: #132a60; font-weight: 600; font-size: .85rem; padding-top: 2px; }
.ebcs-timeline__body strong { margin-right: 8px; }
.ebcs-timeline__notes { margin: 6px 0 0; color: #555; font-size: .88rem; line-height: 1.55; }
.ebcs-timeline__remove { margin: 0; }
.ebcs-linkbtn {
	background: none; border: 0; padding: 0; color: #9aa0a6; font-size: .8rem;
	cursor: pointer; text-decoration: underline;
}
.ebcs-linkbtn:hover { color: #c0392b; }
@media (max-width: 560px) {
	.ebcs-timeline__item { grid-template-columns: 1fr auto; }
	.ebcs-timeline__date { grid-column: 1 / -1; }
}

/* ── Qualification & CPD certificates (Phase 8b) ─────────────────────────── */
.ebcs-award-list { list-style: none; margin: 12px 0 0; padding: 0; }
.ebcs-award {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	padding: 12px 0; border-bottom: 1px solid #eef1f6;
}
.ebcs-award:last-child { border-bottom: 0; }
.ebcs-award strong { color: #132a60; margin-right: 8px; }
.ebcs-award__date { font-size: .82rem; margin-top: 2px; }
@media (max-width: 560px) {
	.ebcs-award { flex-direction: column; align-items: flex-start; }
}

/* ── Coaching video library (Phase 8b) ───────────────────────────────────── */
.ebcs-res__heading { color: #132a60; font-size: 1.15rem; margin: 26px 0 12px; }
.ebcs-res__heading:first-of-type { margin-top: 8px; }

.ebcs-video-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px;
}
.ebcs-video { padding: 0; overflow: hidden; }
.ebcs-video__player {
	display: block; width: 100%; aspect-ratio: 16 / 9;
	background: #0d1d43; border-radius: 8px 8px 0 0;
}
.ebcs-video__meta { padding: 14px 16px 16px; }
.ebcs-video__meta h3 { margin: 0 0 6px; color: #132a60; font-size: 1rem; }
.ebcs-video__meta p { margin: 0 0 10px; color: #555; font-size: .88rem; line-height: 1.55; }
.ebcs-video__tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ebcs-video__dur {
	font-size: .78rem; color: #5d667d; background: #f4f7fb;
	border: 1px solid #e0e0e0; border-radius: 999px; padding: 2px 9px;
}

/* ── Phase 10: My Trainees ─────────────────────────────────────────────────
   Shown only to Trainers (see EBCS_Member_Area::nav_items). Built on the
   shared .card so it sits in the member area without a second card style. */

.ebcs-trainees__list { display: grid; gap: 16px; margin-top: 18px; }

.ebcs-trainees__empty { text-align: center; padding: 32px 24px; color: #555; }
.ebcs-trainees__empty p { margin: 0 0 8px; }

.ebcs-trainee__head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	flex-wrap: wrap;
}

.ebcs-trainee__name { margin: 0; font-size: 20px; color: var(--navy, #132a60); }
.ebcs-trainee__meta { margin: 4px 0 0; font-size: 13px; color: #666; }

.ebcs-trainee__dl {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
	margin: 16px 0 0;
}

.ebcs-trainee__dl > div { min-width: 0; }
.ebcs-trainee__dl dt { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #7d859b; }
.ebcs-trainee__dl dd { margin: 2px 0 0; font-size: 14px; color: #232c40; overflow-wrap: anywhere; }

.ebcs-trainee__actions {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #e0e0e0;
}

.ebcs-trainee__actions .ebcs-opt { margin: 8px 0 0; }

@media (max-width: 640px) {
	.ebcs-trainee__dl { grid-template-columns: 1fr; }
}

/* ── Shop (Phase 13) ─────────────────────────────────────────────────────── */
.ebcs-shop h1 { margin: 0 0 4px; }
.ebcs-shop__grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 20px 0; }
.ebcs-shop__item { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.ebcs-shop__img { display: block; background: #f4f7fb; border-radius: 8px; overflow: hidden; }
.ebcs-shop__img img { width: 100%; height: auto; display: block; }
.ebcs-shop__body h2 { margin: 0 0 6px; font-size: 1.35rem; color: var(--green, #132a60); }
.ebcs-shop__price { margin: 0 0 6px; font-size: 1.1rem; }
.ebcs-shop__price strong { font-size: 1.6rem; color: var(--green, #132a60); margin-right: 6px; }
.ebcs-shop__price s { color: #9aa0a6; margin-right: 6px; }
.ebcs-shop__offer { display: inline-block; margin: 0 0 12px; padding: 4px 10px; border-radius: 6px; background: #fff4e0; color: #8a5a00; font-size: .85rem; font-weight: 600; }
.ebcs-shop__desc { margin-bottom: 12px; }
.ebcs-shop__desc p { margin: 0 0 8px; }
.ebcs-shop__fit { margin: -4px 0 14px; }
.ebcs-shop__size.is-invalid { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .15); }
.ebcs-shop__checkout { margin: 0 0 24px; scroll-margin-top: 90px; }
.ebcs-shop__checkout h3 { margin: 18px 0 4px; font-size: 1.05rem; color: var(--green, #132a60); }
.ebcs-shop__summary { font-weight: 600; font-size: 1.05rem; margin: 0; }
.ebcs-shop__returns { margin: 6px 0 14px; line-height: 1.5; }
.ebcs-shop__orders { margin-top: 28px; }
.ebcs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ebcs-table th, .ebcs-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #e0e0e0; vertical-align: top; }
.ebcs-table th { background: #f4f7fb; font-weight: 600; color: var(--green, #132a60); white-space: nowrap; }
.ebcs-table tr:last-child td { border-bottom: 0; }
@media (max-width: 900px) {
	.ebcs-shop__item { grid-template-columns: 1fr; }
}
/* .alert sets its own display, which beats the hidden attribute. */
.ebcs-shop [hidden] { display: none !important; }
.ebcs-shop .ebcs-stripe-element { min-height: 60px; }
