/* Подбор размеров. Оформление нарочно нейтральное — подстраивается под тему. */

.fo-sp-wrap {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin: 0 0 18px;
}

.fo-sp-open {
	margin: 0;
}

.fo-sp-hint {
	font-size: 13px;
	opacity: .7;
	line-height: 1.3;
}

body.fo-sp-locked {
	overflow: hidden;
}

.fo-sp-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
}

.fo-sp-modal.is-open {
	display: block;
}

.fo-sp-overlay {
	position: absolute;
	inset: 0;
	background: rgba(20, 22, 24, .55);
}

.fo-sp-box {
	position: relative;
	margin: 4vh auto;
	max-width: 760px;
	width: calc(100% - 24px);
	max-height: 92vh;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
	overflow: hidden;
}

.fo-sp-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid #e8eaed;
}

.fo-sp-sku {
	flex: none;
	font-size: 13px;
	padding: 3px 8px;
	border-radius: 3px;
	background: #eef1f4;
	color: #4a5259;
}

.fo-sp-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.25;
	flex: 1 1 auto;
}

.fo-sp-close {
	flex: none;
	border: 0;
	background: none;
	font-size: 28px;
	line-height: 1;
	padding: 0 4px;
	cursor: pointer;
	color: #8b949c;
}

.fo-sp-close:hover {
	color: #222;
}

.fo-sp-body {
	padding: 18px 20px;
	overflow-y: auto;
	flex: 1 1 auto;
}

.fo-sp-subtitle {
	margin: 0 0 12px;
	font-weight: 600;
}

.fo-sp-colors {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 16px;
}

.fo-sp-colors__label {
	font-size: 14px;
	opacity: .7;
}

.fo-sp-color {
	border: 1px solid #d6dade;
	background: #fff;
	border-radius: 3px;
	padding: 5px 12px;
	font-size: 14px;
	cursor: pointer;
}

.fo-sp-color.is-active {
	border-color: #222;
	background: #222;
	color: #fff;
}

.fo-sp-group {
	display: flex;
	gap: 16px;
	border-top: 1px solid #eceef0;
	padding: 10px 0;
}

.fo-sp-group:first-child {
	border-top: 0;
}

.fo-sp-size {
	flex: 0 0 90px;
	font-size: 19px;
	font-weight: 700;
	padding-top: 8px;
}

.fo-sp-rows {
	flex: 1 1 auto;
	min-width: 0;
}

.fo-sp-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 7px 0;
	border-bottom: 1px solid #f1f3f4;
}

.fo-sp-row:last-child {
	border-bottom: 0;
}

.fo-sp-rost {
	flex: 1 1 auto;
	min-width: 110px;
}

.fo-sp-status {
	flex: 0 0 104px;
	text-align: right;
	font-size: 13px;
	color: #3f8a4d;
}

.fo-sp-row.is-backorder .fo-sp-status {
	color: #9a7b22;
}

.fo-sp-stepper {
	flex: none;
	display: flex;
	align-items: center;
	border: 1px solid #d6dade;
	border-radius: 3px;
	overflow: hidden;
}

.fo-sp-stepper.is-active {
	border-color: #222;
}

.fo-sp-step {
	border: 0;
	background: #fff;
	width: 34px;
	height: 36px;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: #5a6168;
}

.fo-sp-step:hover {
	background: #f2f4f6;
	color: #111;
}

.fo-sp-qty {
	width: 46px;
	height: 36px;
	border: 0;
	border-left: 1px solid #e3e6e9;
	border-right: 1px solid #e3e6e9;
	text-align: center;
	font-size: 15px;
	padding: 0;
	margin: 0;
	background: #fff;
	box-shadow: none;
	border-radius: 0;
}

.fo-sp-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 20px;
	border-top: 1px solid #e8eaed;
	background: #fafbfc;
	flex-wrap: wrap;
}

.fo-sp-total {
	font-size: 15px;
}

.fo-sp-submit {
	margin: 0;
}

.fo-sp-submit[disabled] {
	opacity: .45;
	cursor: not-allowed;
}

.fo-sp-error {
	color: #c0392b;
}

.fo-sp-done {
	text-align: center;
	padding: 26px 0;
}

.fo-sp-done__title {
	font-size: 20px;
	font-weight: 700;
	margin-bottom: 6px;
}

@media (max-width: 620px) {
	.fo-sp-box {
		margin: 0;
		width: 100%;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
	}

	.fo-sp-group {
		display: block;
	}

	.fo-sp-size {
		padding: 0 0 6px;
	}

	.fo-sp-row {
		flex-wrap: wrap;
	}

	.fo-sp-status {
		flex: 1 1 100%;
		text-align: left;
	}
}
