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

.topbar {
	--tb-bg: #eee0e2;
	--tb-ink: #44373c;
	--tb-button: #80515f;
	--tb-button-ink: #fff;
	--tb-fixed-top: 110px;
	position: relative;
	z-index: 10;
	height: 60px;
	width: 100%;
	background: var(--tb-bg);
	color: var(--tb-ink);
	font-family: Manrope, sans-serif;
	cursor: pointer;
}

.topbar[hidden] {
	display: none !important;
}

.topbar--fixed {
	position: fixed;
	top: var(--tb-fixed-top);
	left: 0;
	right: 0;
}

/* Цветовые варианты */
.topbar--sage { --tb-bg: #e1e8e2; --tb-ink: #35423a; --tb-button: #526a5b; }
.topbar--blue { --tb-bg: #e1e8ed; --tb-ink: #34434e; --tb-button: #536c7e; }
.topbar--sand { --tb-bg: #eee5d9; --tb-ink: #4b4135; --tb-button: #806a4b; }
.topbar--lilac { --tb-bg: #e8e3eb; --tb-ink: #423749; --tb-button: #6e5a7c; }
.topbar--burgundy { --tb-bg: #f3e5e7; --tb-ink: #422c33; --tb-button: #713c4c; }
.topbar--olive { --tb-bg: #ebebdd; --tb-ink: #363c2d; --tb-button: #596044; }
.topbar--peach { --tb-bg: #f4e4d9; --tb-ink: #48332b; --tb-button: #88513d; }

.topbar .tb-inner {
	height: 60px;
	width: 1140px;
	max-width: calc(100% - 48px);
	margin: auto;
	display: flex;
	align-items: center;
	gap: 24px;
}

.topbar .tb-icon {
	width: 30px;
	height: 28px;
	flex: 0 0 auto;
	color: var(--tb-ink);
}

.topbar .tb-copy {
	font: 400 15px/20px Manrope, sans-serif;
	color: var(--tb-ink);
	margin: 0;
	flex: 1;
	min-width: 0;
}

.topbar .tb-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 0 0 auto;
}

.topbar .tb-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 192px;
	min-width: 192px;
	height: 38px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid transparent;
	border-radius: 23px;
	background: var(--tb-button);
	color: var(--tb-button-ink);
	font: 400 13px/1.25 'Tenor Sans', serif;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	text-transform: uppercase;
	box-shadow: none;
	transition: filter .15s;
}

.topbar .tb-cta:hover {
	filter: brightness(.91);
	background: var(--tb-button);
	color: var(--tb-button-ink);
}

.topbar .tb-cta:focus-visible {
	outline: 2px solid var(--tb-ink);
	outline-offset: 3px;
}

.topbar .tb-cta:active {
	transform: translateY(1px);
}

.topbar .tb-close {
	position: static;
	flex: 0 0 32px;
	width: 32px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: transparent;
	color: var(--tb-ink);
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: none;
}

.topbar .tb-close svg {
	display: block;
	width: 16px;
	height: 16px;
}

.topbar .tb-close:hover {
	background: rgba(0, 0, 0, .06);
	color: var(--tb-ink);
}

.topbar .tb-close:focus-visible {
	outline: 2px solid var(--tb-ink);
	outline-offset: -3px;
}

.topbar--burgundy .tb-cta,
.topbar--olive .tb-cta,
.topbar--peach .tb-cta {
	width: 240px;
	min-width: 240px;
	text-transform: none;
}

@media (max-width: 1199px) and (min-width: 768px) {
	.topbar .tb-inner { width: 960px; gap: 18px; }
	.topbar .tb-copy { font-size: 14px; line-height: 19px; }
	.topbar .tb-cta { width: 180px; min-width: 180px; font-size: 12px; }
	.topbar .tb-icon { width: 25px; height: 25px; }

	.topbar--burgundy,
	.topbar--olive,
	.topbar--peach { height: auto; min-height: 60px; }

	.topbar--burgundy .tb-inner,
	.topbar--olive .tb-inner,
	.topbar--peach .tb-inner { height: auto; min-height: 60px; padding-block: 10px; }
}

@media (max-width: 767px) {
	.topbar { height: auto; --tb-fixed-top: 94px; }

	.topbar .tb-inner {
		width: 100%;
		max-width: none;
		height: auto;
		padding: 12px 16px;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.topbar .tb-icon { display: none; }

	.topbar .tb-copy {
		flex: none;
		width: 100%;
		padding: 0 24px;
		font: 400 11px/16px Manrope, sans-serif;
		text-align: center;
	}

	.topbar .tb-actions { width: 100%; justify-content: center; gap: 0; }

	.topbar .tb-cta {
		width: 100%;
		min-width: 0;
		height: 32px;
		padding: 4px 16px;
		white-space: normal;
		font: 600 12px/1.3 Manrope, sans-serif;
		text-transform: none;
	}

	.topbar .tb-close {
		position: absolute;
		right: 4px;
		top: 4px;
		width: 36px;
		height: 36px;
	}

	.topbar--burgundy .tb-cta,
	.topbar--olive .tb-cta,
	.topbar--peach .tb-cta { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.topbar .tb-cta { transition: none; }
}
