/*
Theme Name: Multicurrency Website
Theme URI: https://multicurrency.u2code.com/
Author: U2Code
Author URI: https://u2code.com/
Description: The product site for U2Code Product Multicurrency for WooCommerce. One landing page, guides, a user guide and a developer reference.
Version: 3.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPLv3
Text Domain: multicurrency-website
*/

/* The site is a sibling of tiered-pricing.com and product-addons.com: Inter, slate neutrals, a light
   hero with a dark headline, white cards with soft shadows, examples in a browser window. Only the
   colour is Multicurrency's own blue. The shared pieces (buttons, chips, cards, windows, bands) are
   component classes in src/tailwind.css; this file holds what utilities cannot say. */

:root {
	--ink: #0f172a;
	--blue: #1d63b8;
	--sky: #0e9fe4;
	--line: #e2e8f0;
	--muted: #475569;
	--tint: #f1f6fc;
	--soft: #e3edf9;
}

/* ── Backgrounds ────────────────────────────────────────────────────────────── */
/* The dotted canvas of the hero and the closing band, as on product-addons.com. */
.mcw-dot-grid {
	background-image: radial-gradient(rgba(148, 163, 184, .35) 1px, transparent 1px);
	background-size: 22px 22px;
}

/* The headline's accent: the brand blue running into a lighter blue. The light stop (#0c8fd6) keeps
   3.4:1 against the hero background, enough for a headline this large; the icon's own sky blue
   (#0e9fe4) would fall just under 3:1. */
.mcw-accent {
	background: linear-gradient(90deg, var(--blue), #0c8fd6, var(--blue));
	background-size: 200% auto;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
	.mcw-accent {
		animation: mcw-accent 5s linear infinite;
	}
}

@keyframes mcw-accent {
	to { background-position: 200% center; }
}

/* ── Reveal on scroll ─────────────────────────────────────────────────────────
   Content is visible by default. Only when the script is running (html.mcw-js) does a block wait
   below its place until it scrolls into view, so no-script visitors and print never see blanks. */
.mcw-js .reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s ease;
	transition-delay: var(--d, 0s);
}

.mcw-js .reveal.is-in {
	opacity: 1;
	transform: none;
}

/* A pause switch with nothing to pause is noise: no script, or reduced motion (the script hides it). */
html:not(.mcw-js) [data-mcw-pause],
[data-mcw-pause][hidden] {
	display: none;
}

/* ── Pressed states the examples switch ─────────────────────────────────────── */
.mcw-place {
	border: 1px solid transparent;
	border-radius: 10px;
	transition: background-color .15s ease, border-color .15s ease;
}

.mcw-place:hover {
	background: #f8fafc;
}

.mcw-place[aria-pressed="true"] {
	border-color: #bcd3ee;
	background: var(--tint);
}

.mcw-mode {
	border: 1px solid var(--line);
	border-radius: 14px;
	background: #fff;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.mcw-mode:hover {
	border-color: #94a3b8;
}

.mcw-mode[aria-pressed="true"] {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(29, 99, 184, .14);
}

/* A radio: the filled centre is the background clipped to the content box. */
.mcw-mode__dot {
	flex: none;
	width: 1.1rem;
	height: 1.1rem;
	padding: 3px;
	border: 2px solid #94a3b8;
	border-radius: 9999px;
	background: #fff;
	background-clip: content-box;
}

.mcw-mode[aria-pressed="true"] .mcw-mode__dot {
	border-color: var(--blue);
	background-color: var(--blue);
}

/* With the script running, the pricing cards show one billing cycle; without it, both. */
.mcw-js [data-mcw-billing="annual"] .mcw-lifetime,
.mcw-js [data-mcw-billing="lifetime"] .mcw-annual {
	display: none;
}

.mcw-chevron {
	transition: transform .2s ease;
}

details[open] .mcw-chevron {
	transform: rotate(45deg);
}

summary::-webkit-details-marker {
	display: none;
}

:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 2px;
}

footer :focus-visible {
	outline-color: #fff;
}

/* ── The price table of the Detection section (scene "board") ─────────────────
   The script writes a price as one span per character so only the changed ones turn. Here they
   read as ordinary figures. */
.mcw-board__row {
	transition: background-color .25s ease;
}

.mcw-board__row.is-visitor {
	background: var(--tint);
}

.mcw-board__row.is-visitor .mcw-flaps,
.mcw-board__row.is-visitor [data-mcw-board-code] {
	color: var(--blue);
}

