/* The background remover (templates/page-remove-background.php, 22.11.2026). Loaded after sales-hero.css.
   The tool sits in the night hero like a light workbench: first the drop zone, then the picture and its tools.
   Mobile first (390px): everything stacked, buttons at least 44px high. */

.bgt-hero {
	padding-bottom: clamp(96px, 9vw, 130px);
}

/* On a wide screen the hero is two columns (Hadar, 22.11.2026: "תעשה את ההירו לרוחב, 2 עמודות"):
   the words on the right, the tool on the left. Phones and tablets keep the words above the tool. */
@media (min-width: 1000px) {
	.bgt-hero {
		flex-direction: row;
		align-items: center;
		justify-content: center;
		gap: clamp(40px, 5vw, 88px);
		padding-inline: clamp(28px, 5vw, 80px);
		padding-top: clamp(48px, 5vw, 80px);
		text-align: start;
	}

	.bgt-hero .aik-sales-text {
		flex: 1 1 560px;
		max-width: 600px;
		align-items: flex-start;
	}

	.bgt-hero .aik-sales-title {
		font-size: clamp(40px, 4.1vw, 62px);
		text-wrap: nowrap;
	}

	.bgt-hero .bgt {
		flex: 1 1 620px;
		max-width: 660px;
		min-width: 0;
	}
}

.bgt {
	--checker: repeating-conic-gradient(#e6e0f5 0 25%, #fff 0 50%) 0 0 / 22px 22px;
	position: relative;
	width: min(100%, 860px);
	padding: clamp(14px, 2vw, 22px);
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(10, 4, 40, 0.45);
	color: var(--text);
	text-align: center;
	transition: box-shadow 0.4s cubic-bezier(.22, 1, .36, 1);
}

.bgt.is-over {
	box-shadow: 0 0 0 4px var(--cyan), 0 24px 60px rgba(10, 4, 40, 0.45);
}

/* The drop zone */
.bgt-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: clamp(22px, 3vw, 40px) 16px;
	border: 3px dashed var(--lilac-line);
	border-radius: 20px;
	background: var(--lilac);
	transition: border-color 0.4s, background-color 0.4s;
}

.bgt.is-over .bgt-drop,
.bgt-drop:has(.bgt-file:focus-visible) {
	border-color: var(--purple);
	background: #ede5ff;
}

.bgt-drop[hidden],
.bgt-work[hidden] {
	display: none;
}

.bgt-drop-art {
	width: clamp(96px, 14vw, 140px);
	height: auto;
	margin-bottom: 4px;
}

.bgt-pick {
	display: flex;
	flex-direction: column;
	gap: 2px;
	cursor: pointer;
}

/* The whole zone is the file picker: a click anywhere opens it */
.bgt-pick::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.bgt-pick strong {
	color: var(--ink);
	font-family: var(--font-heading);
	font-size: clamp(26px, 3.4vw, 36px);
	line-height: 1.15;
}

.bgt-pick .bgt-sub {
	color: var(--purple-dark);
	font-size: 18px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.bgt-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.bgt-hint {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 15px;
}

.bgt-sample {
	position: relative;
	z-index: 1; /* above the picker's full-zone link */
	min-height: 44px;
	margin-top: 4px;
	padding: 8px 16px;
	border: 0;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--lilac-line);
	color: var(--purple-dark);
	font: 600 16px/1.2 var(--font-text);
	cursor: pointer;
	transition: box-shadow 0.4s, background-color 0.4s;
}

/* Phones can't drag a file: they get "בוחרים תמונה" and no Ctrl+V hint */
.bgt-touch {
	display: none;
}

@media (hover: none) and (pointer: coarse) {
	.bgt-fine {
		display: none;
	}

	.bgt-touch {
		display: inline;
	}
}

/* The picture */
.bgt-stage {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 220px;
	padding: 60px 14px 14px;
	border-radius: 20px;
	background: var(--checker);
}

