/**
 * Mocheqi Free Shipping — banner styles.
 *
 * Visual language mirrors mocheqi-account: copper/peach accent, Shobnika/Zapus
 * type, pill shapes, hover-lift, --transition easing. Tokens defined with
 * fallback values so the banner looks right even if the theme doesn't expose them.
 *
 * @package Mocheqi_Free_Shipping
 */

/* ------------------------------------------------------------------ */
/* Design tokens (fallback values = the canonical mocheqi palette)     */
/* ------------------------------------------------------------------ */

:root {
	--mfs-copper:    #BA5A31;
	--mfs-peach:     #FFE5B4;
	--mfs-black:     #000000;
	--mfs-white:     #FFFFFF;
	--mfs-grey:      #F5F5F7;
	--mfs-border:    rgba(0, 0, 0, 0.08);
	--mfs-text-dim:  #888;
	--mfs-success:   #2e7d32;
	--mfs-success-bg:#e8f5e9;

	--mfs-radius-md: 20px;
	--mfs-radius-sm: 12px;

	--mfs-shadow:    0 10px 30px rgba(0, 0, 0, 0.05);
	--mfs-transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

	--mfs-font-heading: 'Shobnika', serif;
	--mfs-font-body:    'Zapus sans', sans-serif;
}

/* ------------------------------------------------------------------ */
/* Banner wrapper                                                     */
/* ------------------------------------------------------------------ */

.mocheqi-fs {
	/* Inherit theme tokens where available, fall back to canonical values. */
	--mfs-accent:    var(--copper, var(--mfs-copper));
	--mfs-accent-bg: var(--peach,  var(--mfs-peach));
	--mfs-text:      var(--black,  var(--mfs-black));
	--mfs-surface:   var(--grey-light, var(--mfs-grey));
	--mfs-radius:    var(--radius-md, var(--mfs-radius-md));
	--mfs-easing:    var(--transition, var(--mfs-transition));

	background: var(--mfs-surface);
	border-radius: var(--mfs-radius);
	padding: 20px 24px;
	margin-bottom: 20px;
	color: var(--mfs-text);
	font-family: var(--font-body, var(--mfs-font-body));
	transition: var(--mfs-easing);
}

/* Cart-page variant: a touch more presence. */
.mocheqi-fs--cart {
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

/* Achieved state: success palette overrides. */
.mocheqi-fs.is-achieved {
	background: var(--mfs-success-bg);
	--mfs-accent: var(--mfs-success);
}

/* ------------------------------------------------------------------ */
/* Inner layout: icon + body                                          */
/* ------------------------------------------------------------------ */

.mocheqi-fs__inner {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.mocheqi-fs__icon {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--mfs-white);
	color: var(--mfs-accent);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
	transition: var(--mfs-easing);
}

.mocheqi-fs__body {
	flex: 1;
	min-width: 0;
}

.mocheqi-fs__message {
	margin: 0 0 4px;
	font-family: var(--font-heading, var(--mfs-font-heading));
	font-weight: 400;
	font-size: 18px;
	line-height: 1.3;
	color: var(--mfs-text);
}

.mocheqi-fs__sub {
	margin: 0;
	font-size: 13px;
	color: var(--mfs-text-dim);
	line-height: 1.4;
}

/* ------------------------------------------------------------------ */
/* Progress bar                                                       */
/* ------------------------------------------------------------------ */

.mocheqi-fs__track {
	margin-top: 16px;
	height: 8px;
	border-radius: 50px;
	background: var(--mfs-border);
	overflow: hidden;
	position: relative;
}

.mocheqi-fs__fill {
	display: block;
	height: 100%;
	border-radius: 50px;
	background: var(--mfs-accent);
	width: 0;
	transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle shimmer while not yet achieved — keeps it lively. */
.mocheqi-fs:not(.is-achieved) .mocheqi-fs__fill {
	background-image: linear-gradient(
		90deg,
		var(--mfs-accent) 0%,
		var(--mfs-accent-bg) 50%,
		var(--mfs-accent) 100%
	);
	background-size: 200% 100%;
	animation: mfsShimmer 2.5s linear infinite;
}

@keyframes mfsShimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* ------------------------------------------------------------------ */
/* Meter labels (0 ₽ ... threshold)                                  */
/* ------------------------------------------------------------------ */

.mocheqi-fs__meter {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 11px;
	color: var(--mfs-text-dim);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* ------------------------------------------------------------------ */
/* Mini-cart variant: compact                                         */
/* ------------------------------------------------------------------ */

.mocheqi-fs--mini_cart {
	padding: 14px 16px;
	margin-bottom: 14px;
	border-radius: var(--mfs-radius-sm);
}

.mocheqi-fs--mini_cart .mocheqi-fs__inner {
	gap: 10px;
}

.mocheqi-fs--mini_cart .mocheqi-fs__icon {
	width: 32px;
	height: 32px;
}

.mocheqi-fs--mini_cart .mocheqi-fs__message {
	font-size: 14px;
}

.mocheqi-fs--mini_cart .mocheqi-fs__sub {
	font-size: 12px;
}

.mocheqi-fs--mini_cart .mocheqi-fs__track {
	margin-top: 12px;
	height: 6px;
}

.mocheqi-fs--mini_cart .mocheqi-fs__meter {
	display: none; /* keep the mini-cart tidy */
}

/* ------------------------------------------------------------------ */
/* Reduced motion                                                     */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.mocheqi-fs *,
	.mocheqi-fs *::before,
	.mocheqi-fs *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