.mcw-flaps {
	display: inline-flex;
	font-variant-numeric: tabular-nums;
}

.mcw-flap {
	display: inline-block;
	white-space: pre;
}

@keyframes mcw-flap {
	0% { transform: translateY(0); opacity: 1; }
	45% { transform: translateY(-35%); opacity: 0; }
	55% { transform: translateY(35%); opacity: 0; }
	100% { transform: translateY(0); opacity: 1; }
}

.mcw-flap.is-flip {
	animation: mcw-flap .3s ease-in-out both;
}

/* ── The storefront example ─────────────────────────────────────────────────── */
/* The pointer an example moves around its stage. */
.mcw-cursor {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 40;
	pointer-events: none;
	opacity: 0;
	transition: transform .75s cubic-bezier(.3, .7, .2, 1), opacity .3s ease;
}

.mcw-cursor.is-on {
	opacity: 1;
}

.mcw-cursor__click {
	position: absolute;
	left: -12px;
	top: -12px;
	width: 24px;
	height: 24px;
	border-radius: 9999px;
	background: rgba(29, 99, 184, .28);
	transform: scale(0);
	transition: transform .15s ease;
}

.mcw-cursor__click.is-on {
	transform: scale(1);
}

/* The open switcher. */
.mcw-pop {
	opacity: 0;
	transform: translateY(-4px) scale(.98);
	transform-origin: top right;
	pointer-events: none;
	transition: opacity .15s ease, transform .15s ease;
}

.mcw-pop.is-open {
	opacity: 1;
	transform: none;
}

.mcw-pop [data-mcw-option].is-on {
	background: var(--tint);
	color: var(--blue);
}

[data-mcw-switch].is-on {
	border-color: var(--blue);
	box-shadow: 0 0 0 3px rgba(29, 99, 184, .14);
}

.mcw-toast {
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity .3s ease, transform .3s ease;
}

.mcw-toast.is-in {
	opacity: 1;
	transform: none;
}

/* A price leaving upward and its replacement arriving from below. */
@keyframes mcw-price-out {
	to { transform: translateY(-110%); opacity: 0; }
}

@keyframes mcw-price-in {
	from { transform: translateY(110%); opacity: 0; }
}

.mcw-price-out { animation: mcw-price-out .16s ease-in forwards; }
.mcw-price-in { animation: mcw-price-in .24s ease-out; }

/* ── The price walkthrough, the rates table, the placement plan ─────────────── */
.mcw-step {
	transition: background-color .2s ease, box-shadow .2s ease;
}

.mcw-step.is-on {
	background: var(--tint);
	box-shadow: inset 0 3px 0 var(--blue);
}

.mcw-rate {
	border-radius: 6px;
	transition: background-color .5s ease, color .5s ease;
}

.mcw-rate.is-new {
	background: #dcfce7;
	color: #047857;
}

@keyframes mcw-spin {
	to { transform: rotate(360deg); }
}

.mcw-spin-target {
	display: inline-flex;
}

[data-mcw-update].is-on {
	border-color: var(--blue);
	background: var(--blue);
	color: #fff;
}

[data-mcw-update].is-on .mcw-spin-target {
	animation: mcw-spin .8s linear infinite;
}

.mcw-zone {
	border-radius: 4px;
	background: var(--line);
	transition: background-color .2s ease, box-shadow .2s ease;
}

.mcw-zone.is-on {
	background: var(--blue);
	box-shadow: 0 0 0 3px rgba(29, 99, 184, .2);
}

@media (prefers-reduced-motion: reduce) {
	.mcw-flap.is-flip,
	.mcw-price-in,
	.mcw-price-out {
		animation: none;
	}

	.mcw-js .reveal {
		opacity: 1;
		transform: none;
		transition: none;
	}

	html {
		scroll-behavior: auto !important;
	}
}

/* ── The hero headline ──────────────────────────────────────────────────────────
   From 640px up: two lines that never wrap, sized to the width of the column. --mcw-title-em is
   the width of the longer line ("One WooCommerce store.") in em, measured in Inter 700, plus 2%.
   On phones it is a fixed size and wraps where it must. */
.mcw-hero-copy {
	container-type: inline-size;
}

.mcw-hero-title {
	--mcw-title-em: 12.6;
	font-size: 2.25rem;
	line-height: 1.1;
	text-wrap: balance;
}

@media (min-width: 640px) {
	.mcw-hero-title {
		font-size: min(3.25rem, calc(100cqw / var(--mcw-title-em)));
		line-height: 1.08;
	}
}

