/**
 * Coach Card — Picklemall Widgets
 *
 * Shared by the Coach Card and Coaches Grid widgets (markup: Coach_Card::render).
 * Theming comes from --pm-cc-* custom properties that the Style tab sets on the
 * widget wrapper. Defaults live in the var() fallbacks — NOT declared on the
 * card itself — so values set on an ancestor (the grid) cascade into every card.
 */

/* ── Card ─────────────────────────────────────────────────────────────────── */

.pm-coach-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background-color: var(--pm-cc-bg, var(--pm-color-primary-d40, #063B38));
	border: 1px solid var(--pm-cc-border, rgba(255, 255, 255, 0.08));
	border-radius: var(--pm-cc-radius, var(--pm-radius-lg, 16px));
	box-sizing: border-box;
}

/* ── Linked card — the name's link stretches over the whole card ─────────── */

.pm-coach-card--linked {
	position: relative;
	cursor: pointer;
}

.pm-coach-card__link {
	color: inherit;
	text-decoration: none;
}

.pm-coach-card__link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.pm-coach-card__link:focus-visible {
	outline: none;
}

.pm-coach-card__link:focus-visible::after {
	outline: 2px solid var(--pm-cc-social-bg-hover, #E1FF2B);
	outline-offset: 2px;
}

/* Social buttons sit above the stretched link so they stay clickable */
.pm-coach-card--linked .pm-coach-card__socials {
	position: relative;
	z-index: 2;
}

/* ── Photo ────────────────────────────────────────────────────────────────── */

.pm-coach-card__media {
	position: relative;
	aspect-ratio: var(--pm-cc-ratio, 8 / 7);
	overflow: hidden;
	background-color: rgba(255, 255, 255, 0.04);
}

.pm-coach-card__img,
.pm-coach-card__media img {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: var(--pm-cc-image-pos, center top);
	transform: scale(1);
	transition: transform 0.6s var(--pm-ease, cubic-bezier(.4, 0, .2, 1));
}

.pm-coach-card:hover .pm-coach-card__img {
	transform: scale(1.04);
}

.pm-coach-card__placeholder {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.14) 0 18%, transparent 18.5%),
		radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.14) 0 38%, transparent 38.5%);
}

/* ── Info row ─────────────────────────────────────────────────────────────── */

.pm-coach-card__body {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex: 1 1 auto;
	padding: var(--pm-cc-pad, 20px);
}

.pm-coach-card__info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.pm-coach-card__role {
	font-family: var(--pm-font-header, 'A Love of Thunder', serif);
	font-size: var(--pm-text-caption, 0.875rem);
	line-height: var(--pm-leading-snug, 1.2);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pm-cc-role, var(--pm-color-action, #E1FF2B));
	margin: 0;
}

.pm-coach-card__name {
	font-family: var(--pm-font-sans, 'Inter', system-ui, sans-serif);
	font-size: var(--pm-text-subtitle, 1.25rem);
	font-weight: var(--pm-weight-semibold, 600);
	line-height: var(--pm-leading-snug, 1.2);
	letter-spacing: -0.01em;
	text-transform: none;
	color: var(--pm-cc-name, var(--pm-color-white, #FFFFFF));
	margin: 0;
}

.pm-coach-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	font-family: var(--pm-font-header, 'A Love of Thunder', serif);
	font-size: var(--pm-text-caption, 0.875rem);
	line-height: var(--pm-leading-normal, 1.4);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pm-cc-meta, var(--pm-color-secondary-mint, #63D6B0));
	margin: 0;
}

.pm-coach-card__meta-label {
	opacity: 0.7;
}

/* ── Social buttons ───────────────────────────────────────────────────────── */

.pm-coach-card__socials {
	display: flex;
	flex: 0 0 auto;
	gap: 8px;
}

.pm-coach-card__social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--pm-radius-full, 9999px);
	background-color: var(--pm-cc-social-bg, var(--pm-color-orange, #E85D22));
	color: var(--pm-cc-social-icon, #FFFFFF);
	text-decoration: none;
	transition:
		background-color var(--pm-duration-base, 250ms) var(--pm-ease, ease),
		color var(--pm-duration-base, 250ms) var(--pm-ease, ease),
		transform var(--pm-duration-base, 250ms) var(--pm-ease, ease);
}

.pm-coach-card__social:hover,
.pm-coach-card__social:focus-visible {
	background-color: var(--pm-cc-social-bg-hover, var(--pm-color-action, #E1FF2B));
	color: var(--pm-cc-social-icon-hover, var(--pm-color-primary-d80, #052E2C));
	transform: translateY(-2px);
}

.pm-coach-card__social:focus-visible {
	outline: 2px solid var(--pm-cc-social-bg-hover, #E1FF2B);
	outline-offset: 2px;
}

.pm-coach-card__social svg {
	display: block;
	width: 18px;
	height: 18px;
}

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	.pm-coach-card__social {
		width: 36px;
		height: 36px;
	}

	.pm-coach-card__social svg {
		width: 16px;
		height: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pm-coach-card__img,
	.pm-coach-card__social {
		transition: none;
	}

	.pm-coach-card:hover .pm-coach-card__img {
		transform: none;
	}
}
