/* Simulator page — WP native UI */

/* Light page background: keep header dark so logo text stays readable. */
body.bcraft-simulator-page {
	background: #efeae3;
}

body.bcraft-simulator-page .site-header {
	background: rgba(6, 8, 15, 0.94);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.simulator-page {
	background:
		radial-gradient(ellipse 80% 50% at 20% 0%, rgba(189, 154, 95, 0.12), transparent 55%),
		linear-gradient(180deg, #f7f5f2 0%, #efeae3 100%);
	min-height: 60vh;
}

.simulator-hero {
	padding: calc(var(--header-height) + 2rem) 0 1.25rem;
	text-align: center;
}

.simulator-hero-eyebrow {
	margin: 0 0 0.5rem;
	color: #bd9a5f;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1.2;
}

.simulator-hero h1 {
	font-family: "Shippori Mincho", "Noto Sans JP", serif;
	font-size: clamp(1.55rem, 2.8vw, 2.1rem);
	font-weight: 600;
	color: #33302c;
	margin: 0;
	letter-spacing: 0.04em;
	line-height: 1.35;
}

.simulator-app-section {
	padding: 0.75rem 0 3.5rem;
}

.simulator-app-container {
	max-width: 1120px;
}

.sim-status {
	color: #70675c;
	margin: 0 0 1rem;
	min-height: 1.25rem;
}

.sim-status:empty {
	display: none;
	margin: 0;
	min-height: 0;
}

.sim-layout {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
}

.sim-card {
	background: #fff;
	border: 1px solid #d0cac1;
	border-radius: 14px;
	padding: 1.5rem 1.35rem 1.4rem;
	box-shadow: 0 10px 30px rgba(51, 48, 44, 0.04);
}

.sim-card--wide {
	grid-column: 1 / -1;
}

.sim-card-head {
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid #ebe6df;
}

.sim-card-eyebrow {
	margin: 0 0 0.35rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	color: #bd9a5f;
}

.sim-card-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 700;
	color: #33302c;
	letter-spacing: 0.02em;
}

.sim-card-lead {
	margin: 0.45rem 0 0;
	font-size: 0.82rem;
	line-height: 1.55;
	color: #70675c;
}

.sim-subtitle {
	margin: 1rem 0 0.65rem;
	font-size: 0.9rem;
	color: #70675c;
}

.sim-form-section {
	padding: 1.05rem 0;
	border-bottom: 1px solid #ebe6df;
}

.sim-form-section:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.sim-form-section:first-of-type {
	padding-top: 0;
}

.sim-form-section-head {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	margin-bottom: 0.85rem;
}

.sim-form-step {
	flex: 0 0 auto;
	display: inline-grid;
	place-items: center;
	width: 1.55rem;
	height: 1.55rem;
	border-radius: 999px;
	background: #33302c;
	color: #f7f5f2;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
}

.sim-form-section-title {
	margin: 0;
	font-size: 0.92rem;
	font-weight: 700;
	color: #33302c;
}

.sim-form-section-desc {
	margin: 0.2rem 0 0;
	font-size: 0.75rem;
	line-height: 1.5;
	color: #8a8176;
}

.sim-loc-toggle {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.65rem;
}

.sim-loc-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 0.75rem 0.95rem;
	border: 1px solid #d0cac1;
	border-radius: 10px;
	background: #faf8f5;
	text-align: center;
	cursor: pointer;
	font: inherit;
	color: #33302c;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sim-loc-btn:hover {
	border-color: #bd9a5f;
}

.sim-loc-btn.is-active {
	border-color: #bd9a5f;
	background: #fff;
	box-shadow: 0 0 0 1px #bd9a5f, 0 6px 16px rgba(189, 154, 95, 0.12);
}

.sim-loc-btn-title {
	font-size: 0.95rem;
	font-weight: 700;
}

.sim-dim-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 0.55rem;
	align-items: end;
}

.sim-dim-grid .sim-field {
	margin-bottom: 0;
}

.sim-dim-sep {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 2.65rem;
	padding-bottom: 0.1rem;
	color: #8a8176;
	font-weight: 600;
	font-size: 1rem;
}

.sim-field {
	display: block;
	margin-bottom: 0.85rem;
}

.sim-field--distance {
	margin-bottom: 0;
}

.sim-distance-row {
	display: grid;
	grid-template-columns: minmax(7.5rem, 10.5rem) minmax(0, 1fr);
	gap: 0.75rem;
	align-items: stretch;
}

