:root {
	--flower-bottom-nav-accent: #c5125f;
	--flower-bottom-nav-height: 82px;
	--flower-bottom-nav-safe-area: env(safe-area-inset-bottom, 0px);
}

/* Временный публичный тест: сменить none на block, чтобы включить панель. */
.flower-customer-bottom-nav-root {
	display: none;
}

.flower-customer-bottom-nav-root.is-account {
	display: block;
}

html.v2-gift-certificate-modal-open .flower-customer-bottom-nav-root {
	visibility: hidden;
}

html.flower-customer-bottom-nav-panel-open {
	overflow: hidden;
}

body.flower-bunch-customer-bottom-nav-enabled {
	padding-bottom: calc(var(--flower-bottom-nav-height) + var(--flower-bottom-nav-safe-area) + 24px);
}

.flower-customer-bottom-nav-root,
.flower-customer-bottom-nav-root * {
	box-sizing: border-box;
}

.flower-customer-bottom-nav {
	position: fixed;
	z-index: 99993;
	right: 0;
	left: 0;
	bottom: 0;
	margin: 0 auto;
	display: grid;
	width: min(620px, calc(100vw - 24px));
	min-height: var(--flower-bottom-nav-height);
	grid-template-columns: repeat(5, minmax(0, 1fr));
	align-items: end;
	padding: 10px 9px 8px;
	border: 1px solid rgba(31, 31, 31, .08);
	border-radius: 12px;
	background: white;
	transform: translateX(0);
	background: white;
}

.flower-customer-bottom-nav__item,
.flower-customer-bottom-nav__primary {
	-webkit-tap-highlight-color: transparent;
}

.flower-customer-bottom-nav__item {
	display: flex;
	min-width: 0;
	min-height: 58px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	margin: 0;
	padding: 5px 3px;
	border: 0;
	border-radius: 13px;
	background: transparent;
	color: #5f5f65 !important;
	font: inherit;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.15;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
}

.flower-customer-bottom-nav__item:focus-visible,
.flower-customer-bottom-nav__primary:focus-visible,
.flower-customer-bottom-nav__panel a:focus-visible,
.flower-customer-bottom-nav__panel button:focus-visible {
	outline: 2px solid var(--flower-bottom-nav-accent);
	outline-offset: 2px;
}

.flower-customer-bottom-nav__item > svg,
.flower-customer-bottom-nav__cart-icon > svg {
	display: block;
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.flower-customer-bottom-nav__item:first-child > svg {
	fill: currentColor;
	stroke-width: 1.15;
}

.flower-customer-bottom-nav__primary {
	position: relative;
	display: flex;
	min-width: 0;
	align-items: center;
	justify-content: flex-end;
	flex-direction: column;
	gap: 4px;
	padding: 0 2px 5px;
	border-radius: 15px;
	color: var(--flower-bottom-nav-accent) !important;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.1;
	text-align: center;
	text-decoration: none !important;
	white-space: nowrap;
}

.flower-customer-bottom-nav__primary-icon {
	display: flex;
	width: 60px;
	height: 60px;
	align-items: center;
	justify-content: center;
	margin-top: -30px;
	border: 5px solid #fff;
	border-radius: 50%;
	background: var(--flower-bottom-nav-accent);
	box-shadow: 0 9px 24px rgba(197, 18, 95, .33);
	color: #fff;
	transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.flower-customer-bottom-nav__primary:hover .flower-customer-bottom-nav__primary-icon {
	background: #a80f50;
	box-shadow: 0 10px 28px rgba(197, 18, 95, .42);
}

.flower-customer-bottom-nav__primary.is-empty {
	color: #8a8a8f !important;
	cursor: default;
	pointer-events: none;
}

.flower-customer-bottom-nav__primary.is-empty .flower-customer-bottom-nav__primary-icon,
.flower-customer-bottom-nav__primary.is-empty:hover .flower-customer-bottom-nav__primary-icon {
	background: #c2c2c6;
	box-shadow: 0 6px 16px rgba(40, 40, 45, .1);
	color: #f8f8f8;
}

.flower-customer-bottom-nav__primary-icon svg {
	display: block;
	width: 27px;
	height: 27px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.65;
}

.flower-customer-bottom-nav__cart-icon {
	position: relative;
	display: inline-flex;
}

.flower-customer-bottom-nav__count {
	position: absolute;
	top: -8px;
	right: -11px;
	display: inline-flex;
	min-width: 18px;
	height: 18px;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--flower-bottom-nav-accent);
	color: #fff;
	font-size: 9px;
	font-variant-numeric: tabular-nums;
	line-height: 14px;
}

.flower-customer-bottom-nav__backdrop {
	position: fixed;
	z-index: 99991;
	inset: 0;
	background: rgba(27, 22, 25, .28);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.flower-customer-bottom-nav__backdrop[hidden],
.flower-customer-bottom-nav__panel[hidden] {
	display: none !important;
}

.flower-customer-bottom-nav__panel {
	position: fixed;
	z-index: 99992;
	right: 50%;
	bottom: calc(var(--flower-bottom-nav-height) + var(--flower-bottom-nav-safe-area) + 26px);
	width: min(390px, calc(100vw - 24px));
	max-height: min(430px, calc(100dvh - 150px));
	overflow-y: auto;
	padding: 18px;
	border: 1px solid rgba(31, 31, 31, .08);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 16px 44px rgba(36, 22, 29, .2);
	color: #252327;
	font-family: Roboto, Arial, sans-serif;
	transform: translateX(50%);
}

.flower-customer-bottom-nav__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.flower-customer-bottom-nav__panel-head h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
}

.flower-customer-bottom-nav__panel-head button {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f6f3f4;
	color: #252327;
	cursor: pointer;
}

.flower-customer-bottom-nav__panel-head svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.7;
}