.bgt-stage[data-view="dark"] {
	background: var(--night);
}

.bgt-stage[data-view="light"] {
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--lilac-line);
}

.bgt-canvas {
	display: block;
	max-width: 100%;
	max-height: min(58vh, 560px);
	width: auto;
	height: auto;
}

.bgt-stage.is-wand .bgt-canvas {
	cursor: crosshair;
}

.bgt-status {
	min-height: 1.6em;
	margin: 12px 0 4px;
	color: var(--ink);
	font-weight: 500;
	text-wrap: balance;
}

/* "Another picture", in the picture's other corner */
.bgt-new {
	position: absolute;
	top: 8px;
	inset-inline-start: 8px;
	min-height: 44px;
	padding: 6px 14px;
	border: 0;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 14px rgba(29, 22, 64, 0.18);
	color: var(--ink);
	font: 600 16px/1.2 var(--font-text);
	cursor: pointer;
	transition: background-color 0.4s;
}

@media (hover: hover) and (pointer: fine) {
	.bgt-new:hover {
		background: #fff;
	}
}

/* A real photo: the slider is for plain backgrounds only, and while the cut is on its way the picture breathes */
.bgt.is-photo .bgt-range {
	display: none;
}

.bgt.is-busy .bgt-canvas {
	animation: bgt-busy 1.6s cubic-bezier(.22, 1, .36, 1) infinite alternate;
}

.bgt.is-busy [data-act="download"],
.bgt.is-busy [data-act="wand"] {
	opacity: 0.45;
	pointer-events: none;
}

@keyframes bgt-busy {
	from { opacity: 1; }
	to { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
	.bgt.is-busy .bgt-canvas {
		animation: none;
		opacity: 0.6;
	}
}

/* The tools */
.bgt-bar {
	display: grid;
	gap: 14px;
	margin-top: 8px;
}

.bgt-range label {
	display: block;
	color: var(--ink);
	font-weight: 600;
}

.bgt-range-row {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--muted);
	font-size: 15px;
}

.bgt-range-row input {
	flex: 1;
	min-height: 44px;
	accent-color: var(--purple);
}

