/* clean-code-exception:magic_number stylesheet -- CSS geometry literals are measured figma values, not registry values */
.back_button {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

.back_button_sign_in {
	position: absolute;
	right: 4px;
	top: 50%;
	width: 48px;
	height: 48px;
	border-radius: 8px;
	color: var(--color_white_900);
	transform: translateY(-50%);
}

.back_button_sign_in svg {
	display: block;
}

.back_button_sign_in:hover {
	background: rgba(255, 255, 255, 0.1);
}

.back_button_sign_in:active {
	background: rgba(255, 255, 255, 0.2);
}

.back_button_sign_in:focus-visible {
	outline: var(--focus_outline_width_flush_to_the_button_edge) solid var(--color_white_900);
	outline-offset: -2px;
}

.back_button_sign_up {
	width: 56px;
	height: 44px;
}

.back_button_sign_up svg {
	display: block;
}

.back_button_top_bar {
	--back_button_glyph: 40px;
	--back_button_hit_box: 56px;
	width: var(--back_button_hit_box);
	height: var(--back_button_hit_box);
	margin: 0 calc((var(--back_button_glyph) - var(--back_button_hit_box)) / 2);
	color: var(--color_black_900);
	-webkit-tap-highlight-color: transparent;
}

.back_button_top_bar svg {
	width: var(--back_button_glyph);
	height: var(--back_button_glyph);
}

.back_button_top_bar:hover {
	color: var(--color_purple_500);
}

.back_button_nav {
	color: var(--color_white_900);
}

.back_button_nav:hover {
	color: var(--color_white_900);
	opacity: 0.8;
}

.back_button_chat {
	justify-self: start;
	width: 44px;
	height: 44px;
}

.back_button_chat img {
	width: 36px;
}

.back_button_payment {
	position: absolute;
	top: 50%;
	right: 16px;
	justify-content: flex-start;
	gap: 4px;
	min-width: 44px;
	min-height: 44px;
	transform: translateY(-50%);
}

.back_button_payment:hover {
	opacity: 0.8;
}

.back_button_payment:active {
	opacity: 0.6;
}

.back_button_payment img {
	width: 36px;
	height: 36px;
}

.back_button_payment .back_button_glyph_on_dark {
	display: none;
}

.back_button_profile {
	display: none;
	justify-content: flex-start;
	gap: 16px;
	min-height: 44px;
}

.back_button_profile .back_button_label {
	font-size: 16px;
	font-weight: var(--font_weight_medium);
	line-height: 20px;
}

.back_button_profile:hover .back_button_label {
	text-decoration: underline;
}

.back_button_top_bar:active,
.back_button_chat:active,
.back_button_profile:active {
	opacity: 0.7;
}

.back_button_top_bar:focus-visible,
.back_button_chat:focus-visible {
	outline: 2px solid var(--color_purple_500);
	outline-offset: -2px;
}

/* a title beside its back arrow is a back control too (Eran round 3, UC-PR3W-4); the padding grows its 20px line to the 44px hit box without moving the text */
[data-back-pair]:has([data-back-button]) [data-back-label] {
	--back_label_line: 20px;
	padding-block: calc((44px - var(--back_label_line)) / 2);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

[data-back-pair]:has([data-back-button]) [data-back-label]:hover {
	opacity: 0.8;
}

[data-back-pair]:has([data-back-button]) [data-back-label]:active {
	opacity: 0.6;
}
