/* =========================================================================
 * Camélia — "Nouveau départ" contest (September–October 2026).
 *
 * Styles for the announcement bar, the home-page section, the entry pop-up
 * and the cart/checkout rule line. Tokens come from the child theme's
 * style.css, so this file never hardcodes a brand colour.
 *
 * Mobile-first throughout, and direction-agnostic: every inset uses a logical
 * property (`inline-start` / `inline-end`) so the Arabic pages mirror without
 * a single `html[dir="rtl"]` override. The one exception is the type stack,
 * which style.css already swaps to Cairo for RTL.
 *
 * Delete this file when the campaign is over — see inc/contest.php.
 * ====================================================================== */

/* ------------------------------------------------- 1. Announcement bar */

/*
 * Lives inside Woodmart's own header banner, which is painted aubergine and
 * is 60px tall on desktop, 80px on mobile. Everything here has to fit that
 * without pushing the header around.
 *
 * The "Participer" pill is cream on aubergine rather than green or gold on
 * purpose: green is reserved for buying on this site, and gold is an accent,
 * never an action. A cream pill reads as clickable without borrowing either.
 */
.cam-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 12px;
	padding: 0 12px;
	line-height: 1.3;
	font-family: var(--cam-font-body);
	font-size: 13px;
	text-align: center;
}

.cam-bar__text {
	color: #fff;
}

/*
 * In the bar the mark sits inside the text span rather than beside it, so that
 * when the sentence wraps on a narrow phone the icon stays glued to the first
 * word instead of being stranded on a line of its own by the flex gap.
 *
 * The colour is set explicitly because `currentColor` here is the bar's white;
 * gold is the accent, and the icon is an accent.
 */
.cam-bar__text .cam-cc__icon {
	display: inline-block;
	vertical-align: -.24em;
	margin-inline-end: 6px;
	color: var(--cam-gold);
}

.cam-bar__text strong {
	color: var(--cam-gold);
	font-weight: 700;
}

.cam-bar__cta {
	flex: 0 0 auto;
	padding: 5px 16px;
	border-radius: var(--cam-r-pill);
	background: var(--cam-cream);
	color: var(--cam-aubergine) !important;
	font-weight: 700;
	font-size: 13px;
	text-decoration: none;
	white-space: nowrap;
	transition: background .18s ease, transform .18s ease;
}

.cam-bar__cta:hover,
.cam-bar__cta:focus-visible {
	background: #fff;
	transform: translateY(-1px);
}

@media (min-width: 768px) {
	.cam-bar {
		font-size: 14px;
		gap: 16px;
	}
}

/* ------------------------------------------------------- 2. The section */

.cam-cc {
	/*
	 * The site header is sticky. Without this the anchor from the bar lands
	 * with the title hidden underneath it.
	 */
	scroll-margin-top: 120px;

	padding: 32px 16px;
	background:
		radial-gradient(120% 90% at 100% 0%, rgba(201, 162, 75, .16) 0%, rgba(201, 162, 75, 0) 60%),
		var(--cam-cream-light);
	border-block: 1px solid var(--cam-card-border);
}

.cam-cc__inner {
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 1100px;
	margin: 0 auto;
	align-items: center;
}

.cam-cc__media {
	flex: 0 0 auto;
	line-height: 0;
}

.cam-cc__img {
	width: 200px;
	height: auto;
	max-width: 100%;
	border-radius: var(--cam-r-card);
	border: 1px solid var(--cam-card-border);
	box-shadow: 0 10px 30px rgba(78, 42, 68, .12);
}

.cam-cc__body {
	flex: 1 1 auto;
	text-align: center;
}

.cam-cc__eyebrow {
	margin: 0 0 6px;
	font-family: var(--cam-font-body);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cam-gold-dark);
}

/*
 * The mark and the word travel together as one inline box, so the pair obeys
 * whatever `text-align` the paragraph has — centred on a phone, start-aligned
 * from 900px — and mirrors on the Arabic pages with no RTL rule at all.
 *
 * The 1px nudge is optical, not geometric: the icon's drawn mass sits slightly
 * above its box because of the bow, so mathematically centring it makes it
 * read as riding high next to a row of capitals.
 */
