/**
 * Rivora Core: shared language for plugin blocks.
 * Editorial perfumery: flat gold only for the primary button, hairlines and focus;
 * text links with a drawn underline; tables instead of chips. Colours mostly inherit
 * (currentColor) so blocks sit on any fragrance colour field.
 */
:root {
	--rv-gold: var(--wp--preset--color--gold, #d9b25f);
	--rv-ink: var(--wp--preset--color--plum-ink, #1c0618);
	--rv-cream: var(--wp--preset--color--cream, #f3e9dc);
	--rv-plum: var(--wp--preset--color--plum, #641164);
	--rv-display: var(--wp--preset--font-family--display, "Cormorant Garamond", "Cormorant", Georgia, serif);
	--rv-sans: var(--wp--preset--font-family--sans, "Jost", "Segoe UI", system-ui, sans-serif);
	--rv-hair: color-mix(in srgb, var(--rv-gold) 42%, transparent);
	--rv-soft: color-mix(in srgb, currentColor 68%, transparent);
}

/* ---------- Buttons and links ---------- */
.rv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 48px;
	padding: .8em 1.6em;
	border: 0;
	border-radius: 2px;
	font-family: var(--rv-sans);
	font-size: .9375rem;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
	transition: background-color .2s ease, opacity .2s ease;
}
.rv-btn--gold {
	background: var(--rv-gold);
	color: var(--rv-ink);
}
.rv-btn--gold:hover,
.rv-btn--gold:focus-visible { background: #e6c57e; color: var(--rv-ink); }

/* Secondary: a text link with a drawn underline (transform only). */
.rv-link,
.rv-btn--line,
.rv-btn--link {
	position: relative;
	display: inline;
	min-height: 0;
	padding: 0 0 2px;
	background: none;
	border: 0;
	border-radius: 0;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
	text-decoration-thickness: 1px;
	text-underline-offset: .28em;
	cursor: pointer;
}
.rv-btn--line,
.rv-btn--link {
	display: inline-block;
	font-family: var(--rv-sans);
	font-size: .9375rem;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
}
.rv-btn--line::after,
.rv-btn--link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 1px;
	background: currentColor;
	transform-origin: left center;
	transform: scaleX(.35);
	opacity: .6;
	transition: transform .35s cubic-bezier(.2, .7, .2, 1), opacity .35s ease;
}
.rv-btn--line:hover::after,
.rv-btn--link:hover::after,
.rv-btn--line:focus-visible::after,
.rv-btn--link:focus-visible::after { transform: scaleX(1); opacity: 1; }
.rv-link:hover { text-decoration-color: currentColor; }

.rv-btn:focus-visible,
.rv-link:focus-visible {
	outline: 2px solid var(--rv-gold);
	outline-offset: 3px;
}
.rv-btn.is-loading { opacity: .7; cursor: progress; }
.rv-btn.is-added::after { content: none; }

/* ---------- Audience: plain small label, no pill ---------- */
.rv-badge {
	display: inline;
	font-family: var(--rv-sans);
	font-size: .8125rem;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}
.rv-audience { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25em .75em; font-family: var(--rv-sans); font-size: .8125rem; }
.rv-audience.aligncenter { justify-content: center; }
.rv-audience.alignright { justify-content: flex-end; }
.rv-audience__family { font-weight: 400; color: var(--rv-soft); }

/* ---------- Formula table (notes → graha → day) ---------- */
.rv-formula {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-family: var(--rv-sans);
	font-size: .9375rem;
	line-height: 1.4;
	color: inherit;
}
.rv-formula th,
.rv-formula td {
	padding: .8em 1.25em .8em 0;
	border: 0;
	border-top: 1px solid var(--rv-hair);
	text-align: left;
	vertical-align: baseline;
	background: none;
}
.rv-formula th:last-child,
.rv-formula td:last-child { padding-right: 0; }
.rv-formula tbody tr:last-child > * { border-bottom: 1px solid var(--rv-hair); }
.rv-formula thead th {
	padding-block: 0 .6em;
	border-top: 0;
	font-size: .8125rem;
	font-weight: 500;
	color: var(--rv-soft);
}
.rv-formula__notes {
	width: 52%;
	font-family: var(--rv-display);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.2;
}
.rv-formula__notes::first-letter { text-transform: uppercase; }
.rv-formula__graha { font-weight: 500; }
.rv-formula__en { font-weight: 400; color: var(--rv-soft); }
.rv-formula__meaning { display: block; font-weight: 300; color: var(--rv-soft); font-size: .875rem; }
.rv-formula__day { white-space: nowrap; color: var(--rv-soft); }
@media (max-width: 480px) {
	.rv-formula__notes { width: auto; font-size: 1.15rem; }
	.rv-formula__en { display: block; }
}

.rv-weekdays {
	margin: 1.25em 0 0;
	font-family: var(--rv-sans);
	font-size: 1rem;
	font-weight: 400;
}
.rv-planet-notes__family { margin: 0 0 1em; font-family: var(--rv-sans); font-size: .8125rem; font-weight: 500; color: var(--rv-soft); }
.rv-planet-notes.has-text-color .rv-formula { color: inherit; }

/* ---------- Bottle illustration (fallback when a product has no photo) ---------- */
.rv-bottle {
	--rv-c1: #8a2a87;
	--rv-c2: #3d0a3f;
	position: relative;
	display: block;
	box-sizing: content-box;
	font-size: 10px;
	width: 11.8em;
	height: 19em;
	margin: 6em auto 0;
	flex: none;
}
.rv-bottle--small { font-size: 6px; }
.rv-bottle--medium { font-size: 10px; }
.rv-bottle--large { font-size: 13px; }
.rv-bottle > span { display: block; position: absolute; }
.rv-bottle__cap {
	left: 50%;
	top: -5.8em;
	transform: translateX(-50%);
	width: 5.4em;
	height: 5.6em;
	border-radius: .3em;
	background: #c9a35a;
}
.rv-bottle__neck {
	left: 50%;
	top: -.8em;
	transform: translateX(-50%);
	width: 3em;
	height: 1.2em;
	background: #a8853f;
}
.rv-bottle__glass {
	inset: 0;
	border-radius: 1.2em;
	background: linear-gradient(180deg, var(--rv-c1), var(--rv-c2));
}
.rv-bottle__label {
	left: 1.4em;
	right: 1.4em;
	top: 6.2em;
	padding: 1em .4em;
	border-top: 1px solid rgba(243, 233, 220, .55);
	border-bottom: 1px solid rgba(243, 233, 220, .55);
	text-align: center;
	font-family: var(--rv-display);
	font-size: 1.7em;
	line-height: 1.1;
	color: #f3e9dc;
	overflow-wrap: anywhere;
}
.rv-bottle__label small {
	display: block;
	margin-top: .3em;
	font-family: var(--rv-sans);
	font-size: .42em;
	font-weight: 500;
	opacity: .8;
}
.rv-bottle-fallback {
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 5;
	width: 100%;
	padding-bottom: 1.5em;
}
.rv-bottle-fallback--gallery { min-height: 420px; }
.rv-bottle-block { display: grid; place-items: center; padding-block: 1.5em 2.5em; }
.rv-bottle-block.alignleft { justify-items: start; }
.rv-bottle-block.alignright { justify-items: end; }
.rv-bottle-block .rv-bottle { margin-inline: 0; }

/* ---------- Editor-only notice ---------- */
.rv-editor-notice {
	padding: 20px 24px;
	border: 1px dashed var(--rv-hair);
	background: var(--rv-ink);
	color: var(--rv-cream);
	font-family: var(--rv-sans);
	font-size: 14px;
}
.rv-editor-notice__mark { display: none; }

.rv-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Editor previews (ServerSideRender) are not interactive. */
.rv-editor-ssr a,
.rv-editor-ssr button,
.rv-editor-ssr input { pointer-events: none; }
.rv-editor-ssr .components-placeholder { min-height: 160px; }

/* Add-to-bag status line */
.rv-cart-status { margin: .75em 0 0; font-family: var(--rv-sans); font-size: .875rem; }
.rv-cart-status a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Disclaimer shortcode */
.rv-disclaimer { font-family: var(--rv-sans); font-size: .8125rem; line-height: 1.5; max-width: 62ch; color: var(--rv-soft); }

/* ---------- Newsletter form ([rivora_newsletter]) ---------- */
.rv-newsletter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px 16px;
	max-width: 560px;
	font-family: var(--rv-sans);
}
.rv-newsletter__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.rv-newsletter__input {
	flex: 1 1 240px;
	min-width: 0;
	min-height: 48px;
	padding: 10px 0;
	border: 0;
	border-bottom: 1px solid var(--rv-hair);
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1rem;
}
.rv-newsletter__input::placeholder { color: inherit; opacity: .6; }
.rv-newsletter__input:focus-visible { outline: 2px solid var(--rv-gold); outline-offset: 4px; }
.rv-newsletter__button {
	flex: 0 0 auto;
	min-height: 48px;
	padding: .8em 1.6em;
	border: 0;
	border-radius: 2px;
	background: var(--rv-gold);
	color: var(--rv-ink);
	font: inherit;
	font-size: .9375rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color .2s ease;
}
.rv-newsletter__button:hover { background: #e6c57e; }
.rv-newsletter__button:focus-visible { outline: 2px solid var(--rv-gold); outline-offset: 3px; }
.rv-newsletter__msg { flex-basis: 100%; margin: 4px 0 0; font-size: .875rem; }
.rv-newsletter__msg.is-error { color: #f3a6ae; }

@media (prefers-reduced-motion: reduce) {
	.rv-btn, .rv-btn--line::after, .rv-btn--link::after, .rv-newsletter__button { transition: none; }
}

/* ---------- Graha glyphs (gold line illustrations from assets/svg/grahas.svg) ---------- */
.rv-glyph {
	display: inline-block;
	flex: none;
	width: 1.5em;
	height: 1.5em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.4;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: middle;
	overflow: visible;
}
.rv-mehrab { overflow: visible; }

/* Product photos (not cut-outs) are framed in a temple arch (mehrab). */
.rv-align__img.is-photo,
.rv-almanac__img.is-photo {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M3 140V52C3 30 22 16 38 10 45 7.5 48.5 4.5 50 1c1.5 3.5 5 6.5 12 9 16 6 35 20 35 42v88z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M3 140V52C3 30 22 16 38 10 45 7.5 48.5 4.5 50 1c1.5 3.5 5 6.5 12 9 16 6 35 20 35 42v88z'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}
.rv-align__fig:has(.is-photo) .rv-align__arch,
.rv-almanac__fig:has(.is-photo:not([hidden])) .rv-almanac__arch { z-index: 2; fill: none; }
