.section-calculator {
	max-width: 1200px;
	margin: 80px auto;
	padding: 0 20px;
}

.section-calculator__title {
	font-size: 36px;
	font-weight: 700;
	color: #2f2320;
	text-align: center;
	margin-bottom: 16px;
}

.section-calculator__subtitle {
	font-size: 18px;
	color: #6b6563;
	text-align: center;
	margin-bottom: 60px;
	line-height: 1.6;
}

.calculator {
	width: 100%;
}

.calculator__body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: start;
	margin-bottom: 48px;
}

.calculator__controls {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.calculator__control {
	position: relative;
	height: 100%;
}

.calculator__control-label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	color: #6b6563;
	margin-bottom: 0;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.calculator__control-value {
	font-size: 36px;
	font-weight: 700;
	color: #580091;
	margin-bottom: 12px;
	display: flex;
	text-align: center;
	justify-content: center;
	align-items: baseline;
	gap: 8px;
}

.calculator__control-unit {
	font-size: 20px;
	font-weight: 400;
}

.calculator__range {
	width: 100%;
	height: 8px;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	outline: none;
	border-radius: 8px;
	position: relative;
	cursor: pointer;
}

.calculator__range::-webkit-slider-track {
	width: 100%;
	height: 8px;
	background: rgba(88, 0, 145, 0.1);
	border-radius: 8px;
}

.calculator__range::-moz-range-track {
	width: 100%;
	height: 8px;
	background: rgba(88, 0, 145, 0.1);
	border-radius: 8px;
}

.calculator__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 24px;
	height: 24px;
	background: #580091;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 0 0 4px rgba(88, 0, 145, 0.2),
				0 4px 12px rgba(88, 0, 145, 0.4);
	transition: all 0.2s ease;
}

.calculator__range::-moz-range-thumb {
	width: 24px;
	height: 24px;
	background: #580091;
	border-radius: 50%;
	cursor: pointer;
	border: none;
	box-shadow: 0 0 0 4px rgba(88, 0, 145, 0.2),
				0 4px 12px rgba(88, 0, 145, 0.4);
	transition: all 0.2s ease;
}

.calculator__range::-webkit-slider-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 0 0 6px rgba(88, 0, 145, 0.3),
				0 6px 16px rgba(88, 0, 145, 0.5);
}

.calculator__range::-moz-range-thumb:hover {
	transform: scale(1.15);
	box-shadow: 0 0 0 6px rgba(88, 0, 145, 0.3),
				0 6px 16px rgba(88, 0, 145, 0.5);
}

.calculator__range-labels {
	display: flex;
	justify-content: space-between;
	margin-top: 12px;
	font-size: 14px;
	color: #6b6563;
}

.calculator__result {
	position: relative;
	height: 100%;
	background: #580091;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 16px;
	padding: 28px;
	transition: all 0.3s ease;
}

.calculator__result:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(88, 0, 145, 0.5);
}

.calculator__result-header {
	text-align: center;
	margin-bottom: 40px;
}

.calculator__result-label {
	font-size: 24px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.8);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.calculator__result-total {
	font-size: 42px;
	font-weight: 800;
	color: #ffffff;
	line-height: 1.2;
}

.calculator__result-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.calculator__stat {
	padding: 24px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 16px;
	transition: all 0.3s ease;
}

.calculator__stat:hover {
	background: rgba(255, 255, 255, 0.15);
	border-color: rgba(255, 255, 255, 0.25);
	transform: translateY(-2px);
}

.calculator__stat-label {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.7);
	letter-spacing: 0.05em;
	text-transform: uppercase;
	margin-bottom: 12px;
}

.calculator__stat-value {
	font-size: 28px;
	font-weight: 700;
	color: #ffffff;
}

.calculator__stat-value--accent {
	color: #ffffff;
}

.calculator__footer {
	text-align: center;
}

.calculator__button {
	display: block;
	max-width: 350px;
	margin: 0 auto;
	padding: 18px 30px;
	background: #046bd2;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	border: none;
	border-radius: 50px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 20px rgba(88, 0, 145, 0.4);
}

.calculator__button:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 30px rgba(88, 0, 145, 0.6);
	background: #4a0079;
}

.calculator__button:active {
	transform: translateY(-1px);
}

.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.modal.active {
	display: block;
	opacity: 1;
}

.modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
}

.modal__content {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.9);
	background: #ffffff;
	border-radius: 20px;
	padding: 40px;
	max-width: 600px;
	width: 90%;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(88, 0, 145, 0.3);
	transition: transform 0.3s ease;
}

.modal.active .modal__content {
	transform: translate(-50%, -50%) scale(1);
}

.modal__close {
	position: absolute;
	top: 15px;
	right: 15px;
	width: 40px;
	height: 40px;
	background: transparent;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #000000;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.modal__close:hover {
	color: #580091;
	transform: rotate(90deg);
}

.modal__body {
	margin-top: 20px;
}

.modal__body h3 {
	font-size: 28px;
	font-weight: 700;
	color: #2f2320;
	margin-bottom: 20px;
}

.modal__body p {
	font-size: 16px;
	color: #6b6563;
	line-height: 1.6;
}

@media (max-width: 900px) {
	.calculator__body {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	
	/* Make result block appear first on mobile */
	.calculator__result {
		order: -1;
	}
}

@media (max-width: 768px) {
	.section-calculator {
		margin-top: 60px;
		margin-bottom: 60px;
	}
	
	.section-calculator__title {
		font-size: 28px;
	}
	
	.section-calculator__subtitle {
		font-size: 16px;
		margin-bottom: 40px;
	}
	
	.calculator__controls {
		gap: 24px;
	}
	
	.calculator__control-value {
		font-size: 24px;
	}
	
	.calculator__control-unit {
		font-size: 16px;
	}
	
	.calculator__result {
		padding: 24px 20px;
	}
	
	.calculator__result-header {
		margin-bottom: 28px;
	}
	
	.calculator__result-label {
		font-size: 16px;
		margin-bottom: 12px;
	}
	
	.calculator__result-total {
		font-size: 32px;
	}
	
	.calculator__result-stats {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	
	.calculator__stat {
		padding: 16px 12px;
	}
	
	.calculator__stat-label {
		font-size: 11px;
		margin-bottom: 8px;
	}
	
	.calculator__stat-value {
		font-size: 22px;
	}
	
	.calculator__footer {
		margin-top: 32px;
	}
	
	.calculator__button {
		padding: 16px 32px;
		font-size: 16px;
		width: 100%;
		max-width: 100%;
	}
 
	.modal__content {
		padding: 30px 20px;
		width: 95%;
		max-height: 90vh;
	}

	.modal__body h3 {
		font-size: 24px;
	}
}
