/**
 * Amendment 13 Cookie Consent — banner styles.
 * Everything is scoped under .a13cc so it never collides with theme CSS.
 */

.a13cc,
.a13cc * {
	box-sizing: border-box;
}

.a13cc {
	--a13-accent: #2563eb;
	--a13-accent-hover: #1d4ed8;
	--a13-accent-text: #ffffff;
	--a13-radius: 16px;
	--a13-radius-btn: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, "Noto Sans Hebrew", "Arial Hebrew", sans-serif;
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/* Light theme (default) — clean white, high-contrast text. */
.a13cc--light {
	--a13-bg: #ffffff;
	--a13-text: #111827;
	--a13-body: #4b5563;
	--a13-muted: #6b7280;
	--a13-link: #2563eb;
	--a13-border: #e5e7eb;
	--a13-border-strong: #cbd2dc;
	--a13-surface: #f8fafc;
	--a13-surface-hover: #eef1f5;
	--a13-shadow: 0 12px 38px rgba(15, 23, 42, 0.16), 0 3px 10px rgba(15, 23, 42, 0.08);
	--a13-overlay: rgba(15, 23, 42, 0.5);
	--a13-switch-off: #d6dbe2;
}

/* Dark theme — refined neutral charcoal. */
.a13cc--dark {
	--a13-bg: #1a1d25;
	--a13-text: #f4f5f7;
	--a13-body: #c4c9d4;
	--a13-muted: #9298a6;
	--a13-link: #8ab4ff;
	--a13-border: rgba(255, 255, 255, 0.12);
	--a13-border-strong: rgba(255, 255, 255, 0.26);
	--a13-surface: #252934;
	--a13-surface-hover: #2e333f;
	--a13-shadow: 0 16px 46px rgba(0, 0, 0, 0.55);
	--a13-overlay: rgba(0, 0, 0, 0.64);
	--a13-switch-off: #3c4250;
}

.a13cc[hidden] {
	display: none;
}

@keyframes a13cc-in {
	from { opacity: 0; transform: translateY(18px); }
	to   { opacity: 1; transform: translateY(0); }
}

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

/* --------------------------------------------------------------------- *
 * Banner
 * --------------------------------------------------------------------- */

.a13cc-banner {
	position: fixed;
	z-index: 2147483600;
	background: var(--a13-bg);
	color: var(--a13-text);
	border: 1px solid var(--a13-border);
	box-shadow: var(--a13-shadow);
	animation: a13cc-in 0.34s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.a13cc-banner__inner {
	padding: 22px 24px;
}

.a13cc-banner__title {
	margin: 0 0 7px;
	font-size: 16.5px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--a13-text);
}

.a13cc-banner__body {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.62;
	color: var(--a13-body);
}

.a13cc-banner__body a {
	color: var(--a13-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.a13cc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 18px;
}

.a13cc-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 16px;
	margin-top: 14px;
	font-size: 12.5px;
}

.a13cc-foot a,
.a13cc-link {
	color: var(--a13-muted);
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.a13cc-foot a:hover,
.a13cc-link:hover {
	color: var(--a13-text);
}

/* Position — floating boxes. */
.a13cc-banner--box-right,
.a13cc-banner--box-left {
	width: 416px;
	max-width: calc(100vw - 36px);
	border-radius: var(--a13-radius);
	bottom: 24px;
}

.a13cc-banner--box-right { right: 24px; }
.a13cc-banner--box-left  { left: 24px; }

/* Position — full-width bars. */
.a13cc-banner--bar-bottom,
.a13cc-banner--bar-top {
	left: 0;
	right: 0;
	width: 100%;
	border-radius: 0;
	border-left: 0;
	border-right: 0;
}

.a13cc-banner--bar-bottom { bottom: 0; border-bottom: 0; }
.a13cc-banner--bar-top    { top: 0; border-top: 0; }

.a13cc-banner--bar-bottom .a13cc-banner__inner,
.a13cc-banner--bar-top .a13cc-banner__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	max-width: 1180px;
	margin: 0 auto;
}

.a13cc-banner--bar-bottom .a13cc-banner__text,
.a13cc-banner--bar-top .a13cc-banner__text {
	flex: 1 1 320px;
}

.a13cc-banner--bar-bottom .a13cc-actions,
.a13cc-banner--bar-top .a13cc-actions {
	margin-top: 0;
	flex: 0 0 auto;
}

.a13cc-banner--bar-bottom .a13cc-foot,
.a13cc-banner--bar-top .a13cc-foot {
	margin-top: 8px;
}

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

.a13cc-btn {
	flex: 1 1 auto;
	min-width: 120px;
	min-height: 44px;
	padding: 11px 18px;
	border-radius: var(--a13-radius-btn);
	border: 1.5px solid transparent;
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.a13cc-btn:focus-visible {
	outline: 3px solid var(--a13-accent);
	outline-offset: 2px;
}

/* Accept All — primary, filled accent. */
.a13cc-btn--primary {
	background: var(--a13-accent);
	border-color: var(--a13-accent);
	color: var(--a13-accent-text);
}

.a13cc-btn--primary:hover {
	background: var(--a13-accent-hover);
	border-color: var(--a13-accent-hover);
}

/* Reject All — equal prominence, outlined. */
.a13cc-btn--secondary {
	background: var(--a13-bg);
	border-color: var(--a13-border-strong);
	color: var(--a13-text);
}

.a13cc-btn--secondary:hover {
	background: var(--a13-surface-hover);
}

/* Manage Preferences — quieter, full-width on its own row inside the box. */
.a13cc-btn--ghost {
	background: transparent;
	border-color: var(--a13-border);
	color: var(--a13-muted);
}

.a13cc-btn--ghost:hover {
	background: var(--a13-surface);
	color: var(--a13-text);
}

.a13cc-actions .a13cc-btn--ghost {
	flex-basis: 100%;
}

/* In bars, every button hugs its content and stays on one row. */
.a13cc-banner--bar-bottom .a13cc-actions .a13cc-btn,
.a13cc-banner--bar-top .a13cc-actions .a13cc-btn {
	flex: 0 0 auto;
}

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

.a13cc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483610;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.a13cc-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--a13-overlay);
}

