/* ---------------------------------------------------------------------------
   Cookie consent
   A small floating white card, not a full-width bar.
   Change the values below to re-skin everything.
   ------------------------------------------------------------------------ */

.olcc-root {
	--olcc-navy: #0e1f33;
	--olcc-navy-mid: #16304f;
	--olcc-body: #4a5c72;
	--olcc-line: #e2e8ef;
	--olcc-silver: #9fb2c6;

	--olcc-card: #ffffff;
	--olcc-radius: 14px;
	--olcc-font: "Assistant", "Heebo", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--olcc-display: "Frank Ruhl Libre", Georgia, serif;
	--olcc-lift: 0 18px 48px rgba(14, 31, 51, 0.18), 0 2px 8px rgba(14, 31, 51, 0.08);
}

.olcc-root[hidden] {
	display: none;
}

.olcc-root *,
.olcc-root *::before,
.olcc-root *::after {
	box-sizing: border-box;
}

/* --- Floating card -------------------------------------------------------- */

.olcc-banner {
	position: fixed;
	inset-inline-start: 22px;
	bottom: 22px;
	z-index: 2147483000;
	width: 380px;
	max-width: calc(100vw - 28px);
	background: var(--olcc-card);
	border: 1px solid var(--olcc-line);
	border-radius: var(--olcc-radius);
	box-shadow: var(--olcc-lift);
	font-family: var(--olcc-font);
	direction: rtl;
	overflow: hidden;
	animation: olcc-float-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.olcc-banner[hidden] {
	display: none;
}

@keyframes olcc-float-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.olcc-banner__inner {
	padding: 22px 22px 18px;
}

.olcc-banner__mark {
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #f1f5f9;
	color: var(--olcc-navy-mid);
}

.olcc-banner__mark svg {
	width: 19px;
	height: 19px;
}

.olcc-banner__title {
	margin: 0 0 8px;
	font-family: var(--olcc-display);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--olcc-navy);
}

.olcc-banner__body {
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--olcc-body);
}

.olcc-banner__body p {
	margin: 0 0 8px;
}

.olcc-banner__body p:last-child {
	margin-bottom: 0;
}

.olcc-banner__link a {
	color: var(--olcc-navy-mid);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(22, 48, 79, 0.35);
}

.olcc-banner__link a:hover {
	text-decoration-color: currentColor;
}

.olcc-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 18px;
}

/* --- Buttons -------------------------------------------------------------- */

.olcc-btn {
	font-family: var(--olcc-font);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	padding: 12px 14px;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
	white-space: nowrap;
}

/* Accept and reject keep the same footprint and weight. Consent has to be a
   free choice, so neither option is visually louder than the other. */
.olcc-btn--primary {
	background: var(--olcc-navy-mid);
	color: #fff;
}

.olcc-btn--primary:hover {
	background: var(--olcc-navy);
}

.olcc-btn--ghost {
	background: #fff;
	color: var(--olcc-navy);
	border-color: #d3dbe4;
}

.olcc-btn--ghost:hover {
	background: #f4f7fa;
	border-color: #b9c5d2;
}

.olcc-btn--quiet {
	grid-column: 1 / -1;
	background: transparent;
	color: #6d7f95;
	padding: 6px;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(109, 127, 149, 0.4);
}

.olcc-btn--quiet:hover {
	color: var(--olcc-navy);
}

.olcc-root :focus-visible {
	outline: 2px solid var(--olcc-navy-mid);
	outline-offset: 3px;
	border-radius: 4px;
}

/* --- Overlay and preferences panel ---------------------------------------- */

.olcc-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	background: rgba(9, 20, 35, 0.5);
	animation: olcc-fade 0.2s ease-out both;
}

.olcc-overlay[hidden] {
	display: none;
}

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

.olcc-panel {
	position: fixed;
	z-index: 2147483002;
	inset-inline-start: 50%;
	top: 50%;
	transform: translate(50%, -50%);
	width: min(520px, calc(100vw - 28px));
	max-height: min(84vh, 700px);
	display: flex;
	flex-direction: column;
	background: var(--olcc-card);
	border-radius: var(--olcc-radius);
	box-shadow: 0 24px 70px rgba(9, 20, 35, 0.38);
	font-family: var(--olcc-font);
	direction: rtl;
	overflow: hidden;
	animation: olcc-pop 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.olcc-panel[hidden] {
	display: none;
}

@keyframes olcc-pop {
	from {
		opacity: 0;
		transform: translate(50%, -48%) scale(0.98);
	}
	to {
		opacity: 1;
		transform: translate(50%, -50%) scale(1);
	}
}

.olcc-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px 15px;
	border-bottom: 1px solid var(--olcc-line);
}

.olcc-panel__title {
	margin: 0;
	font-family: var(--olcc-display);
	font-size: 21px;
	font-weight: 700;
	color: var(--olcc-navy);
}

.olcc-close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	display: grid;
	place-items: center;
	background: transparent;
	border: 0;
	border-radius: 50%;
	color: #7b8ca0;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.olcc-close:hover {
	background: #f1f5f9;
	color: var(--olcc-navy);
}

