/* =========================================================
   FOAM WEDGE COST CALCULATOR — Styles
   Mobile-first: base → tablet (737px) → desktop (981px)
   ========================================================= */

/* ---------------------------------------------------------
   CALCULATOR CARD
   --------------------------------------------------------- */

.calculator-card {
	max-width: 720px;
	margin: 0 auto;
	background: var(--bg-card);
	border: 1px solid var(--gold-border);
	border-radius: 12px;
	padding: 2em 1.5em;
}

/* ---------------------------------------------------------
   INPUTS
   --------------------------------------------------------- */

.calc-inputs {
	display: flex;
	flex-direction: column;
	gap: 1.5em;
}

.calc-field label {
	display: block;
	font-family: 'Playfair Display', serif;
	font-weight: 600;
	font-size: 1.1em;
	color: var(--text-heading);
	margin-bottom: 0.5em;
}

.input-with-unit {
	display: flex;
	align-items: center;
	gap: 0;
	max-width: 200px;
}

.input-unit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--bg-warm);
	border: 1px solid var(--gold-border);
	border-right: none;
	border-radius: 8px 0 0 8px;
	font-family: 'DM Sans', sans-serif;
	font-size: 1.1em;
	font-weight: 600;
	color: var(--text-heading);
}

.calc-field input[type="number"] {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	border: 1px solid var(--gold-border);
	border-radius: 0 8px 8px 0;
	font-family: 'DM Sans', sans-serif;
	font-size: 1.1em;
	color: var(--text-heading);
	background: var(--bg-white);
	-moz-appearance: textfield;
}

.calc-field input[type="number"]::-webkit-outer-spin-button,
.calc-field input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.calc-field input[type="number"]:focus {
	outline: none;
	border-color: var(--gold);
	box-shadow: 0 0 0 2px rgba(156, 124, 84, 0.15);
}

.select-wrap {
	max-width: 280px;
}

.select-wrap select {
	width: 100%;
	height: 48px;
	padding: 0 12px;
	border: 1px solid var(--gold-border);
	border-radius: 8px;
	font-family: 'DM Sans', sans-serif;
	font-size: 1em;
	color: var(--text-heading);
	background: var(--bg-white);
	cursor: pointer;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239C7C54' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
}

.select-wrap select:focus {
	outline: none;
	border-color: var(--gold);
	box-shadow: 0 0 0 2px rgba(156, 124, 84, 0.15);
}

.calc-hint {
	margin-top: 0.4em;
	font-size: 0.85em;
	color: #888;
	line-height: 1.4;
}

.calc-submit {
	align-self: flex-start;
	margin-top: 0.5em;
	font-size: 1.1em;
	cursor: pointer;
}

/* ---------------------------------------------------------
   RESULTS
   --------------------------------------------------------- */

.calc-results {
	display: none;
	margin-top: 2.5em;
	padding-top: 2em;
	border-top: 2px solid var(--gold-divider);
}

.calc-results.visible {
	display: block;
	animation: fadeSlideIn 0.5s ease-out;
}

@keyframes fadeSlideIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.results-header h3 {
	font-family: 'Playfair Display', serif;
	font-size: 1.5em;
	color: var(--text-heading);
	margin-bottom: 1em;
	text-align: center;
}

/* ---------------------------------------------------------
   RESULT BOXES (side by side)
   --------------------------------------------------------- */

.results-summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.8em;
	margin-bottom: 1.5em;
}

.result-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.5em;
	border-radius: 10px;
	width: 100%;
}

.result-wedge {
	background: #faf5f0;
	border: 1px solid #e8ddd0;
}

.result-bedbinder {
	background: rgba(156, 124, 84, 0.08);
	border: 2px solid var(--gold);
}

.result-label {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.9em;
	font-weight: 500;
	color: var(--text-body);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 0.3em;
}

.result-amount {
	font-family: 'Playfair Display', serif;
	font-weight: 700;
	font-size: 2.4em;
	color: var(--text-heading);
	line-height: 1.1;
}

.result-bedbinder .result-amount {
	color: var(--gold);
}

.result-note {
	font-size: 0.85em;
	color: #888;
	margin-top: 0.3em;
}

.result-vs {
	font-family: 'Playfair Display', serif;
	font-weight: 600;
	font-size: 1.1em;
	color: var(--gold);
}

