/**
 * WALLS Consent — עיצוב הבאנר
 * שפה עיצובית: מינימליזם חם, בז' טבעי, שחור רך, פינות מעוגלות.
 */

.walls-consent-root {
	--walls-bg: #ffffff;
	--walls-surface: #f7f5f2;
	--walls-accent: #e7e2dc;
	--walls-text: #1c1b19;
	--walls-muted: #6b6863;
	--walls-btn-bg: #1c1b19;
	--walls-btn-text: #ffffff;
	--walls-radius: 18px;
	--walls-font: "Assistant", "Heebo", system-ui, sans-serif;
	--walls-reopen-offset: 96px;

	--walls-shadow: 0 2px 6px rgba(28, 27, 25, 0.04), 0 18px 48px -12px rgba(28, 27, 25, 0.18);
	--walls-ease: cubic-bezier(0.22, 1, 0.36, 1);

	position: fixed;
	inset: 0;
	z-index: 999990;
	pointer-events: none;
	font-family: var(--walls-font);
	direction: rtl;
	-webkit-font-smoothing: antialiased;
}

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

.walls-consent-root:not(.walls-rtl) {
	direction: ltr;
}

.walls-consent-root * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ שכבת רקע */

.walls-overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 27, 25, 0.42);
	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.4s var(--walls-ease);
	pointer-events: none;
}

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

.walls-consent-root.is-overlay .walls-overlay {
	opacity: 1;
	pointer-events: auto;
}

/* ------------------------------------------------------------------ הכרטיס */

.walls-card {
	position: absolute;
	bottom: 24px;
	right: 24px;
	left: auto;
	width: min(430px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--walls-bg);
	color: var(--walls-text);
	border: 1px solid var(--walls-accent);
	border-radius: var(--walls-radius);
	box-shadow: var(--walls-shadow);
	pointer-events: auto;
	overflow: hidden;
	opacity: 0;
	transform: translateY(18px) scale(0.985);
	transition: opacity 0.5s var(--walls-ease), transform 0.5s var(--walls-ease);
}

.walls-card[hidden] {
	display: none;
}

.walls-consent-root.is-visible .walls-card {
	opacity: 1;
	transform: none;
}

.walls-consent-root[data-position="bottom-left"] .walls-card {
	right: auto;
	left: 24px;
}

.walls-consent-root[data-position="bottom-bar"] .walls-card {
	right: 24px;
	left: 24px;
	width: auto;
	max-width: 1180px;
	margin-inline: auto;
}

.walls-consent-root[data-position="center"] .walls-card {
	bottom: auto;
	right: 0;
	left: 0;
	top: 50%;
	margin-inline: auto;
	transform: translateY(calc(-50% + 18px)) scale(0.985);
}

.walls-consent-root[data-position="center"].is-visible .walls-card {
	transform: translateY(-50%);
}

/* ------------------------------------------------------------------ תוכן */

.walls-view {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1 1 auto;
}

.walls-card__body {
	padding: 26px 26px 4px;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.walls-card__head,
.walls-card__actions {
	flex: 0 0 auto;
}

.walls-card__body--scroll {
	padding-block-end: 8px;
}

.walls-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--walls-surface);
	border: 1px solid var(--walls-accent);
	color: var(--walls-text);
	margin-block-end: 16px;
}

.walls-mark svg {
	width: 21px;
	height: 21px;
}

.walls-title {
	margin: 0 0 10px;
	font-family: var(--walls-font);
	font-size: 21px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--walls-text);
}

.walls-title--sm {
	font-size: 18px;
	margin: 0;
}

.walls-text,
.walls-text p {
	margin: 0 0 10px;
	font-size: 14.5px;
	line-height: 1.75;
	color: var(--walls-muted);
	font-weight: 400;
}

.walls-text p:last-child {
	margin-bottom: 0;
}

.walls-text--sm,
.walls-text--sm p {
	font-size: 13.5px;
	line-height: 1.7;
}

.walls-links {
	margin: 14px 0 0;
	font-size: 13px;
	line-height: 1.6;
}

.walls-links a {
	color: var(--walls-text);
	text-decoration: none;
	border-block-end: 1px solid var(--walls-accent);
	padding-block-end: 1px;
	transition: border-color 0.2s ease;
}