.sim-label {
	display: flex;
	align-items: baseline;
	gap: 0.4rem;
	margin-bottom: 0.35rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: #70675c;
}

.sim-field > span:not(.sim-stepper):not(.sim-label) {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.78rem;
	font-weight: 600;
	color: #70675c;
}

.sim-label-unit {
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: #a3988c;
}

.sim-stepper {
	display: flex;
	align-items: stretch;
	width: 100%;
	min-height: 2.65rem;
	border: 1px solid #d0cac1;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sim-stepper:focus-within {
	border-color: #bd9a5f;
	box-shadow: 0 0 0 3px rgba(189, 154, 95, 0.18);
}

.sim-stepper input[type="number"] {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	color: #33302c;
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.sim-stepper input:focus {
	outline: none;
	box-shadow: none;
}

.sim-stepper-controls {
	display: flex;
	flex-direction: column;
	flex: 0 0 2rem;
	width: 2rem;
	border-left: 1px solid #e6e0d7;
	background: #f7f5f2;
}

.sim-stepper-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 50%;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #70675c;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.sim-stepper-btn + .sim-stepper-btn {
	border-top: 1px solid #e6e0d7;
}

.sim-stepper-btn:hover {
	background: #efeae3;
	color: #33302c;
}

.sim-stepper-btn:active {
	background: #e7e0d6;
	color: #bd9a5f;
}

.sim-stepper-btn:focus-visible {
	outline: 2px solid #bd9a5f;
	outline-offset: -2px;
	z-index: 1;
}

.sim-field input,
.sim-field select,
.sim-field textarea {
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1px solid #d0cac1;
	border-radius: 8px;
	font: inherit;
	color: #33302c;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	font-variant-numeric: tabular-nums;
}

.sim-field input:focus,
.sim-field select:focus,
.sim-field textarea:focus {
	outline: none;
	border-color: #bd9a5f;
	box-shadow: 0 0 0 3px rgba(189, 154, 95, 0.18);
}

.sim-field-hint {
	margin: 0.55rem 0 0;
	font-size: 0.72rem;
	color: #8a8176;
}

.sim-pitch-insight {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 0.7rem 0.9rem;
	border: 1px solid #e2d6c2;
	border-radius: 8px;
	background: linear-gradient(135deg, #fbf7f0 0%, #f5efe4 100%);
	min-height: 100%;
}

.sim-pitch-insight-meta {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 0.65rem;
	margin-bottom: 0.2rem;
}

.sim-pitch-insight-label {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #8a6a3a;
}

.sim-pitch-insight-formula {
	font-size: 0.66rem;
	color: #9a8f82;
}

.sim-pitch-insight-value {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #33302c;
	font-variant-numeric: tabular-nums;
	line-height: 1.3;
}

.sim-toggle {
	display: inline-flex;
	gap: 0.35rem;
	padding: 0.25rem;
	border: 1px solid #d0cac1;
	border-radius: 999px;
	background: #f7f5f2;
}

.sim-toggle button {
	border: 0;
	background: transparent;
	padding: 0.45rem 1rem;
	border-radius: 999px;
	color: #70675c;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.sim-toggle button.is-active {
	background: #33302c;
	color: #f7f5f2;
}

.sim-products {
	display: grid;
	gap: 0.55rem;
}

.sim-product {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	width: 100%;
	padding: 0.85rem 0.95rem;
	border: 1px solid #d0cac1;
	border-radius: 10px;
	background: #faf8f5;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: #33302c;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.sim-product:hover {
	border-color: #bd9a5f;
}

.sim-product strong {
	font-size: 0.92rem;
}

.sim-product span {
	font-size: 0.78rem;
	color: #70675c;
	font-variant-numeric: tabular-nums;
}

.sim-product.is-selected {
	border-color: #bd9a5f;
	box-shadow: 0 0 0 1px #bd9a5f, 0 6px 16px rgba(189, 154, 95, 0.12);
	background: #fff;
}

.sim-result-list {
	margin: 0;
}

.sim-result-list > div {
	display: grid;
	grid-template-columns: 38% 1fr;
	gap: 0.5rem;
	padding: 0.45rem 0;
	border-bottom: 1px solid #ebe6df;
}

.sim-result-list dt {
	margin: 0;
	color: #70675c;
	font-size: 0.82rem;
}

.sim-result-list dd {
	margin: 0;
	text-align: right;
	font-weight: 600;
	font-size: 0.88rem;
	color: #33302c;
}

.sim-result-list dd.multiline {
	white-space: pre-line;
	line-height: 1.4;
}

.sim-disclaimers {
	margin-top: 1.15rem;
	padding-top: 0.95rem;
	border-top: 1px solid #ebe6df;
}

.sim-disclaimers p,
.sim-disclaimers span {
	margin: 0.4rem 0 0;
	font-size: 0.74rem;
	font-weight: 600;
	color: #b42318;
	line-height: 1.55;
}

.sim-disclaimers p:first-child {
	margin-top: 0;
}

.sim-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	margin-top: 1.2rem;
}