.flower-customer-bottom-nav__panel-links {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.flower-customer-bottom-nav__panel-links a {
	display: flex;
	min-height: 50px;
	align-items: center;
	padding: 10px 13px;
	border-radius: 12px;
	background: #faf7f8;
	color: #252327 !important;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.25;
	text-decoration: none !important;
}

.flower-customer-bottom-nav__panel-links a:hover {
	background: #fff0f6;
	color: var(--flower-bottom-nav-accent) !important;
}

.flower-customer-bottom-nav__item {
	font-size: 10px;
	position: relative;
}

.flower-customer-bottom-nav__item:nth-child(2) {
	left: -5px;
}

.flower-customer-bottom-nav__primary {
	top: -10px;
}

.flower-customer-bottom-nav__item:nth-child(4) {
	left: 5px;
}

@media (max-width: 640px) {
	:root {
		--flower-bottom-nav-height: 78px;
	}

	body.flower-bunch-customer-bottom-nav-enabled {
		padding-bottom: calc(var(--flower-bottom-nav-height) + var(--flower-bottom-nav-safe-area) + 12px);
	}

	.flower-customer-bottom-nav {
		bottom: 0;
		width: 100%;
		padding-right: max(6px, env(safe-area-inset-right, 0px));
		padding-bottom: calc(7px + var(--flower-bottom-nav-safe-area));
		padding-left: max(6px, env(safe-area-inset-left, 0px));
		border-right: 0;
		border-bottom: 0;
		border-left: 0;
		border-radius: 12px 12px 0 0;
	}

	.flower-customer-bottom-nav__item {
		font-size: 10px;
	}

	.flower-customer-bottom-nav__primary {
		font-size: 11px;
	}

	.flower-customer-bottom-nav__primary-icon {
		width: 58px;
		height: 58px;
		margin-top: -29px;
	}

	.flower-customer-bottom-nav__panel {
		bottom: calc(var(--flower-bottom-nav-height) + var(--flower-bottom-nav-safe-area) + 12px);
	}

	.flower-customer-bottom-nav__primary span:nth-child(2) {
		position: relative;
		top: 4px;
	}

}

@media (max-width: 390px) {

	.flower-customer-bottom-nav__primary {
		white-space: normal;
	}

	.flower-customer-bottom-nav__panel-links {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	.flower-customer-bottom-nav__primary-icon {
		transition-duration: .01ms;
	}
}

/* The account menu occupies the full mobile viewport; its links scroll independently. */
@media (max-width: 760px) {
	.flower-customer-bottom-nav-root.is-account .flower-customer-bottom-nav__panel {
		inset: 0;
		z-index: 99995;
		width: 100%;
		height: 100dvh;
		max-height: none;
		margin: 0;
		padding: max(20px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
		border: 0;
		border-radius: 0;
		transform: none;
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}
	.flower-customer-bottom-nav-root.is-account .flower-customer-bottom-nav__panel-head { flex: 0 0 auto; margin-bottom: 24px; }
	.flower-customer-bottom-nav-root.is-account .flower-customer-bottom-nav__panel-links { grid-template-columns: 1fr; align-content: start; overflow-y: auto; overscroll-behavior: contain; }
	.flower-customer-bottom-nav-root.is-account .flower-customer-bottom-nav__panel-links a { min-height: 56px; font-size: 16px; }
}
