/**
 * Cookie consent — RANSOR house style.
 *
 * Uses the theme's existing tokens so this reads as part of the shop rather than
 * a bolted-on plugin: the same cosmic panel, the same gold, the same buttons.
 * Logical properties throughout (inline-start/end) so RTL needs no overrides.
 */

.ransor-consent[hidden] { display: none; }
.ransor-consent .rc-banner { display: none; }
.ransor-consent.is-open:not(.is-answered) .rc-banner { display: block; }

/* ------------------------------------------------------------------ banner */

.rc-banner {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 9500;
	background: rgba(8, 9, 14, .96);
	border-top: 1px solid rgba(var(--gold-rgb),.34);
	box-shadow: 0 -18px 48px rgba(0, 0, 0, .55);
	backdrop-filter: blur(9px);
	-webkit-backdrop-filter: blur(9px);
	padding: 18px clamp(14px, 4vw, 40px) calc(18px + env(safe-area-inset-bottom));
	animation: rc-rise .34s cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes rc-rise { from { transform: translateY(14px); opacity: 0; } }

.rc-inner {
	max-width: 1200px;
	margin-inline: auto;
	display: flex;
	gap: clamp(14px, 3vw, 34px);
	align-items: center;
	flex-wrap: wrap;
}

.rc-text { flex: 1 1 420px; min-width: 0; }

.rc-title {
	font-family: var(--disp, inherit);
	text-transform: uppercase;
	letter-spacing: .02em;
	font-size: 1rem;
	margin: 0 0 6px;
	color: #f4efe2;
}

.rc-body {
	margin: 0;
	font-size: .875rem;
	line-height: 1.65;
	color: #b9b6ae;
	max-width: 78ch;
}

.rc-body a { color: var(--gold-bright); text-underline-offset: 3px; }

.rc-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.rc-link {
	background: none;
	border: 0;
	padding: 8px 4px;
	color: #cfcabd;
	font: inherit;
	font-size: .85rem;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.rc-link:hover { color: var(--gold-bright); }

/* ------------------------------------------------------------------- modal */

.rc-modal {
	position: fixed;
	inset: 0;
	z-index: 9600;
	display: grid;
	place-items: center;
	padding: clamp(12px, 4vw, 40px);
	background: rgba(4, 5, 9, .74);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.rc-modal[hidden] { display: none; }

.rc-modal-card {
	position: relative;
	width: min(640px, 100%);
	max-height: min(84vh, 760px);
	overflow-y: auto;
	background: linear-gradient(180deg, #14151d, #0b0c12);
	border: 1px solid rgba(var(--gold-rgb),.3);
	border-radius: 14px;
	padding: clamp(20px, 3.4vw, 34px);
	box-shadow: 0 26px 80px rgba(0, 0, 0, .7);
}

.rc-modal-card .rc-title { font-size: 1.15rem; margin-bottom: 16px; }

.rc-cats { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; }

.rc-cat {
	border: 1px solid rgba(255, 255, 255, .09);
	border-radius: 10px;
	padding: 14px 16px;
	background: rgba(255, 255, 255, .022);
}

.rc-cat-head {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-weight: 600;
	color: #f0ece0;
}

.rc-cat-head[aria-disabled="true"] { cursor: default; }

.rc-cat-head input {
	inline-size: 17px;
	block-size: 17px;
	accent-color: var(--gold-deep, #b8912f);
	flex: none;
}

.rc-cat-label { font-size: .95rem; }

.rc-always {
	margin-inline-start: auto;
	font-size: .7rem;
	text-transform: uppercase;
	letter-spacing: .07em;
	color: #8d8a82;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 999px;
	padding: 2px 9px;
}

.rc-cat-body {
	margin: 8px 0 0;
	font-size: .82rem;
	line-height: 1.62;
	color: #a9a69e;
}

.rc-close {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 12px;
	background: none;
	border: 0;
	color: #8d8a82;
	font-size: 1.6rem;
	line-height: 1;
	padding: 4px 8px;
	cursor: pointer;
	border-radius: 6px;
}

.rc-close:hover { color: #fff; }

/* footer / anywhere re-open control.
   It sits inside .foot-legal between uppercase HUD links (Privacy, Terms, …),
   so it wears exactly their type treatment — a mixed-case "Cookie preferences"
   read as a stray among its siblings. Mirrors .foot-legal a in theme.css. */
.rc-reopen {
	background: none;
	border: 0;
	padding: 0;
	font-family: var(--hud, inherit);
	font-size: .66rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--muted-2, inherit);
	cursor: pointer;
	text-align: start;
}

.rc-reopen:hover { color: var(--gold, #d0b36f); }

html.rc-locked { overflow: hidden; }

/* keyboard focus must stay obvious against the dark panel */
.ransor-consent :focus-visible,
.rc-reopen:focus-visible {
	outline: 2px solid var(--gold-bright);
	outline-offset: 2px;
	border-radius: 4px;
}

@media (max-width: 640px) {
	.rc-actions { width: 100%; }
	.rc-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.rc-banner { animation: none; }
}