.sim-actions .btn {
	flex: 1 1 calc(50% - 0.35rem);
	min-width: 9.5rem;
	justify-content: center;
	text-align: center;
	border-radius: 8px;
	background: #fff;
	color: #33302c;
	border: 2px solid #c4bbb0;
	box-shadow: none;
}

.sim-actions .btn:hover {
	background: #f7f5f2;
	color: #33302c;
	border-color: #bd9a5f;
	transform: none;
	box-shadow: none;
}

.sim-actions .btn-primary,
.sim-actions .btn-outline {
	background: #fff;
	color: #33302c;
	border-color: #c4bbb0;
	box-shadow: none;
}

.sim-actions .btn-primary:hover,
.sim-actions .btn-outline:hover {
	background: #f7f5f2;
	color: #33302c;
	border-color: #bd9a5f;
	transform: none;
	box-shadow: none;
}

.sim-ad-link-wrap {
	margin: 0.95rem 0 0;
	text-align: center;
}

.sim-ad-link {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.84rem;
	font-weight: 600;
	color: #8a6a3a;
	text-decoration: none;
	border-bottom: 1px solid rgba(189, 154, 95, 0.45);
	padding-bottom: 0.1rem;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.sim-ad-link::after {
	content: '→';
	font-size: 0.8em;
}

.sim-ad-link:hover {
	color: #33302c;
	border-bottom-color: #bd9a5f;
}

.sim-note {
	margin: 0.35rem 0 0.75rem;
	font-size: 0.8rem;
	color: #70675c;
	line-height: 1.5;
}

.sim-empty {
	margin: 0;
	color: #70675c;
	font-size: 0.9rem;
}

.sim-param-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.sim-params.is-locked,
[data-el="params"].is-locked {
	opacity: 0.72;
}

.sim-metric-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.75rem;
	margin: 1rem 0;
}

.sim-metric-card {
	border: 1px solid #d0cac1;
	border-radius: 10px;
	padding: 0.85rem;
	background: #faf8f5;
}

.sim-metric-card h3 {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 500;
	color: #70675c;
}

.sim-metric-card .value {
	margin: 0.35rem 0;
	font-size: 1rem;
	font-weight: 700;
	color: #33302c;
}

.sim-metric-card .formula {
	margin: 0;
	font-size: 0.72rem;
	color: #70675c;
	line-height: 1.4;
}

.sim-year-bars {
	display: flex;
	align-items: flex-end;
	gap: 0.5rem;
	height: 140px;
	margin: 1rem 0;
}

.sim-year-bar {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	height: 100%;
	text-align: center;
}

.sim-year-bar .bar {
	width: 100%;
	background: linear-gradient(180deg, #d4b57a, #bd9a5f);
	border-radius: 6px 6px 0 0;
	min-height: 8px;
}

.sim-year-bar span {
	margin-top: 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #1c1f26;
}

.sim-year-bar small {
	font-size: 0.72rem;
	font-weight: 600;
	color: #33302c;
}

.sim-table-wrap {
	overflow-x: auto;
}

.sim-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.84rem;
	color: #1c1f26;
}

.sim-table th,
.sim-table td {
	padding: 0.45rem 0.35rem;
	border-bottom: 1px solid #ebe6df;
	text-align: right;
	white-space: nowrap;
	color: #1c1f26;
}

.sim-table th {
	font-weight: 700;
}

.sim-table td.is-plus {
	color: #157a3a;
	font-weight: 700;
}

.sim-table td.is-minus {
	color: #b42318;
	font-weight: 700;
}

.sim-table th:first-child,
.sim-table td:first-child {
	text-align: left;
}

.sim-breakeven {
	margin: 0.85rem 0 0;
	font-weight: 600;
	color: #33302c;
}

.sim-modal[hidden] {
	display: none !important;
}

.sim-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(51, 48, 44, 0.45);
}