.olcc-close svg {
	width: 17px;
	height: 17px;
}

.olcc-panel__scroll {
	overflow-y: auto;
	padding: 18px 24px 4px;
}

.olcc-panel__intro {
	margin: 0 0 14px;
	font-size: 14.5px;
	line-height: 1.8;
	color: var(--olcc-body);
}

.olcc-cat {
	padding: 15px 0;
	border-bottom: 1px solid #f0f3f7;
}

.olcc-cat:last-of-type {
	border-bottom: 0;
}

.olcc-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 5px;
}

.olcc-cat__name {
	font-size: 16px;
	font-weight: 700;
	color: var(--olcc-navy);
}

label.olcc-cat__name {
	cursor: pointer;
}

.olcc-cat__locked {
	font-size: 12.5px;
	font-weight: 600;
	color: #7b8ca0;
	background: #f1f5f9;
	padding: 5px 11px;
	border-radius: 999px;
	white-space: nowrap;
}

.olcc-cat__desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: #5b6d82;
}

/* --- Switch --------------------------------------------------------------- */

.olcc-switch {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	cursor: pointer;
}

.olcc-switch input {
	position: absolute;
	opacity: 0;
	width: 42px;
	height: 23px;
	margin: 0;
	cursor: pointer;
}

.olcc-switch__track {
	position: relative;
	width: 42px;
	height: 23px;
	border-radius: 999px;
	background: #cdd6e0;
	transition: background-color 0.2s ease;
}

.olcc-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-end: 3px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(14, 31, 51, 0.28);
	transition: transform 0.2s ease;
}

.olcc-switch input:checked ~ .olcc-switch__track {
	background: var(--olcc-navy-mid);
}

.olcc-switch input:checked ~ .olcc-switch__track::after {
	transform: translateX(-19px);
}

.olcc-switch input:focus-visible ~ .olcc-switch__track {
	outline: 2px solid var(--olcc-navy-mid);
	outline-offset: 3px;
}

.olcc-switch__label {
	font-size: 13px;
	font-weight: 600;
	color: #7b8ca0;
	min-width: 30px;
}

.olcc-panel__note {
	margin: 12px 0 16px;
	font-size: 13px;
	line-height: 1.7;
	color: #8394a6;
}

.olcc-panel__foot {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	padding: 16px 24px;
	border-top: 1px solid var(--olcc-line);
	background: #f8fafc;
}

.olcc-panel__policy {
	margin-inline-start: auto;
	font-size: 13.5px;
	color: #6d7f95;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.olcc-panel__policy:hover {
	color: var(--olcc-navy);
}

/* --- Re-open button ------------------------------------------------------- */
/* Sits in the same corner as the card. The two are never visible together. */

.olcc-reopen {
	position: fixed;
	inset-inline-start: 22px;
	bottom: 22px;
	z-index: 2147482999;
	width: 42px;
	height: 42px;
	display: grid;
	place-items: center;
	padding: 0;
	background: #fff;
	color: var(--olcc-navy-mid);
	border: 1px solid var(--olcc-line);
	border-radius: 50%;
	box-shadow: 0 6px 20px rgba(14, 31, 51, 0.14);
	cursor: pointer;
	opacity: 0.7;
	transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.olcc-reopen[hidden] {
	display: none;
}

.olcc-reopen:hover,
.olcc-reopen:focus-visible {
	opacity: 1;
	transform: translateY(-2px);
	box-shadow: 0 10px 26px rgba(14, 31, 51, 0.2);
}

.olcc-reopen svg {
	width: 21px;
	height: 21px;
}

/* --- Mobile --------------------------------------------------------------- */

@media (max-width: 640px) {
	.olcc-banner {
		inset-inline: 12px;
		width: auto;
		max-width: none;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		border-radius: 16px;
	}

	.olcc-banner__inner {
		padding: 20px 18px 16px;
	}

	.olcc-banner__title {
		font-size: 18px;
	}

	.olcc-banner__body {
		font-size: 14px;
	}

	.olcc-panel {
		width: calc(100vw - 24px);
		max-height: 86vh;
	}

	.olcc-panel__head,
	.olcc-panel__scroll,
	.olcc-panel__foot {
		padding-inline: 18px;
	}

	.olcc-panel__foot .olcc-btn {
		flex: 1 1 calc(50% - 4px);
		text-align: center;
	}

	.olcc-panel__policy {
		flex: 1 1 100%;
		margin-inline-start: 0;
		text-align: center;
		padding-top: 4px;
	}

	.olcc-reopen {
		inset-inline-start: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		width: 40px;
		height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.olcc-banner,
	.olcc-overlay,
	.olcc-panel {
		animation: none;
	}

	.olcc-switch__track,
	.olcc-switch__track::after,
	.olcc-btn,
	.olcc-close,
	.olcc-reopen {
		transition: none;
	}
}

/* The site's accessibility toolbar can force high contrast. Keep our edges. */
@media (forced-colors: active) {
	.olcc-banner,
	.olcc-panel,
	.olcc-reopen {
		border: 1px solid CanvasText;
	}
}