.bgt-tools,
.bgt-end {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.bgt-btn {
	min-height: 44px;
	padding: 8px 16px;
	border: 0;
	border-radius: 14px;
	background: var(--lilac);
	box-shadow: inset 0 0 0 2px var(--lilac-line);
	color: var(--ink);
	font: 600 17px/1.2 var(--font-text);
	cursor: pointer;
	transition: background-color 0.4s, box-shadow 0.4s;
}

.bgt-btn[aria-pressed="true"] {
	background: var(--purple);
	box-shadow: none;
	color: #fff;
}

.bgt-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.bgt-views {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 4px 14px rgba(29, 22, 64, 0.18);
}

.bgt-view {
	width: 44px;
	height: 44px;
	padding: 0;
	border: 3px solid transparent;
	border-radius: 11px;
	cursor: pointer;
}

.bgt-view.is-checker { background: repeating-conic-gradient(#d9d0f2 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.bgt-view.is-dark { background: var(--night); }
.bgt-view.is-light { background: #fff; }

.bgt-view[aria-pressed="true"] {
	border-color: var(--purple);
}

.bgt-end {
	flex-wrap: nowrap;
}

.bgt-end .aik-button-big {
	flex: 1 1 auto;
}

@media (max-width: 479px) {
	.bgt-wide {
		display: none;
	}
}

.bgt-btn-alt {
	flex: 0 0 auto;
	font-family: var(--font-title);
}

.bgt button:focus-visible,
.bgt-compare-range:focus-visible {
	outline: 3px solid var(--cyan);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.bgt-btn:not(:disabled):not([aria-pressed="true"]):hover,
	.bgt-sample:hover {
		background: #ebe2ff;
		box-shadow: inset 0 0 0 2px var(--purple-soft);
	}
}

@media (min-width: 700px) {
	.bgt-bar {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
		text-align: start;
	}

	.bgt-tools {
		justify-content: flex-end;
	}

	.bgt-end {
		grid-column: 1 / -1;
	}

	.bgt-end {
		justify-content: center;
	}

	.bgt-end .aik-button-big {
		flex: 0 1 auto;
	}
}

/* The privacy block: one giant zero */
.bgt-privacy {
	display: grid;
	justify-items: center;
	gap: 0;
	text-align: center;
}

.bgt-zero {
	font-family: var(--font-title);
	font-size: clamp(170px, 24vw, 330px);
	font-weight: 700;
	line-height: 0.85;
	background: linear-gradient(135deg, var(--cyan), var(--purple) 55%, #ff4fa3);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.bgt-privacy-text h2 {
	margin: 4px 0 12px;
	color: var(--ink);
	font-family: var(--font-heading);
	font-size: clamp(32px, 4.4vw, 52px);
	line-height: 1.1;
}

.bgt-privacy-text p:last-child {
	margin: 0;
	color: var(--muted);
	font-size: 19px;
}

@media (min-width: 900px) {
	.bgt-privacy {
		grid-template-columns: 5fr 7fr;
		align-items: center;
		justify-items: stretch;
		max-width: 1000px;
		margin-inline: auto;
		text-align: start;
	}

	.bgt-zero {
		text-align: center;
	}
}

/* How it works: the before/after and three steps */
.bgt-how {
	display: grid;
	gap: clamp(28px, 4vw, 56px);
	align-items: center;
	max-width: 1100px;
	margin-inline: auto;
}

@media (min-width: 900px) {
	.bgt-how {
		grid-template-columns: 7fr 5fr;
	}
}

.bgt-compare {
	position: relative;
	margin: 0;
	border-radius: 24px;
	overflow: hidden;
	box-shadow: var(--shadow);
	aspect-ratio: 9 / 7;
}

.bgt-compare img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bgt-compare-after {
	background: var(--bgt-checker, repeating-conic-gradient(#e6e0f5 0 25%, #fff 0 50%) 0 0 / 26px 26px);
	clip-path: inset(0 var(--cut) 0 0);
}

/* The line between before and after, with a round handle */
.bgt-compare::after {
	content: "↔";
	position: absolute;
	top: 50%;
	right: var(--cut);
	width: 52px;
	height: 52px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 0 0 4px var(--purple), 0 8px 20px rgba(29, 22, 64, 0.25);
	color: var(--purple-dark);
	font-size: 24px;
	font-weight: 700;
	transform: translate(50%, -50%);
	pointer-events: none;
}

.bgt-compare::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: var(--cut);
	width: 4px;
	background: var(--purple);
	transform: translateX(50%);
	pointer-events: none;
	z-index: 1;
}

.bgt-compare-range {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: ew-resize;
	z-index: 2;
}

.bgt-compare figcaption {
	position: absolute;
	inset-inline: 14px;
	bottom: 14px;
	display: flex;
	justify-content: space-between;
	pointer-events: none;
}

.bgt-compare figcaption span {
	padding: 4px 14px;
	border-radius: 999px;
	background: rgba(27, 20, 66, 0.78);
	color: #fff;
	font-weight: 600;
	font-size: 16px;
}

.bgt-steps {
	display: grid;
	gap: 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.bgt-steps li {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

.bgt-steps b {
	font-family: var(--font-title);
	font-size: 54px;
	line-height: 0.9;
	color: var(--purple);
}

.bgt-steps li:nth-child(2) b { color: var(--cyan); }
.bgt-steps li:nth-child(3) b { color: #ff4fa3; }

.bgt-steps strong {
	display: block;
	color: var(--ink);
	font-family: var(--font-heading);
	font-size: 26px;
	line-height: 1.2;
}

.bgt-steps span {
	color: var(--muted);
}
