.container h1 {
	text-align: left;
	margin-bottom: 40px;
}

.mattress-select {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
	border-radius: 8px;
	max-width: 1224px;
	background: #f5f3f1 url("images/background.svg") no-repeat;
	background-size: cover;
	align-items: center;
	padding: 0 20px 0 20px;
}

.mattress-select__tabs-container {
	max-width: 480px;
	margin: 0 auto;
}

.mattress-select__tabs {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	width: 100%;
	padding-top: 25px;
}

.mattress-select__tab {
	flex: 1;
	min-width: 0;
	text-align: center;
	border: 1px solid rgba(8, 83, 148, 0);
	border-radius: 5px;
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.mattress-select__tab.active {
	pointer-events: auto;
}
.mattress-select__tab.active, .mattress-select__tab.selected{
	color: #0A4881;
}

.mattress-select__tab.active .mattress-select__step-icon {
	background-color: #0A4881;
}

.mattress-select__tab.active img {
	filter: brightness(0) invert(1);
}

.mattress-select__tab.selected img {
	margin: 5px;
}

.mattress-select__step-icon {
	background-color: white;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto 3px;
	width: 100%;
	max-width: 48px;
	aspect-ratio: 1/1;
	border-radius: 50%;
}

.mattress-select__tab.selected .mattress-select__step-icon {
	max-width: 60px;
}

.mattress-select__question {
	margin-bottom: 2px;
	font-size: 16px;
}

.mattress-select__answer {
	font-size: clamp(6px, 2vw, 12px);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	width: 100%;
	padding: 0 2px;
}

.mattress-select__tab.selected {
	flex: 1.2;
	color: #0A4881;
}

.mattress-select__tab.disabled {
	opacity: 0.5;
}

.mattress-select__tab.hidden {
	display: none;
}

.mattress-select__steps {
	margin-top: 40px;
}

.mattress-select__step-title {
	text-align: center;
	margin-bottom: 24px;
	font-style: normal;
	font-weight: 500;
	line-height: 120%;
	letter-spacing: -0.01em;
	color: #333;
}

.mattress-select__step-variants {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px;
	padding-bottom: 130px;
}

.input-step .mattress-select__step-variants {
	align-items: center;
}

.mattress-select__step-variant {
	cursor: pointer;
	text-align: center;
	align-content: center;
}

.mattress-select__step-name {
	display: none;
}

.mattress-select__step-image {
	max-width: 370px;
	overflow: hidden;
	margin: 0 auto;
	background: #fff;
	border-radius: 8px;
}

.variants-block.mattress-select__step-variants {
	max-width: 760px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	box-sizing: border-box;
}

.mattress-select__step-image.weight-selector {
	padding: 12px 12px 0 12px;
	border-radius: 50px 50px 0px 0px;

}

.mattress-select__step-image.weight-selector {
	max-width: 468px;
}

.weight-selector {
	display: inline-block;
}

.input-step .mattress-select__step-image {
	margin: 0;
}

.mattress-select__step-image img {
	width: 100%;
}

.mattress-select__input {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	flex-direction: row-reverse;
}

#weight-step, #weight-partner-step {
	position: relative;
}

.weight-accept_btn {
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: center;
	padding: 16px 32px;
	gap: 8px;
	background: #0a4881;
	border-radius: 8px;
	color: white;
	border: none;
	cursor: pointer;
}

.weight-accept_btn:not(:disabled):hover {
	transform: translateX(-50%) scale(1.05);
	box-shadow: 0 4px 12px rgba(10, 72, 129, 0.3);
}

.weight-accept_btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.weight_input {
	position: absolute;
	top: 18%;
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	background: transparent;
	color: #b3b3b3;
	border: none;
	font-size: 18px;
	padding: 8px;
	outline: none;
	cursor: pointer;
	width: 150px;
}

.weight_input::placeholder {
	font-size: 13px;
	color: #999;
}

.input-step .mattress-select__step-variants {
	padding-bottom: 0;
	gap: 0;
}

.mattress-select__step-icon img {
	height: auto;
	transition: all 0.3s ease;
}

@media screen and (max-width: 376px) {
	.mattress-select__step-image {
		max-width: 340px;
	}

	.mattress-select__step-variants {
		padding-bottom: 40px;
	}

	.weight_input {
		top: 21%
	}
}

@media screen and (max-width: 480px) {
	.mattress-select__tabs {
		gap: 5px;
	}

	.mattress-select__answer {
		font-size: clamp(6px, 2vw, 12px);
	}

	.mattress-select__step-icon {
		max-width: 40px;
	}

	.mattress-select__tab.selected .mattress-select__step-icon {
		max-width: 52px;
	}
}

@media screen and (max-width: 768px) {
	.variants-block.mattress-select__step-variants {
		grid-template-columns: repeat(1, 1fr);
	}
}