.walls-links a:hover,
.walls-links a:focus-visible {
	border-block-end-color: var(--walls-text);
}

.walls-sep {
	color: var(--walls-muted);
	margin-inline: 6px;
}

/* ------------------------------------------------------------------ כפתורים */

.walls-card__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 18px 26px 22px;
}

.walls-btn {
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--walls-font);
	font-size: 14.5px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.005em;
	padding: 14px 18px;
	border-radius: calc(var(--walls-radius) - 8px);
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.12s ease;
	text-align: center;
	min-height: 46px;
}

.walls-btn:active {
	transform: translateY(1px);
}

.walls-btn--primary {
	background: var(--walls-btn-bg);
	color: var(--walls-btn-text);
}

.walls-btn--primary:hover,
.walls-btn--primary:focus-visible {
	background: var(--walls-btn-bg-hover, #35332f);
}

/* דחייה חייבת להיות באותה בולטות כמו אישור — דרישת GDPR */
.walls-btn--ghost {
	background: var(--walls-bg);
	color: var(--walls-text);
	border-color: var(--walls-accent);
}

.walls-btn--ghost:hover,
.walls-btn--ghost:focus-visible {
	background: var(--walls-surface);
	border-color: var(--walls-text);
}

.walls-btn--link {
	grid-column: 1 / -1;
	background: transparent;
	color: var(--walls-muted);
	font-weight: 500;
	font-size: 13.5px;
	min-height: 0;
	padding: 4px 0 2px;
	text-decoration: underline;
	text-underline-offset: 4px;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--walls-accent);
}

.walls-btn--link:hover,
.walls-btn--link:focus-visible {
	color: var(--walls-text);
	text-decoration-color: currentColor;
}

.walls-card__actions--prefs {
	border-block-start: 1px solid var(--walls-accent);
	background: var(--walls-bg);
}

/* ------------------------------------------------------------------ מסך העדפות */

.walls-view[hidden] {
	display: none;
}

.walls-card__head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 26px;
	border-block-end: 1px solid var(--walls-accent);
	background: var(--walls-bg);
}

.walls-back {
	appearance: none;
	-webkit-appearance: none;
	background: var(--walls-surface);
	border: 1px solid var(--walls-accent);
	border-radius: 999px;
	padding: 7px 14px 7px 12px;
	font-family: var(--walls-font);
	font-size: 13px;
	font-weight: 500;
	color: var(--walls-muted);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	transition: color 0.2s ease, border-color 0.2s ease;
	flex-shrink: 0;
}

.walls-back:hover,
.walls-back:focus-visible {
	color: var(--walls-text);
	border-color: var(--walls-text);
}

/* חץ "חזרה" — פונה ימינה ב-RTL, שמאלה ב-LTR */
.walls-back__arrow {
	width: 6px;
	height: 6px;
	border-bottom: 1.5px solid currentColor;
	border-right: 1.5px solid currentColor;
	transform: rotate(-45deg);
	display: block;
}

.walls-consent-root:not(.walls-rtl) .walls-back__arrow {
	transform: rotate(135deg);
}

.walls-cats {
	margin-block-start: 16px;
	border-block-start: 1px solid var(--walls-accent);
}

.walls-cat {
	border-block-end: 1px solid var(--walls-accent);
}

.walls-cat:last-child {
	border-block-end: 0;
}

.walls-cat__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-block: 13px;
}

.walls-cat__toggle {
	appearance: none;
	-webkit-appearance: none;
	background: none;
	border: 0;
	padding: 2px 0;
	margin: 0;
	font-family: var(--walls-font);
	font-size: 14.5px;
	font-weight: 600;
	color: var(--walls-text);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	text-align: start;
	flex: 1;
	min-width: 0;
}

/* חץ קטגוריה — כלפי מטה כשסגור, כלפי מעלה כשפתוח (זהה ב-RTL וב-LTR) */
.walls-cat__chev {
	width: 6px;
	height: 6px;
	border-bottom: 1.5px solid var(--walls-muted);
	border-right: 1.5px solid var(--walls-muted);
	transform: rotate(45deg);
	transition: transform 0.25s var(--walls-ease);
	flex-shrink: 0;
	margin-block-start: -4px;
}