.sim-modal-panel {
	position: relative;
	width: min(440px, 100%);
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 12px;
	padding: 1.35rem 1.2rem 1.2rem;
	border: 1px solid #d0cac1;
}

.sim-modal-panel--quote {
	width: min(640px, 100%);
	padding: 1.5rem 1.35rem 1.35rem;
}

.sim-modal-panel h3 {
	margin: 0 0 0.5rem;
	color: #33302c;
}

.sim-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 0.65rem;
	border: 0;
	background: transparent;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	color: #70675c;
}

.sim-quote-form {
	display: grid;
	gap: 1rem;
	margin-top: 0.85rem;
}

.sim-form-group {
	margin: 0;
	padding: 0.95rem 0.95rem 1rem;
	border: 1px solid #ebe6df;
	border-radius: 10px;
	background: #faf8f5;
}

.sim-form-group legend {
	padding: 0 0.35rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: #33302c;
}

.sim-form-group-note {
	font-weight: 500;
	color: #8a8176;
	font-size: 0.74rem;
}

.sim-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 0.85rem;
}

.sim-form-grid .sim-field {
	margin-bottom: 0;
}

.sim-form-grid .sim-field--full {
	grid-column: 1 / -1;
}

.sim-req {
	display: inline-block;
	margin-left: 0.35rem;
	padding: 0.05rem 0.35rem;
	border-radius: 999px;
	background: rgba(180, 35, 24, 0.08);
	color: #b42318;
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	vertical-align: middle;
}

.sim-field-hint--block {
	margin: 0 0 0.65rem;
}

.sim-photo-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.55rem;
	margin-bottom: 0.7rem;
}

.sim-photo-item {
	position: relative;
	aspect-ratio: 4 / 3;
	border: 1px solid #d0cac1;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.sim-photo-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sim-photo-remove {
	position: absolute;
	top: 0.3rem;
	right: 0.3rem;
	width: 1.5rem;
	height: 1.5rem;
	border: 0;
	border-radius: 999px;
	background: rgba(51, 48, 44, 0.72);
	color: #fff;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.sim-photo-add {
	width: 100%;
	justify-content: center;
	border-color: #d0cac1 !important;
	color: #33302c !important;
	background: #fff !important;
	border-radius: 8px !important;
}

.sim-photo-add:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.sim-quote-error {
	margin: 0;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	background: rgba(180, 35, 24, 0.08);
	color: #b42318;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.45;
}

.sim-quote-submit {
	width: 100%;
	justify-content: center;
	border-radius: 8px !important;
}

.sim-modal-panel .btn-outline {
	border-color: #d0cac1;
	color: #33302c;
}

.sim-modal-panel .btn-primary {
	background: #33302c;
	box-shadow: none;
}

.sim-modal-panel .btn-primary:hover {
	background: #1f1d1b;
	transform: none;
	box-shadow: none;
}

/* /led CTA cards */
.simulator-cta-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin-top: 1.5rem;
}

.simulator-cta-card {
	display: block;
	padding: 1.75rem 1.5rem;
	background: #fff;
	border: 1px solid #d0cac1;
	border-radius: 12px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.simulator-cta-card:hover {
	border-color: #bd9a5f;
	box-shadow: 0 10px 28px rgba(51, 48, 44, 0.08);
	transform: translateY(-2px);
}

.simulator-cta-card h3 {
	margin: 0 0 0.5rem;
	font-size: 1.15rem;
	color: #33302c;
}

.simulator-cta-card p {
	margin: 0;
	color: #70675c;
	font-size: 0.9rem;
	line-height: 1.6;
}

.simulator-cta-card .cta-label {
	display: inline-block;
	margin-bottom: 0.65rem;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: #bd9a5f;
}

@media (max-width: 860px) {
	.sim-layout,
	.sim-param-grid,
	.sim-metric-cards,
	.simulator-cta-grid {
		grid-template-columns: 1fr;
	}

	.sim-dim-grid {
		grid-template-columns: 1fr;
		gap: 0.65rem;
	}

	.sim-dim-sep {
		display: none;
	}

	.sim-distance-row {
		grid-template-columns: 1fr;
	}

	.sim-form-grid {
		grid-template-columns: 1fr;
	}

	.sim-photo-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sim-field--distance {
		max-width: none;
	}

	.simulator-hero {
		padding-top: calc(var(--header-height) + 1.5rem);
		padding-bottom: 1rem;
	}

	.simulator-app-section {
		padding-bottom: 2.75rem;
	}
}
