/**
 * WC Variation Cards — onboarding coach styles (per LA25 brief).
 *
 * Tokens: --ac #3a7d44, --ac2 #2c6135, --ac-soft #eef4ef, --ac-line #d7e6d9,
 * text #1b2026 / #9aa1ac, lines #eef0f2 / #ececee / #e3e5e7. Manrope.
 *
 * @package WC_Variation_Cards
 */

/* ================================================================
   Animations
   ================================================================ */
@keyframes laFade { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes laBobY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes laRing {
	0%, 100% { box-shadow: 0 0 0 3px #eef4ef, 0 0 0 5px rgba(58, 125, 68, 0.30); }
	50%      { box-shadow: 0 0 0 3px #eef4ef, 0 0 0 8px rgba(58, 125, 68, 0.16); }
}

/* ================================================================
   Coachmark tooltip
   ================================================================ */
.wcvc-coach-tip {
	position: fixed;
	z-index: 100000;
	width: max-content;
	min-width: 220px;
	max-width: 264px;
	box-sizing: border-box;
	padding: 13px 15px;
	border-radius: 13px;
	background: #3a7d44;
	color: #fff;
	font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
	box-shadow: 0 16px 38px rgba(20, 24, 31, 0.26);
	opacity: 0;
	/* Let clicks pass through to the page (tabs/fraction) — only the buttons
	   below are interactive. Prevents the tip from blocking selection. */
	pointer-events: none;
}

/* Appearance (fade) — once. Bobbing tooltips keep gently moving afterwards. */
.wcvc-coach-tip.is-in {
	opacity: 1;
	animation: laFade 0.25s ease;
}

.wcvc-coach-tip--bob.is-in {
	animation: laFade 0.25s ease, laBobY 2.4s ease-in-out 0.25s infinite;
}

.wcvc-coach-text {
	margin: 0 0 12px;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.4;
}

.wcvc-coach-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.wcvc-coach-progress {
	font-size: 12px;
	font-weight: 800;
	opacity: 0.85;
}

.wcvc-coach-btns {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wcvc-coach-btn {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	cursor: pointer;
	font-family: inherit;
	transition: 0.15s;
	pointer-events: auto; /* buttons stay clickable while the tip ignores clicks */
}

/* "Aizvērt" — subtle translucent button, no hover colour shift. */
.wcvc-coach-btn--ghost,
.wcvc-coach-btn--ghost:hover,
.wcvc-coach-btn--ghost:focus,
.wcvc-coach-btn--ghost:active {
	padding: 6px 11px;
	background: rgba(255, 255, 255, 0.16) !important;
	color: #fff !important;
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none !important;
	border: none !important;
}

/* "Tālāk" / "Sapratu" — white pill, no hover colour shift. */
.wcvc-coach-btn--primary,
.wcvc-coach-btn--primary:hover,
.wcvc-coach-btn--primary:focus,
.wcvc-coach-btn--primary:active {
	padding: 6px 13px;
	background: #fff !important;
	color: #2c6135 !important;
	font-size: 12.5px;
	font-weight: 800;
	text-decoration: none !important;
	border: none !important;
}

/* Arrow — CSS triangle pointing at the anchor. */
.wcvc-coach-arrow {
	position: absolute;
	width: 0;
	height: 0;
	margin-left: -8px;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
}

.wcvc-coach-tip[data-placement="bottom"] .wcvc-coach-arrow {
	top: -9px;
	border-bottom: 9px solid #3a7d44;
}

.wcvc-coach-tip[data-placement="top"] .wcvc-coach-arrow {
	bottom: -9px;
	border-top: 9px solid #3a7d44;
}

/* ================================================================
   Highlight ring on the active anchor
   ================================================================ */
.wcvc-coach-target {
	position: relative;
	z-index: 99999;
	border-radius: 12px;
	box-shadow: 0 0 0 3px #eef4ef, 0 0 0 5px rgba(58, 125, 68, 0.30) !important;
	animation: laRing 1.6s ease-in-out infinite;
}

/* ================================================================
   Stepper bar ([data-coach-bar]) — paste the matching HTML widget.
   ================================================================ */
.wcvc-stepbar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 4px;
	background: #fff;
	border: 1px solid #eef0f2;
	border-radius: 18px;
	padding: 18px 22px;
	margin: 0 0 30px;
	font-family: 'Manrope', system-ui, sans-serif;
}

.wcvc-step {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 15px 8px 8px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid #ececee;
	transition: 0.15s;
}

.wcvc-step-num {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font: 800 12.5px 'Manrope', sans-serif;
	background: #eef0f2;
	color: #9aa1ac;
}

.wcvc-step-label {
	font: 700 13.5px 'Manrope', sans-serif;
	color: #9aa1ac;
	white-space: nowrap;
}

.wcvc-step-sep {
	flex: 0 0 auto;
	width: 26px;
	height: 2px;
	border-radius: 2px;
	background: #e3e5e7;
	transition: 0.15s;
}

.wcvc-step-sep.is-active {
	background: #3a7d44;
}

/* done — soft green pill, checkmark circle. */
.wcvc-step.is-done {
	background: #eef4ef;
	border: 1px solid #d7e6d9;
}

.wcvc-step.is-done .wcvc-step-num {
	background: #3a7d44;
	color: #fff;
	font-size: 0;
}

.wcvc-step.is-done .wcvc-step-num::after {
	content: "✓";
	font-size: 13px;
	font-weight: 800;
}

.wcvc-step.is-done .wcvc-step-label {
	font-weight: 700;
	color: #1b2026;
}

/* current — white pill, 1.5px green border, number circle. */
.wcvc-step.is-current {
	background: #fff;
	border: 1.5px solid #3a7d44;
}

.wcvc-step.is-current .wcvc-step-num {
	background: #3a7d44;
	color: #fff;
}

.wcvc-step.is-current .wcvc-step-label {
	font-weight: 800;
	color: #1b2026;
}

/* todo — base styles already cover it (grey). */
.wcvc-step.is-todo {
	background: #fff;
	border: 1px solid #ececee;
}