.cam-cc__eyebrow-in {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.cam-cc__icon {
	flex: 0 0 auto;
	transform: translateY(1px);
}

.cam-cc__title {
	margin: 0 0 10px;
	font-family: var(--cam-font-display);
	font-size: 26px;
	line-height: 1.2;
	font-weight: 600;
	color: var(--cam-aubergine);
}

.cam-cc__text {
	margin: 0 0 16px;
	font-family: var(--cam-font-body);
	font-size: 15px;
	line-height: 1.6;
	color: var(--cam-ink);
}

.cam-cc__perks {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	/*
	 * `center`, not the default `stretch`: a pill must be as tall as its own
	 * text and nothing more. Left to stretch, any one of them that escapes the
	 * margin reset below would be pulled to the full height of its flex line.
	 */
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

/*
 * The margin reset is the point of this rule, and it is not cosmetic.
 * Woodmart ships
 *
 *   :is(ul, ol) li             { margin-bottom: var(--li-mb) }
 *   :is(ul, ol) li:last-child  { margin-bottom: 0 }
 *
 * and nothing here declared a margin, so it applied unopposed: the first two
 * pills carried 10px below and the last carried none. Inside a stretching flex
 * line that made "3 minutes chrono" render 41.6px tall against 31.6px for its
 * neighbours — a pill visibly fatter at the bottom than the other two.
 *
 * `:is(ul, ol) li:last-child` weighs (0,1,2), so the parent class is needed to
 * reach (0,2,1) and beat it. `.cam-cc__perks li` alone is (0,1,1) and loses.
 */
.cam-cc .cam-cc__perks li,
.cam-pop .cam-cc__perks li {
	margin: 0;
}

.cam-cc__perks li {
	padding: 5px 12px;
	border: 1px solid var(--cam-gold);
	border-radius: var(--cam-r-pill);
	background: rgba(201, 162, 75, .1);
	font-family: var(--cam-font-body);
	font-size: 12.5px;
	font-weight: 600;
	color: var(--cam-aubergine);
}

/*
 * Two buttons of equal weight, stacked and full width on a phone. Equal
 * weight is the point: the visitor is choosing a language, not being steered
 * towards one — a French speaker must be able to take the Arabic form as
 * easily as the other way round.
 */
.cam-cc__actions {
	display: grid;
	gap: 10px;
	margin: 0 0 14px;
}

.cam-cc__btn {
	display: block;
	min-height: 52px;
	padding: 15px 18px;
	border-radius: var(--cam-r-btn);
	background: var(--cam-cta);
	color: var(--cam-cta-text) !important;
	box-shadow: var(--cam-shadow-cta);
	font-family: var(--cam-font-body);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none !important;
	transition: background .18s ease, transform .18s ease;
}

.cam-cc__btn:hover,
.cam-cc__btn:focus-visible {
	background: var(--cam-cta-hover);
	color: var(--cam-cta-text) !important;
	transform: translateY(-1px);
}

/* The Arabic label inside a French page keeps its own direction. */
.cam-cc__btn > span {
	display: inline-block;
	unicode-bidi: isolate;
}

.cam-cc__fine {
	margin: 0;
	font-family: var(--cam-font-body);
	font-size: 12.5px;
	line-height: 1.5;
	color: var(--cam-ink-soft);
}

@media (min-width: 560px) {
	.cam-cc__actions {
		grid-template-columns: 1fr 1fr;
	}
}

@media (min-width: 900px) {
	.cam-cc {
		padding: 48px 24px;
	}

	.cam-cc__inner {
		flex-direction: row;
		gap: 40px;
		align-items: center;
	}

	.cam-cc__img {
		width: 320px;
	}

	.cam-cc__body {
		text-align: start;
	}

	.cam-cc__perks {
		justify-content: flex-start;
	}

	.cam-cc__title {
		font-size: 32px;
	}

	.cam-cc__actions {
		max-width: 560px;
	}
}

@media (min-width: 1200px) {
	.cam-cc__img {
		width: 380px;
	}
}

/* --------------------------------------------------------- 3. The pop-up */

.cam-pop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.cam-pop[hidden] {
	display: none;
}

.cam-pop__scrim {
	position: absolute;
	inset: 0;
	background: rgba(42, 39, 36, .58);
	animation: cam-pop-fade .25s ease both;
}

.cam-pop__box {
	position: relative;
	width: 100%;
	max-width: 440px;
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	padding: 26px 20px 20px;
	border-radius: 20px;
	border: 1px solid var(--cam-card-border);
	background:
		radial-gradient(110% 70% at 50% 0%, rgba(201, 162, 75, .22) 0%, rgba(201, 162, 75, 0) 62%),
		var(--cam-cream);
	box-shadow: 0 24px 60px rgba(42, 39, 36, .34);
	text-align: center;
	animation: cam-pop-rise .28s cubic-bezier(.2, .7, .3, 1) both;
}

.cam-pop__box .cam-cc__img {
	width: 150px;
	margin-bottom: 14px;
}

.cam-pop__title {
	margin: 0 0 10px;
	font-family: var(--cam-font-display);
	font-size: 22px;
	line-height: 1.22;
	font-weight: 600;
	color: var(--cam-aubergine);
}

.cam-pop__box .cam-cc__text {
	font-size: 14.5px;
}

.cam-pop__box .cam-cc__actions {
	grid-template-columns: 1fr;
	margin-bottom: 12px;
}

/*
 * Both of these are <button>, and Woodmart claims every button on the site
 * with
 *
 *   :is(.btn, .button, button, [type="submit"], [type="button"]) { … }
 *
 * `:is()` is scored on its most specific argument, so that selector weighs
 * (0,1,0) — exactly what a single class weighs. At equal specificity the
 * later rule wins, and Woodmart's sits after ours in the combined stylesheet,
 * which is how the close button ended up `position: relative`, `inline-flex`
 * and wearing Woodmart's grey button background in the middle of the pop-up.
 *
 * Qualifying with the parent takes these to (0,2,0) and settles it on
 * specificity rather than on load order — no `!important`, and nothing that
 * breaks if LiteSpeed ever reorders the combined file.
 */
.cam-pop .cam-pop__x {
	position: absolute;
	top: 8px;
	inset-inline-end: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--cam-ink-soft);
	font-size: 26px;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
	transition: background .18s ease, color .18s ease;
}

.cam-pop .cam-pop__x:hover,
.cam-pop .cam-pop__x:focus-visible {
	background: rgba(78, 42, 68, .08);
	color: var(--cam-aubergine);
}

.cam-pop .cam-pop__no {
	position: static;
	display: block;
	width: 100%;
	min-height: 0;
	margin-top: 12px;
	padding: 8px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--cam-font-body);
	font-size: 13.5px;
	font-weight: 400;
	letter-spacing: normal;
	color: var(--cam-ink-soft);
	text-transform: none;
	text-decoration: underline;
	cursor: pointer;
}

.cam-pop .cam-pop__no:hover,
.cam-pop .cam-pop__no:focus-visible {
	background: transparent;
	color: var(--cam-aubergine);
}

@keyframes cam-pop-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes cam-pop-rise {
	from { opacity: 0; transform: translateY(14px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.cam-pop__scrim,
	.cam-pop__box {
		animation: none;
	}
}

/* ------------------------------------- 4. The rule, on cart and checkout */

.cam-rule {
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid var(--cam-card-border);
	border-inline-start: 4px solid var(--cam-gold);
	border-radius: var(--cam-r-btn);
	background: var(--cam-cream-light);
	font-family: var(--cam-font-body);
	font-size: 14px;
	line-height: 1.55;
	color: var(--cam-ink);
}

.cam-rule strong {
	color: var(--cam-aubergine);
	font-weight: 700;
}