.walls-cat__toggle[aria-expanded="true"] .walls-cat__chev {
	transform: rotate(-135deg);
	margin-block-start: 2px;
}

.walls-cat__desc,
.walls-cat__desc p {
	font-size: 13px;
	line-height: 1.7;
	color: var(--walls-muted);
	margin: 0;
}

.walls-cat__desc {
	padding: 0 15px 15px;
	margin-block-start: -2px;
}

.walls-cat__desc[hidden] {
	display: none;
}

.walls-pill {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--walls-muted);
	background: var(--walls-surface);
	border: 1px solid var(--walls-accent);
	border-radius: 999px;
	padding: 5px 11px;
	white-space: nowrap;
	flex-shrink: 0;
}

/* ------------------------------------------------------------------ מתג */

.walls-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	cursor: pointer;
}

.walls-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
	z-index: 1;
}

.walls-switch__track {
	display: block;
	width: 46px;
	height: 27px;
	border-radius: 999px;
	background: var(--walls-surface);
	border: 1px solid var(--walls-accent);
	transition: background-color 0.28s var(--walls-ease), border-color 0.28s var(--walls-ease);
	position: relative;
}

.walls-switch__thumb {
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(28, 27, 25, 0.22);
	transition: transform 0.28s var(--walls-ease);
}

.walls-switch input:checked + .walls-switch__track {
	background: var(--walls-btn-bg);
	border-color: var(--walls-btn-bg);
}

.walls-switch input:checked + .walls-switch__track .walls-switch__thumb {
	transform: translateX(-19px);
}

.walls-consent-root:not(.walls-rtl) .walls-switch input:checked + .walls-switch__track .walls-switch__thumb {
	transform: translateX(19px);
}

.walls-switch input:focus-visible + .walls-switch__track {
	outline: 2px solid var(--walls-text);
	outline-offset: 3px;
}

/* ------------------------------------------------------------------ כפתור פתיחה מחדש */

.walls-reopen {
	position: absolute;
	bottom: var(--walls-reopen-offset);
	left: 20px;
	right: auto;
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	gap: 0;
	background: var(--walls-bg);
	color: var(--walls-text);
	border: 1px solid var(--walls-accent);
	border-radius: 999px;
	padding: 0;
	width: 42px;
	height: 42px;
	justify-content: center;
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 4px 16px rgba(28, 27, 25, 0.1);
	transition: width 0.35s var(--walls-ease), gap 0.35s var(--walls-ease), padding 0.35s var(--walls-ease), border-color 0.2s ease, opacity 0.3s ease;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0.85;
}

.walls-consent-root[data-reopen-pos="bottom-right"] .walls-reopen {
	left: auto;
	right: 20px;
}

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

.walls-reopen svg {
	width: 19px;
	height: 19px;
	flex-shrink: 0;
}

.walls-reopen__text {
	font-family: var(--walls-font);
	font-size: 13px;
	font-weight: 600;
	max-width: 0;
	opacity: 0;
	transition: max-width 0.35s var(--walls-ease), opacity 0.25s ease;
	overflow: hidden;
}

.walls-reopen:hover,
.walls-reopen:focus-visible {
	width: auto;
	gap: 8px;
	padding-inline: 14px;
	border-color: var(--walls-text);
	opacity: 1;
}

.walls-reopen:hover .walls-reopen__text,
.walls-reopen:focus-visible .walls-reopen__text {
	max-width: 180px;
	opacity: 1;
}

/* ------------------------------------------------------------------ מיקוד ונגישות */

.walls-consent-root *:focus-visible {
	outline: 2px solid var(--walls-text);
	outline-offset: 3px;
	border-radius: 4px;
}

/* מיכל הדיאלוג מקבל מיקוד תכנותי — בלי טבעת מיקוד גלויה */
.walls-consent-root .walls-card:focus,
.walls-consent-root .walls-card:focus-visible {
	outline: none;
}

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

/* ------------------------------------------------------------------ רספונסיבי */