/* ---------------------------------------------------------
   SAVINGS CALLOUT
   --------------------------------------------------------- */

.savings-callout {
	background: rgba(156, 124, 84, 0.06);
	border-left: 4px solid var(--gold);
	padding: 1.2em 1.5em;
	border-radius: 0 8px 8px 0;
	margin-bottom: 2em;
	text-align: center;
}

.savings-line {
	font-family: 'DM Sans', sans-serif;
	font-size: 1.15em;
	color: var(--text-heading);
	margin-bottom: 0.3em;
}

.savings-line strong {
	color: var(--gold);
	font-size: 1.2em;
}

.savings-sub {
	font-size: 0.9em;
	color: var(--text-body);
	margin: 0;
}

/* ---------------------------------------------------------
   BAR CHART
   --------------------------------------------------------- */

.chart-section {
	margin-bottom: 2em;
}

.chart-section h3 {
	font-family: 'Playfair Display', serif;
	font-size: 1.3em;
	color: var(--text-heading);
	margin-bottom: 1em;
	text-align: center;
}

.chart-container {
	display: flex;
	flex-direction: column;
	gap: 1.2em;
}

.chart-row {
	display: flex;
	align-items: center;
	gap: 0.8em;
}

.chart-label {
	flex-shrink: 0;
	width: 60px;
	font-family: 'DM Sans', sans-serif;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--text-heading);
	text-align: right;
}

.chart-bars {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.chart-bar {
	height: 28px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	min-width: 60px;
	transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bar-wedge {
	background: #e8ddd0;
}

.bar-bedbinder {
	background: var(--gold);
}

.bar-value {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.8em;
	font-weight: 600;
	white-space: nowrap;
}

.bar-wedge .bar-value {
	color: var(--text-heading);
}

.bar-bedbinder .bar-value {
	color: #ffffff;
}

.chart-legend {
	display: flex;
	justify-content: center;
	gap: 1.5em;
	margin-top: 1em;
}

.legend-item {
	font-family: 'DM Sans', sans-serif;
	font-size: 0.85em;
	color: var(--text-body);
	display: flex;
	align-items: center;
	gap: 6px;
}

.legend-item::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
}

.legend-wedge::before {
	background: #e8ddd0;
}

.legend-bedbinder::before {
	background: var(--gold);
}

/* ---------------------------------------------------------
   RESULTS CTA
   --------------------------------------------------------- */

.results-cta {
	text-align: center;
	padding-top: 1.5em;
	border-top: 1px solid var(--gold-divider);
}

.results-cta h3 {
	font-family: 'Playfair Display', serif;
	font-size: 1.4em;
	color: var(--text-heading);
	margin-bottom: 0.4em;
}

.results-cta p {
	color: var(--text-body);
	margin-bottom: 1em;
}

.results-cta-sub {
	font-size: 0.85em;
	color: #888;
	margin-top: 0.8em;
}

/* ---------------------------------------------------------
   TOOL HERO
   --------------------------------------------------------- */

.tool-hero {
	background: var(--bg-warm);
}

.tool-hero .content header h1 {
	font-family: 'Playfair Display', serif;
	color: var(--text-heading);
}

/* ---------------------------------------------------------
   TABLET (min-width: 737px)
   --------------------------------------------------------- */

@media (min-width: 737px) {

	.calculator-card {
		padding: 2.5em 2.5em;
	}

	.results-summary {
		flex-direction: row;
		justify-content: center;
		gap: 1em;
	}

	.result-box {
		width: auto;
		flex: 1;
		max-width: 280px;
	}

	.result-vs {
		align-self: center;
	}

	.chart-bar {
		height: 32px;
	}

	.chart-label {
		width: 70px;
	}
}

/* ---------------------------------------------------------
   DESKTOP (min-width: 981px)
   --------------------------------------------------------- */

@media (min-width: 981px) {

	.calculator-card {
		padding: 3em 3em;
	}

	.calc-inputs {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: flex-end;
		gap: 2em;
	}

	.calc-field {
		flex: 1;
		min-width: 200px;
	}

	.calc-submit {
		align-self: flex-end;
		margin-bottom: 1.6em;
	}

	.result-amount {
		font-size: 2.8em;
	}

	.chart-bar {
		height: 36px;
	}

	.chart-label {
		width: 80px;
		font-size: 0.9em;
	}
}
