/* Material Calculator — Banner */
.material-calc-banner {
	position: relative;
	max-width: 1410px;
	margin: 80px auto 0;
	min-height: 260px;
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 20px;
	overflow: hidden;
	margin-left: 40px;
	margin-right: 40px;
}

@media (min-width: 1490px) {
	.material-calc-banner {
		margin-left: auto;
		margin-right: auto;
	}
}

.material-calc-banner::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.55);
	border-radius: 20px;
}

.material-calc-banner-content {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 40px 20px;
}

.material-calc-banner-title {
	font-size: 36px;
	font-weight: 500;
	color: #fff;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin: 0 0 12px 0;
}

.material-calc-banner-subtitle {
	font-size: 16px;
	font-weight: 300;
	color: rgba(255, 255, 255, 0.8);
	margin: 0 0 30px 0;
	letter-spacing: 0.5px;
}

.material-calc-toggle-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	border: 2px solid #CAA05C;
	color: #fff;
	background: transparent;
	padding: 14px 40px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

.material-calc-toggle-btn:hover {
	background: #CAA05C;
	color: #fff;
	transform: translateY(-2px);
}

.material-calc-toggle-btn:active {
	transform: translateY(0);
}

.material-calc-arrow {
	display: none;
}

/* Material Calculator — Modal Overlay */
.material-calc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9998;
	background: rgba(0, 0, 0, 0);
	overflow: hidden;
	overscroll-behavior: none;
	pointer-events: none;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 40px 0;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: background 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.material-calc-overlay.open {
	background: rgba(0, 0, 0, 0.6);
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

/* Material Calculator — Modal Popup */
.material-calc-collapse {
	width: 90%;
	max-width: 640px;
	max-height: calc(100vh - 80px);
	flex-shrink: 0;
	margin: auto 0;
	background: #fcfcfc;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
}

.material-calc-collapse-inner {
	position: relative;
	padding: 60px 20px 40px;
}

/* Material Calculator — Close Button */
.material-calc-close-btn {
	position: absolute;
	top: 12px;
	right: 16px;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease, color 0.2s ease;
	line-height: 1;
	z-index: 1;
}

.material-calc-close-btn:hover {
	background: #f0f0f0;
	color: #333;
}

html.material-calc-open,
body.material-calc-open {
	overflow: hidden;
	overscroll-behavior: none;
}

/* Material Calculator — Form Styles */
.material-calc-container {
	max-width: 600px;
	margin: 0 auto;
	text-align: left;
}

.material-calc-card {
	background: #fff;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	padding: 40px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.material-calc-subtitle {
	font-size: 15px;
	color: #666;
	margin: 0 0 30px 0;
	line-height: 1.6;
	text-align: center;
}

.material-calc-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.material-calc-row {
	display: flex;
	gap: 20px;
}

.material-calc-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.material-calc-field-full {
	flex: 1 1 100%;
}

.material-calc-field label {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	letter-spacing: 0.3px;
}

.material-calc-optional {
	font-size: 12px;
	font-weight: 400;
	color: #999;
	margin-left: 4px;
}

.material-calc-field input,
.material-calc-field select {
	padding: 12px 16px;
	border: 1.5px solid #eaeaea;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	color: #333;
	background: #fcfcfc;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	outline: none;
	width: 100%;
	box-sizing: border-box;
}

.material-calc-field input:focus,
.material-calc-field select:focus {
	border-color: #CAA05C;
	box-shadow: 0 0 0 3px rgba(202, 160, 92, 0.1);
}

.material-calc-field input::placeholder {
	color: #bbb;
}

.material-calc-btn {
	background: #CAA05C;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 14px 32px;
	font-size: 16px;
	font-weight: 500;
	font-family: inherit;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.2s ease;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin-top: 10px;
}

.material-calc-btn:hover {
	background: #b88d4a;
	transform: translateY(-2px);
}

.material-calc-btn:active {
	transform: translateY(0);
}

.material-calc-result {
	margin-top: 30px;
	padding: 24px;
	background: #faf6ee;
	border: 1px solid #e8d9b8;
	border-radius: 10px;
	text-align: center;
}

.material-calc-result-label {
	font-size: 13px;
	font-weight: 500;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-bottom: 8px;
}

.material-calc-result-value {
	font-size: 36px;
	font-weight: 600;
	color: #CAA05C;
}

.material-calc-disclaimer {
	font-size: 12.5px;
	color: #999;
	margin-top: 20px;
	line-height: 1.6;
	text-align: center;
	font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {
	.material-calc-banner {
		margin-left: 16px;
		margin-right: 16px;
		border-radius: 16px;
	}

	.material-calc-banner::before {
		border-radius: 16px;
	}

	.material-calc-banner-title {
		font-size: 24px;
	}

	.material-calc-banner-subtitle {
		font-size: 14px;
	}

	.material-calc-toggle-btn {
		padding: 12px 28px;
		font-size: 14px;
	}

	.material-calc-collapse {
		width: 95%;
		max-height: calc(100vh - 40px);
	}

	.material-calc-overlay {
		padding: 20px 0;
	}

	.material-calc-collapse-inner {
		padding: 50px 16px 24px;
	}

	.material-calc-close-btn {
		top: 8px;
		right: 10px;
	}

	.material-calc-card {
		padding: 24px 20px;
	}

	.material-calc-row {
		flex-direction: column;
		gap: 16px;
	}

	.material-calc-result-value {
		font-size: 28px;
	}
}