@media (max-width: 600px) {
	.walls-card {
		right: 12px !important;
		left: 12px !important;
		bottom: 12px;
		top: auto;
		width: auto;
		max-height: calc(100vh - 24px);
		max-height: calc(100dvh - 24px);
	}

	.walls-consent-root[data-position="center"] .walls-card {
		top: auto;
		bottom: 12px;
		transform: translateY(18px) scale(0.985);
	}

	.walls-consent-root[data-position="center"].is-visible .walls-card {
		transform: none;
	}

	.walls-card__body {
		padding: 22px 20px 4px;
	}

	.walls-card__head {
		padding: 16px 20px;
	}

	.walls-card__actions {
		padding: 16px 20px 20px;
		grid-template-columns: 1fr;
	}

	.walls-btn {
		width: 100%;
	}

	.walls-title {
		font-size: 19px;
	}

	.walls-reopen {
		bottom: calc(var(--walls-reopen-offset) - 12px);
	}
}

/* ------------------------------------------------------------------ העדפות משתמש */

@media (prefers-reduced-motion: reduce) {
	.walls-consent-root *,
	.walls-consent-root *::before,
	.walls-consent-root *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.walls-card {
		transform: none !important;
	}
}

@media (prefers-contrast: more) {
	.walls-card {
		border-width: 2px;
		border-color: var(--walls-text);
	}

	.walls-text,
	.walls-cat__desc {
		color: var(--walls-text);
	}
}

@media print {
	.walls-consent-root {
		display: none !important;
	}
}

/* ==================================================================
   שריון מול עיצובי התבנית
   תבניות רבות (וגם התבנית של האתר הזה) מגדירות button:hover גלובלי
   שמכריח צבע טקסט לבן ורקע כהה. הבלוק הזה מבודד את רכיבי הבאנר
   מכל כלל חיצוני כזה, בכל המצבים: hover, focus, active, visited.
   ================================================================== */