.a13cc-modal__card {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 88vh;
	overflow-y: auto;
	background: var(--a13-bg);
	color: var(--a13-text);
	border: 1px solid var(--a13-border);
	border-radius: var(--a13-radius);
	box-shadow: var(--a13-shadow);
	animation: a13cc-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.a13cc-modal__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 22px 24px 6px;
}

.a13cc-modal__title {
	margin: 0;
	flex: 1;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.a13cc-modal__close {
	background: none;
	border: 0;
	color: var(--a13-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 7px;
	border-radius: 8px;
}

.a13cc-modal__close:hover {
	color: var(--a13-text);
	background: var(--a13-surface);
}

.a13cc-modal__intro {
	margin: 0;
	padding: 0 24px 8px;
	color: var(--a13-body);
	font-size: 13px;
}

.a13cc-modal__body {
	padding: 8px 24px;
}

.a13cc-cat {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 16px 0;
	border-top: 1px solid var(--a13-border);
}

.a13cc-cat:first-child {
	border-top: 0;
}

.a13cc-cat__text {
	flex: 1;
}

.a13cc-cat__name {
	margin: 0 0 3px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--a13-text);
}

.a13cc-cat__desc {
	margin: 0;
	color: var(--a13-body);
	font-size: 12.5px;
	line-height: 1.55;
}

.a13cc-modal__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 18px 24px 24px;
	border-top: 1px solid var(--a13-border);
}

/* --------------------------------------------------------------------- *
 * Toggle switch
 * --------------------------------------------------------------------- */

.a13cc-switch {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 26px;
	margin-top: 2px;
}

.a13cc-switch input {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	cursor: pointer;
}

.a13cc-switch__track {
	position: absolute;
	inset: 0;
	background: var(--a13-switch-off);
	border-radius: 999px;
	transition: background-color 0.18s ease;
	pointer-events: none;
}

.a13cc-switch__track::before {
	content: "";
	position: absolute;
	top: 3px;
	inset-inline-start: 3px;
	width: 20px;
	height: 20px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
	transition: inset-inline-start 0.18s ease;
}

.a13cc-switch input:checked + .a13cc-switch__track {
	background: var(--a13-accent);
}

.a13cc-switch input:checked + .a13cc-switch__track::before {
	inset-inline-start: 21px;
}

.a13cc-switch input:disabled {
	cursor: not-allowed;
}

.a13cc-switch input:disabled + .a13cc-switch__track {
	opacity: 0.55;
}

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

.a13cc-cat__always {
	flex: 0 0 auto;
	align-self: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--a13-link);
}

/* --------------------------------------------------------------------- *
 * Re-open floating button
 * --------------------------------------------------------------------- */

.a13cc-reopen {
	position: fixed;
	bottom: 20px;
	z-index: 2147483500;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--a13-border);
	border-radius: 50%;
	background: var(--a13-bg);
	color: var(--a13-accent);
	cursor: pointer;
	box-shadow: var(--a13-shadow);
	display: flex;
	align-items: center;
	justify-content: center;
}

.a13cc-reopen:hover {
	background: var(--a13-surface);
}

.a13cc-reopen:focus-visible {
	outline: 3px solid var(--a13-accent);
	outline-offset: 2px;
}

.a13cc-reopen svg {
	width: 24px;
	height: 24px;
}

.a13cc-reopen--left  { left: 20px; }
.a13cc-reopen--right { right: 20px; }

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

@media (max-width: 600px) {
	.a13cc-banner--box-right,
	.a13cc-banner--box-left {
		left: 12px;
		right: 12px;
		width: auto;
		bottom: 12px;
	}

	.a13cc-banner__inner {
		padding: 18px 18px;
	}

	.a13cc-banner--bar-bottom .a13cc-banner__inner,
	.a13cc-banner--bar-top .a13cc-banner__inner {
		display: block;
	}

	.a13cc-banner--bar-bottom .a13cc-actions,
	.a13cc-banner--bar-top .a13cc-actions {
		margin-top: 16px;
	}

	/* Stack all buttons full-width for easy tapping. */
	.a13cc-actions .a13cc-btn,
	.a13cc-banner--bar-bottom .a13cc-actions .a13cc-btn,
	.a13cc-banner--bar-top .a13cc-actions .a13cc-btn {
		flex: 1 1 100%;
	}

	/* Preferences modal becomes a bottom sheet. */
	.a13cc-modal {
		padding: 0;
		align-items: flex-end;
	}

	.a13cc-modal__card {
		max-width: 100%;
		max-height: 92vh;
		border-radius: 16px 16px 0 0;
	}

	.a13cc-reopen {
		width: 44px;
		height: 44px;
	}
}
