/**
 * Block: wp-career-board-pro/resume-single
 *
 * Premium-feel pattern: prominent hero with avatar + headline +
 * open-to-work pill (teal token pair), uppercase eyebrow heading per
 * section, hairline dividers, transparent body container, print-clean
 * stylesheet. 100% token-driven.
 *
 * @package WP_Career_Board_Pro
 * @since   1.0.0
 */

/* ── Members-only access gate ────────────────────────────────────────── */
.wcb-resume-access-gate {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 420px;
	margin: 48px auto;
	padding: 32px 24px;
	text-align: center;
	background: var( --wcb-base, #ffffff );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-lg, 12px );
}

/* ── CSS custom properties ───────────────────────────────────────────── */
.wcb-rs {
	--wcb-rs-otw:        var( --wcb-teal );
	--wcb-rs-otw-fg:     var( --wcb-teal-fg );
	--wcb-rs-otw-bg:     var( --wcb-teal-bg );
	--wcb-rs-ink:        var( --wcb-contrast, #0f172a );
	--wcb-rs-ink-2:      var( --wcb-text-secondary );
	--wcb-rs-ink-3:      var( --wcb-text-secondary );

	font-family: inherit;
	font-size: var( --wcb-text-md );
	color: var( --wcb-rs-ink );
	line-height: var( --wcb-leading-relaxed );
	max-width: 1100px;
	margin: var( --wcb-space-3xl ) auto;
	padding: 0 var( --wcb-space-xl );
}

/* ── Suppress theme post title + sidebar on wcb_resume pages ───────────
 *
 * `!important` policy in this file: every `!important` is fighting a
 * theme rule that itself uses `!important` (Astra container width,
 * BuddyX Pro grid-template-columns, Reign sidebar display, theme
 * link underlines). Specificity alone cannot beat a theme's own
 * `!important`, so the keyword is the right tool here. The print
 * stylesheet at the bottom uses the same defense against `@media
 * print` overrides themes ship to keep their navigation visible.
 * Do not refactor away without testing on the four target themes
 * (Reign, BuddyX Pro, Astra, Twenty Twenty-Five). */
.wcb-resume-page .entry-title,
.wcb-resume-page .page-title,
.wcb-resume-page h1.post-title,
.wcb-resume-page .post-title,
.wcb-resume-page .wp-block-post-title {
	display: none !important;
}

.wcb-resume-page #secondary,
.wcb-resume-page .widget-area,
.wcb-resume-page aside.sidebar,
.wcb-resume-page .sidebar-area,
.wcb-resume-page .site-sidebar,
.wcb-resume-page #sidebar {
	display: none !important;
}

.wcb-resume-page #primary,
.wcb-resume-page .content-area,
.wcb-resume-page .site-main,
.wcb-resume-page main.wp-block-group {
	max-width: 100% !important;
	width: 100% !important;
	float: none !important;
	padding-inline-end: 0 !important;
}

/* ── Hero — prominent avatar + headline + OtW pill ───────────────────── */
.wcb-rs-hero {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: var( --wcb-space-3xl );
	background: var( --wcb-base, #ffffff );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-xl );
	padding: var( --wcb-space-4xl );
	margin-bottom: var( --wcb-space-3xl );
	box-shadow: var( --wcb-shadow-sm );
}

/* Save button anchored top-right of the hero card so it sits in the same
 * spot as Find Jobs and Companies single. (0,3,1) wins over the canonical
 * `.wcb-bookmark-hero-btn` rule that has no positioning. */
[class*="wp-block-wcb-"] .wcb-rs-hero > .wcb-rs-hero-save {
	position: absolute;
	top: var( --wcb-space-lg );
	inset-inline-end: var( --wcb-space-lg );
	z-index: 1;
}

@media (max-width: 720px) {
	[class*="wp-block-wcb-"] .wcb-rs-hero > .wcb-rs-hero-save {
		position: static;
		align-self: flex-end;
		margin: var( --wcb-space-md ) 0 0;
	}
}

.wcb-rs-hero-avatar-wrap {
	position: relative;
	flex-shrink: 0;
}

.wcb-rs-hero-avatar {
	width: 120px;
	height: 120px;
	border-radius: var( --wcb-radius-full );
	object-fit: cover;
	border: 3px solid var( --wcb-base, #ffffff );
	box-shadow: 0 0 0 2px var( --wcb-border, #e2e8f0 );
	display: block;
}

/* Open to Work ring — teal trust accent. */
.wcb-rs-otw-ring {
	position: absolute;
	inset: -4px;
	border-radius: var( --wcb-radius-full );
	border: 3px solid var( --wcb-rs-otw );
	pointer-events: none;
}

.wcb-rs-hero-info {
	flex: 1;
	min-width: 0;
}

.wcb-rs-hero-name-row {
	display: flex;
	align-items: center;
	gap: var( --wcb-space-md );
	flex-wrap: wrap;
	margin-bottom: var( --wcb-space-xs );
}

.wcb-rs-hero-name {
	font-size: var( --wcb-text-3xl );
	font-weight: var( --wcb-font-bold );
	color: var( --wcb-rs-ink );
	margin: 0;
	line-height: var( --wcb-leading-tight );
}

/* Open-to-work pill — teal token pair. */
.wcb-rs-otw-badge {
	display: inline-flex;
	align-items: center;
	background: var( --wcb-rs-otw-bg );
	color: var( --wcb-rs-otw-fg );
	font-size: var( --wcb-text-xs );
	font-weight: var( --wcb-font-semibold );
	padding: var( --wcb-space-xs ) var( --wcb-space-md );
	border-radius: var( --wcb-radius-full );
	border: 1px solid currentColor;
	white-space: nowrap;
	letter-spacing: 0.02em;
}

.wcb-rs-hero-headline {
	font-size: var( --wcb-text-lg );
	color: var( --wcb-rs-ink-2 );
	font-weight: var( --wcb-font-medium );
	margin: 0 0 var( --wcb-space-sm );
}

.wcb-rs-hero-meta-row {
	display: flex;
	align-items: center;
	gap: var( --wcb-space-xl );
	flex-wrap: wrap;
	margin-bottom: var( --wcb-space-lg );
}

.wcb-rs-hero-meta-item {
	display: inline-flex;
	align-items: center;
	gap: var( --wcb-space-xs );
	font-size: var( --wcb-text-sm );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-hero-meta-link {
	color: var( --wcb-primary, #2563eb );
	text-decoration: none;
}

.wcb-rs-hero-meta-link:hover {
	text-decoration: underline;
}

/* ── Hero action row ─────────────────────────────────────────────────── */
.wcb-rs-hero-actions {
	display: flex;
	align-items: center;
	gap: var( --wcb-space-sm );
	flex-wrap: wrap;
}

.wcb-rs-hero-social {
	display: flex;
	align-items: center;
	gap: var( --wcb-space-sm );
}

.wcb-rs-social-btn {
	display: inline-flex;
	align-items: center;
	gap: var( --wcb-space-xs );
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-medium );
	color: var( --wcb-rs-ink-2 );
	background: transparent;
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-md );
	padding: var( --wcb-space-sm ) var( --wcb-space-md );
	text-decoration: none;
	transition: background var( --wcb-transition-fast ), border-color var( --wcb-transition-fast ), color var( --wcb-transition-fast );
}

.wcb-rs-social-btn:hover {
	background: var( --wcb-bg-subtle );
	border-color: var( --wcb-primary, #2563eb );
	color: var( --wcb-primary, #2563eb );
}

.wcb-rs-print-btn {
	display: inline-flex;
	align-items: center;
	gap: var( --wcb-space-xs );
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-semibold );
	font-family: inherit;
	color: var(--wcb-on-primary, #ffffff);
	background: var( --wcb-primary, #2563eb );
	border: 0;
	border-radius: var( --wcb-radius-md );
	padding: var( --wcb-space-sm ) var( --wcb-space-lg );
	cursor: pointer;
	box-shadow: var( --wcb-shadow-sm );
	transition: transform var( --wcb-transition-fast ), box-shadow var( --wcb-transition-fast );
	line-height: 1;
}

.wcb-rs-print-btn:hover {
	transform: translateY( -1px );
	box-shadow: var( --wcb-shadow-md );
}

.wcb-rs-pdf-btn {
	display: inline-flex;
	align-items: center;
	gap: var( --wcb-space-xs );
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-medium );
	color: var( --wcb-rs-ink-2 );
	background: transparent;
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-md );
	padding: var( --wcb-space-sm ) var( --wcb-space-lg );
	text-decoration: none;
	transition: background var( --wcb-transition-fast ), border-color var( --wcb-transition-fast ), color var( --wcb-transition-fast );
	line-height: 1;
}

.wcb-rs-pdf-btn:hover {
	background: var( --wcb-bg-subtle );
	border-color: var( --wcb-primary, #2563eb );
	color: var( --wcb-primary, #2563eb );
}

/* ── Two-column body ─────────────────────────────────────────────────── */
.wcb-rs-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var( --wcb-space-2xl );
	align-items: start;
}

/* ── Sections (main) — light hairline panels ───────────────────────────
 * Tightened from `--wcb-space-3xl` padding + `--wcb-space-xl` margin to
 * `--wcb-space-xl` + `--wcb-space-md` so the cards stack with the same
 * vertical rhythm as the dashboard surfaces. Earlier values left ~80px
 * of dead air between ABOUT and WORK EXPERIENCE on short bios. */
.wcb-rs-section {
	background: var( --wcb-base, #ffffff );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-xl );
	padding: var( --wcb-space-xl );
	margin-bottom: var( --wcb-space-md );
	box-shadow: var( --wcb-shadow-sm );
}

.wcb-rs-section:last-child {
	margin-bottom: 0;
}

/* Section heading paint is owned by `assets/css/wcb-ui.css` (shared
 * `h2.wcb-rs-section-heading` rule with parent-block specificity to
 * beat Reign / Astra `.entry-content h2` overrides). No per-block
 * heading style needed here. */

.wcb-rs-section-icon {
	color: var( --wcb-primary, #2563eb );
	flex-shrink: 0;
}

.wcb-rs-summary {
	font-size: var( --wcb-text-md );
	line-height: var( --wcb-leading-relaxed );
	color: var( --wcb-rs-ink-2 );
	margin: 0;
}

/* ── Timeline (experience, education) ────────────────────────────────── */
.wcb-rs-timeline {
	position: relative;
	padding-inline-start: var( --wcb-space-2xl );
}

.wcb-rs-timeline::before {
	content: '';
	position: absolute;
	inset-inline-start: 7px;
	top: var( --wcb-space-sm );
	bottom: var( --wcb-space-sm );
	width: 2px;
	background: var( --wcb-border, #e2e8f0 );
	border-radius: 2px;
}

.wcb-rs-tl-item {
	position: relative;
	margin-bottom: var( --wcb-space-3xl );
}

.wcb-rs-tl-item:last-child {
	margin-bottom: 0;
}

.wcb-rs-tl-dot {
	position: absolute;
	inset-inline-start: calc( var( --wcb-space-2xl ) * -1 );
	top: 6px;
	width: 14px;
	height: 14px;
	border-radius: var( --wcb-radius-full );
	background: var( --wcb-primary, #2563eb );
	border: 2px solid var( --wcb-base, #ffffff );
	box-shadow: 0 0 0 2px var( --wcb-primary, #2563eb );
}

.wcb-rs-tl-dot--edu {
	background: var( --wcb-base, #ffffff );
	border-color: var( --wcb-primary, #2563eb );
	box-shadow: 0 0 0 2px var( --wcb-primary, #2563eb );
}

.wcb-rs-tl-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var( --wcb-space-md );
	margin-bottom: var( --wcb-space-xs );
}

.wcb-rs-tl-role-wrap {
	display: flex;
	align-items: center;
	gap: var( --wcb-space-sm );
	flex-wrap: wrap;
}

.wcb-rs-tl-role {
	font-size: var( --wcb-text-lg );
	font-weight: var( --wcb-font-semibold );
	color: var( --wcb-rs-ink );
}

.wcb-rs-badge {
	display: inline-flex;
	align-items: center;
	font-size: var( --wcb-text-xs );
	font-weight: var( --wcb-font-medium );
	padding: 2px var( --wcb-space-sm );
	border-radius: var( --wcb-radius-sm );
	line-height: var( --wcb-leading-tight );
}

.wcb-rs-badge--type {
	background: var( --wcb-info-bg-soft );
	color: var( --wcb-info-fg );
}

.wcb-rs-tl-duration {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
	white-space: nowrap;
	flex-shrink: 0;
}

.wcb-rs-tl-company {
	font-size: var( --wcb-text-base );
	color: var( --wcb-rs-ink-2 );
	margin: 0 0 2px;
}

.wcb-rs-tl-sep {
	margin: 0 var( --wcb-space-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-edu-gpa {
	margin-inline-start: var( --wcb-space-sm );
	background: var( --wcb-bg-subtle );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-sm );
	font-size: var( --wcb-text-xs );
	padding: 1px var( --wcb-space-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-tl-dates {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
	margin: 0 0 var( --wcb-space-sm );
}

.wcb-rs-tl-desc {
	font-size: var( --wcb-text-base );
	line-height: var( --wcb-leading-relaxed );
	color: var( --wcb-rs-ink-2 );
	margin: var( --wcb-space-sm ) 0 0;
}

.wcb-rs-tl-achievements {
	font-style: italic;
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-tl-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var( --wcb-space-xs );
	margin-top: var( --wcb-space-md );
}

.wcb-rs-tag {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-2 );
	background: var( --wcb-bg-subtle );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-sm );
	padding: 2px var( --wcb-space-sm );
}

/* ── Portfolio grid ──────────────────────────────────────────────────── */
.wcb-rs-portfolio-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 220px, 1fr ) );
	gap: var( --wcb-space-md );
}

.wcb-rs-portfolio-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var( --wcb-space-md );
	padding: var( --wcb-space-md ) var( --wcb-space-lg );
	background: var( --wcb-base, #ffffff );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-md );
	text-decoration: none;
	color: var( --wcb-rs-ink-2 );
	font-size: var( --wcb-text-base );
	font-weight: var( --wcb-font-medium );
	box-shadow: var( --wcb-shadow-sm );
	transition: border-color var( --wcb-transition-fast ), box-shadow var( --wcb-transition-fast ), transform var( --wcb-transition-fast );
	min-width: 0;
}

.wcb-rs-portfolio-card:hover {
	transform: translateY( -1px );
	border-color: var( --wcb-primary, #2563eb );
	box-shadow: var( --wcb-shadow-md );
	color: var( --wcb-primary, #2563eb );
}

.wcb-rs-portfolio-label {
	display: block;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ── Aside cards ─────────────────────────────────────────────────────── */
.wcb-rs-aside-card {
	background: var( --wcb-base, #ffffff );
	border: 1px solid var( --wcb-border, #e2e8f0 );
	border-radius: var( --wcb-radius-xl );
	padding: var( --wcb-space-2xl );
	margin-bottom: var( --wcb-space-xl );
	box-shadow: var( --wcb-shadow-sm );
}

.wcb-rs-aside-card:last-child {
	margin-bottom: 0;
}

/* `.wcb-rs-aside-heading` paint owned by `assets/css/wcb-ui.css`. The
 * SVG icon color override stays here as it's a single declaration. */
.wcb-rs-aside-heading svg {
	color: var( --wcb-primary, #2563eb );
}

/* ── Skills bars ─────────────────────────────────────────────────────── */
.wcb-rs-skill-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var( --wcb-space-md );
}

.wcb-rs-skill-item {
	display: flex;
	flex-direction: column;
	gap: var( --wcb-space-xs );
}

.wcb-rs-skill-label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wcb-rs-skill-name {
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-medium );
	color: var( --wcb-rs-ink );
}

.wcb-rs-skill-level {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-skill-bar {
	height: 5px;
	background: var( --wcb-border, #e2e8f0 );
	border-radius: 3px;
	overflow: hidden;
}

.wcb-rs-skill-fill {
	height: 100%;
	background: var( --wcb-primary, #2563eb );
	border-radius: 3px;
	transition: width var( --wcb-transition-slow );
}

@media ( prefers-reduced-motion: reduce ) {
	.wcb-rs-skill-fill {
		transition: none;
	}
}

/* ── Language dots ───────────────────────────────────────────────────── */
.wcb-rs-lang-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var( --wcb-space-md );
}

.wcb-rs-lang-item {
	display: flex;
	flex-direction: column;
	gap: var( --wcb-space-xs );
}

.wcb-rs-lang-label-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wcb-rs-lang-name {
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-medium );
	color: var( --wcb-rs-ink );
}

.wcb-rs-lang-level {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-lang-dots {
	display: flex;
	gap: var( --wcb-space-xs );
}

.wcb-rs-lang-dot {
	width: 10px;
	height: 10px;
	border-radius: var( --wcb-radius-full );
	background: var( --wcb-border, #e2e8f0 );
}

.wcb-rs-lang-dot--filled {
	background: var( --wcb-primary, #2563eb );
}

/* ── Certifications ──────────────────────────────────────────────────── */
.wcb-rs-cert-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var( --wcb-space-md );
}

.wcb-rs-cert-item {
	display: flex;
	gap: var( --wcb-space-md );
	align-items: flex-start;
}

.wcb-rs-cert-dot {
	width: 8px;
	height: 8px;
	border-radius: var( --wcb-radius-full );
	background: var( --wcb-primary, #2563eb );
	flex-shrink: 0;
	margin-top: 5px;
}

.wcb-rs-cert-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.wcb-rs-cert-name {
	font-size: var( --wcb-text-sm );
	font-weight: var( --wcb-font-semibold );
	color: var( --wcb-rs-ink );
}

.wcb-rs-cert-issuer {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-cert-date {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-rs-ink-3 );
}

.wcb-rs-cert-link {
	font-size: var( --wcb-text-xs );
	color: var( --wcb-primary, #2563eb );
	text-decoration: none;
	margin-top: 2px;
}

.wcb-rs-cert-link:hover {
	text-decoration: underline;
}

/* Decorative "opens in a new tab" arrow. Lives in markup, not in the msgid,
   so it can be mirrored for RTL without the translator carrying the glyph. */
.wcb-rs-cert-link-glyph {
	display: inline-block;
}

[dir="rtl"] .wcb-rs-cert-link-glyph {
	transform: scaleX( -1 );
}

.wcb-rs-field-label {
	font-weight: var( --wcb-font-semibold );
	margin-inline-end: var( --wcb-space-xs );
}

/* ── Print styles — strip nav/footer chrome, single-color borders ────── */
@media print {
	.wcb-rs-hero-actions,
	.wcb-rs-print-btn,
	.wcb-rs-pdf-btn,
	.wcb-rs-hero-social {
		display: none !important;
	}

	.wcb-rs,
	.wcb-rs-hero,
	.wcb-rs-section,
	.wcb-rs-aside-card,
	.wcb-rs-portfolio-card {
		box-shadow: none !important;
		border-color: #cccccc !important;
		break-inside: avoid;
	}

	.wcb-rs-body {
		grid-template-columns: minmax(0, 1fr) 260px;
	}

	.wcb-rs-skill-fill,
	.wcb-rs-lang-dot--filled,
	.wcb-rs-tl-dot,
	.wcb-rs-cert-dot {
		print-color-adjust: exact;
		-webkit-print-color-adjust: exact;
	}

	.wcb-rs-hero,
	.wcb-rs-section,
	.wcb-rs-aside-card {
		padding: var( --wcb-space-xl );
	}

	body :is( header, nav, footer, .site-header, .site-footer, #masthead, #colophon ) {
		display: none !important;
	}
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media ( max-width: 960px ) {
	.wcb-rs-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.wcb-rs-aside {
		display: grid;
		grid-template-columns: repeat( auto-fill, minmax( 260px, 1fr ) );
		gap: var( --wcb-space-lg );
	}

	.wcb-rs-aside-card {
		margin-bottom: 0;
	}
}

@media ( max-width: 640px ) {
	.wcb-rs {
		margin: var( --wcb-space-xl ) auto;
		padding: 0 var( --wcb-space-lg );
	}

	.wcb-rs-hero {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: var( --wcb-space-2xl ) var( --wcb-space-xl );
	}

	.wcb-rs-hero-name-row,
	.wcb-rs-hero-meta-row,
	.wcb-rs-hero-actions {
		justify-content: center;
	}

	.wcb-rs-hero-name {
		font-size: var( --wcb-text-2xl );
	}

	.wcb-rs-tl-duration {
		display: none;
	}

	.wcb-rs-section {
		padding: var( --wcb-space-xl ) var( --wcb-space-lg );
	}

	.wcb-rs-aside {
		grid-template-columns: minmax(0, 1fr);
	}
}