html[lang^="de"] .mcw-hero-title { --mcw-title-em: 12.4; }
html[lang^="es"] .mcw-hero-title { --mcw-title-em: 13.1; }
html[lang^="fr"] .mcw-hero-title { --mcw-title-em: 14.35; }

/* ── Documentation and guides ───────────────────────────────────────────────── */
.mcw-prose {
	color: #334155;
	font-size: 1.0625rem;
	line-height: 1.75;
}

.mcw-prose p,
.mcw-prose ul,
.mcw-prose ol,
.mcw-prose pre,
.mcw-prose .mcw-table {
	margin-top: 1.1em;
}

.mcw-prose h2 {
	margin-top: 2.6em;
	padding-top: 1.4em;
	border-top: 1px solid var(--line);
	color: var(--ink);
	font-size: 1.75rem;
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.2;
	scroll-margin-top: 5.5rem;
}

.mcw-prose h3 {
	margin-top: 2em;
	color: var(--ink);
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -.01em;
	scroll-margin-top: 5.5rem;
}

.mcw-prose strong {
	color: var(--ink);
	font-weight: 600;
}

.mcw-prose a {
	color: var(--blue);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mcw-prose a:hover {
	color: #164f95;
}

.mcw-prose ul {
	padding-left: 1.2rem;
	list-style: disc;
}

.mcw-prose ul > li::marker {
	color: #94a3b8;
}

.mcw-prose ol {
	padding-left: 0;
	list-style: none;
	counter-reset: mcw-step;
}

.mcw-prose ol > li {
	position: relative;
	padding: .15em 0 .15em 2.6rem;
	counter-increment: mcw-step;
}

.mcw-prose ol > li::before {
	content: counter(mcw-step);
	position: absolute;
	left: 0;
	top: .25em;
	width: 1.75rem;
	height: 1.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background: var(--soft);
	color: var(--blue);
	font-size: .85rem;
	font-weight: 700;
}

.mcw-prose li + li {
	margin-top: .45em;
}

.mcw-prose code {
	padding: .12em .4em;
	border-radius: 6px;
	background: #f1f5f9;
	color: var(--ink);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .86em;
	word-break: break-word;
}

.mcw-prose pre {
	position: relative;
	padding: 1.1rem 1.25rem;
	border-radius: 14px;
	background: var(--ink);
	color: #e2e8f0;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .86rem;
	line-height: 1.65;
	overflow-x: auto;
}

.mcw-prose pre code {
	padding: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font-size: inherit;
	word-break: normal;
}

.mcw-prose .mcw-note {
	padding: .9rem 1.1rem;
	border-left: 3px solid var(--blue);
	border-radius: 0 10px 10px 0;
	background: var(--tint);
	color: #334155;
}

.mcw-prose .mcw-table {
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 14px;
}

.mcw-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: .95rem;
}

.mcw-prose th {
	padding: .7rem .9rem;
	background: #f8fafc;
	border-bottom: 1px solid var(--line);
	color: var(--ink);
	font-size: .85rem;
	font-weight: 600;
	text-align: left;
	white-space: nowrap;
}

.mcw-prose td {
	padding: .7rem .9rem;
	border-top: 1px solid #f1f5f9;
	vertical-align: top;
}

/* A hook name is one word: in the first column it stays whole, and the table scrolls if it must. */
.mcw-prose td:first-child code {
	white-space: nowrap;
	word-break: normal;
}

.mcw-shot {
	margin-top: 1.5em;
	padding: .5rem;
	border: 1px solid var(--line);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
}

.mcw-shot img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 38rem;
	border-radius: 10px;
	object-fit: contain;
	background: #fff;
}

.mcw-guide h3:first-child {
	margin-top: 0;
}

.mcw-lang summary::-webkit-details-marker {
	display: none;
}

.mcw-copy {
	position: absolute;
	top: .5rem;
	right: .5rem;
	padding: .3rem .6rem;
	border-radius: 7px;
	background: rgba(255, 255, 255, .12);
	color: #e2e8f0;
	font-family: Inter, ui-sans-serif, system-ui, sans-serif;
	font-size: .75rem;
	font-weight: 600;
}

.mcw-copy:hover {
	background: #fff;
	color: var(--ink);
}

.mcw-toc a {
	border-left: 2px solid transparent;
}

.mcw-toc a[aria-current="true"] {
	border-left-color: var(--blue);
	color: var(--blue);
	font-weight: 600;
}