.walls-consent-root button,
.walls-consent-root a,
.walls-consent-root label,
.walls-consent-root h2,
.walls-consent-root p {
	font-family: var(--walls-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	filter: none !important;
	background-image: none !important;
	text-shadow: none !important;
}

.walls-consent-root button,
.walls-consent-root .walls-links a {
	box-shadow: none !important;
}

/* ביטול אפקטי מילוי מבוססי פסאודו-אלמנט של התבנית */
.walls-consent-root button::before,
.walls-consent-root button::after,
.walls-consent-root .walls-links a::before,
.walls-consent-root .walls-links a::after,
.walls-consent-root .walls-switch::before,
.walls-consent-root .walls-switch::after {
	content: none !important;
	display: none !important;
}

/* --- כפתור ראשי --- */
.walls-consent-root .walls-btn--primary,
.walls-consent-root .walls-btn--primary:link,
.walls-consent-root .walls-btn--primary:visited,
.walls-consent-root .walls-btn--primary:hover,
.walls-consent-root .walls-btn--primary:focus,
.walls-consent-root .walls-btn--primary:focus-visible,
.walls-consent-root .walls-btn--primary:active {
	color: var(--walls-btn-text) !important;
	-webkit-text-fill-color: var(--walls-btn-text) !important;
	background-color: var(--walls-btn-bg) !important;
	border-color: var(--walls-btn-bg) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.walls-consent-root .walls-btn--primary:hover,
.walls-consent-root .walls-btn--primary:focus-visible {
	background-color: var(--walls-btn-bg-hover, #35332f) !important;
	border-color: var(--walls-btn-bg-hover, #35332f) !important;
}

/* --- כפתור משני (דחייה) — חייב להישאר קריא בכל מצב --- */
.walls-consent-root .walls-btn--ghost,
.walls-consent-root .walls-btn--ghost:link,
.walls-consent-root .walls-btn--ghost:visited,
.walls-consent-root .walls-btn--ghost:hover,
.walls-consent-root .walls-btn--ghost:focus,
.walls-consent-root .walls-btn--ghost:focus-visible,
.walls-consent-root .walls-btn--ghost:active {
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
	background-color: var(--walls-bg) !important;
	border-color: var(--walls-accent) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.walls-consent-root .walls-btn--ghost:hover,
.walls-consent-root .walls-btn--ghost:focus-visible {
	background-color: var(--walls-surface) !important;
	border-color: var(--walls-text) !important;
}

/* --- כפתור טקסט (התאמה אישית) — לעולם לא מקבל רקע --- */
.walls-consent-root .walls-btn--link,
.walls-consent-root .walls-btn--link:link,
.walls-consent-root .walls-btn--link:visited,
.walls-consent-root .walls-btn--link:hover,
.walls-consent-root .walls-btn--link:focus,
.walls-consent-root .walls-btn--link:focus-visible,
.walls-consent-root .walls-btn--link:active {
	background-color: transparent !important;
	border-color: transparent !important;
	color: var(--walls-muted) !important;
	-webkit-text-fill-color: var(--walls-muted) !important;
	opacity: 1 !important;
}

.walls-consent-root .walls-btn--link:hover,
.walls-consent-root .walls-btn--link:focus-visible {
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
}

/* --- קישורי מדיניות --- */
.walls-consent-root .walls-links a,
.walls-consent-root .walls-links a:link,
.walls-consent-root .walls-links a:visited,
.walls-consent-root .walls-links a:hover,
.walls-consent-root .walls-links a:focus,
.walls-consent-root .walls-links a:active {
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
	background-color: transparent !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

/* --- כפתור חזרה --- */
.walls-consent-root .walls-back,
.walls-consent-root .walls-back:hover,
.walls-consent-root .walls-back:focus,
.walls-consent-root .walls-back:focus-visible,
.walls-consent-root .walls-back:active {
	background-color: var(--walls-surface) !important;
	color: var(--walls-muted) !important;
	-webkit-text-fill-color: var(--walls-muted) !important;
	border-color: var(--walls-accent) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

.walls-consent-root .walls-back:hover,
.walls-consent-root .walls-back:focus-visible {
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
	border-color: var(--walls-text) !important;
}

/* --- שורת קטגוריה --- */
.walls-consent-root .walls-cat__toggle,
.walls-consent-root .walls-cat__toggle:hover,
.walls-consent-root .walls-cat__toggle:focus,
.walls-consent-root .walls-cat__toggle:focus-visible,
.walls-consent-root .walls-cat__toggle:active {
	background-color: transparent !important;
	border-color: transparent !important;
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
	text-decoration: none !important;
	opacity: 1 !important;
}

/* --- כפתור פתיחה מחדש --- */
.walls-consent-root .walls-reopen,
.walls-consent-root .walls-reopen:hover,
.walls-consent-root .walls-reopen:focus,
.walls-consent-root .walls-reopen:focus-visible,
.walls-consent-root .walls-reopen:active {
	background-color: var(--walls-bg) !important;
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
	border-color: var(--walls-accent) !important;
	text-decoration: none !important;
	box-shadow: 0 4px 16px rgba(28, 27, 25, 0.1) !important;
}

.walls-consent-root .walls-reopen:hover,
.walls-consent-root .walls-reopen:focus-visible {
	border-color: var(--walls-text) !important;
	opacity: 1 !important;
}

/* --- מתגים --- */
.walls-consent-root .walls-switch input:checked + .walls-switch__track {
	background-color: var(--walls-btn-bg) !important;
	border-color: var(--walls-btn-bg) !important;
}

.walls-consent-root .walls-switch input:not(:checked) + .walls-switch__track {
	background-color: var(--walls-surface) !important;
	border-color: var(--walls-accent) !important;
}

.walls-consent-root .walls-switch__thumb {
	background-color: #ffffff !important;
}

/* --- טיפוגרפיה --- */
.walls-consent-root .walls-title {
	color: var(--walls-text) !important;
	-webkit-text-fill-color: var(--walls-text) !important;
}

.walls-consent-root .walls-text,
.walls-consent-root .walls-text p,
.walls-consent-root .walls-cat__desc,
.walls-consent-root .walls-cat__desc p {
	color: var(--walls-muted) !important;
	-webkit-text-fill-color: var(--walls-muted) !important;
}

.walls-consent-root .walls-pill {
	background-color: var(--walls-surface) !important;
	color: var(--walls-muted) !important;
	-webkit-text-fill-color: var(--walls-muted) !important;
	border-color: var(--walls-accent) !important;
}
