/**
 * RSI Toolkit — cookie consent banner + Cookie Settings panel.
 *
 * Banner: a dark card in the bottom reading-start corner (left in English,
 * right in Arabic) so it never sits on the theme's scroll-to-top button.
 * Logical properties throughout, so no rtl.css entry is needed.
 */

.rsi-consent {
	position: fixed;
	z-index: 100000;
	inset-block-end: 24px;
	inset-inline-start: 24px;
	box-sizing: border-box;
	width: min(440px, calc(100vw - 48px));
	padding: 24px;
	border-radius: 8px;
	background: #0a0a0a;
	color: #fff;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
	font-family: 'Alexandria', sans-serif;
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .3s ease, transform .4s cubic-bezier(.16, 1, .3, 1);
}

.rsi-consent[hidden] {
	display: none;
}

.rsi-consent.is-open {
	opacity: 1;
	transform: none;
}

.rsi-consent__text {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 24px;
	color: rgba(255, 255, 255, .86);
}

.rsi-consent__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 12px;
}

/* Own classes + resets: the theme styles links and buttons by tag. */
.rsi-consent__btn,
.rsi-consent__btn:hover,
.rsi-consent__btn:focus {
	text-decoration: none !important;
}

.rsi-consent__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 24px;
	border-radius: 999px;
	font-family: 'Alexandria', sans-serif;
	font-weight: 600;
	font-size: 15px;
	letter-spacing: .3px;
	line-height: 1;
	cursor: pointer;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.rsi-consent__btn--solid {
	background: #bf0031;
	border: 1px solid #bf0031;
	color: #fff !important;
}

.rsi-consent__btn--ghost {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .5);
	color: #fff !important;
}

@media (hover: hover) {
	.rsi-consent__btn--solid:hover {
		background: #a3002a;
		border-color: #a3002a;
	}
	.rsi-consent__btn--ghost:hover {
		border-color: #fff;
	}
}

.rsi-consent__btn:focus-visible,
.rsi-consent__link:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.rsi-consent__link {
	margin-inline-start: 4px;
	font-size: 14px;
	color: rgba(255, 255, 255, .86) !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

@media (max-width: 767px) {
	.rsi-consent {
		inset-block-end: 12px;
		inset-inline-start: 12px;
		width: calc(100vw - 24px);
		padding: 20px;
	}
	.rsi-consent__btn {
		flex: 1 1 0;
	}
	.rsi-consent__link {
		flex-basis: 100%;
		margin: 4px 0 0;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rsi-consent {
		transition: none;
	}
}

/* ---------------------------- settings panel ---------------------------- */

.rsi-cprefs {
	margin: 0 0 56px;
	padding: 28px 32px;
	border: 1px solid #e6e6e8;
	border-radius: 8px;
	background: #f7f7f8;
	font-family: 'Alexandria', sans-serif;
}

.rsi-cprefs__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.rsi-cprefs__title {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 30px;
	font-weight: 700;
	color: #0a0a0a;
}

.rsi-cprefs__text,
.rsi-cprefs__note {
	margin: 0;
	font-size: 16px;
	line-height: 26px;
	color: #3d3d3d;
}

.rsi-cprefs__note {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #e6e6e8;
	font-size: 15px;
	color: #6b6b6b;
}

.rsi-cprefs__ctrl {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	flex: none;
}

.rsi-cprefs__state {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #6b6b6b;
}

.rsi-cprefs__state::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #b5b5b8;
}

.rsi-cprefs.is-on .rsi-cprefs__state {
	color: #0a7a3a;
}

.rsi-cprefs.is-on .rsi-cprefs__state::before {
	background: #12a150;
}

/* When on, the toggle becomes the quieter "Turn off". */
.rsi-cprefs.is-on .rsi-consent__btn--solid {
	background: transparent;
	color: #0a0a0a !important;
	border-color: #0a0a0a;
}

.rsi-cprefs .rsi-consent__btn:focus-visible {
	outline-color: #bf0031;
}

.rsi-cprefs__saved {
	margin: 12px 0 0;
	min-height: 0;
	font-size: 14px;
	color: #0a7a3a;
}

.rsi-cprefs__saved:empty {
	display: none;
}

@media (max-width: 767px) {
	.rsi-cprefs {
		padding: 22px 20px;
	}
	.rsi-cprefs__row {
		flex-direction: column;
		align-items: stretch;
	}
	.rsi-cprefs__ctrl {
		flex-direction: row;
		justify-content: space-between;
	}
}
