/* ============================================================
   料金試算ページ [waku_estimate]

   方針：金額が主役。左で条件を組み、右（スマホは下）で合計が常に見える。
         数値は等幅・大きめにして、選択のたびに動くことが分かるようにする。
   ============================================================ */

.waku-est {
	--waku-orange: #f07800;
	--waku-orange-dark: #d96c00;
	--waku-yellow: #ffbf1f;
	--waku-ink: #2b2320;
	--waku-mute: #8a7a68;
	--waku-line: #f0e2d0;
	--waku-ok: #1a9c50;

	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 32px;
	align-items: start;
	color: var(--waku-ink);
	font-size: 15px;
	line-height: 1.7;
}
.waku-est * { box-sizing: border-box; }

/* --- セクション --- */
.waku-est__sec {
	background: #fff;
	border: 1px solid var(--waku-line);
	border-radius: 14px;
	padding: 22px 24px;
	margin-bottom: 18px;
}
.waku-est__sec--cov { background: #fffaf2; }
.waku-est__h {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 800;
	color: var(--waku-orange-dark);
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.waku-est__h small { font-size: 11px; font-weight: 600; color: var(--waku-mute); }

/* --- フォーム --- */
.waku-est__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.waku-est__f { display: block; margin-bottom: 14px; }
.waku-est__grid2 .waku-est__f { margin-bottom: 0; }
.waku-est__f > span {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: #5f544b;
	margin-bottom: 5px;
}
.waku-est__f em {
	font-style: normal;
	background: var(--waku-orange);
	color: #fff;
	font-size: 10px;
	border-radius: 4px;
	padding: 1px 5px;
	margin-left: 6px;
	vertical-align: 1px;
}
.waku-est__f input,
.waku-est__f select,
.waku-est__f textarea {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 15px;
	background: #fff;
	color: var(--waku-ink);
}
.waku-est__f input:focus,
.waku-est__f select:focus,
.waku-est__f textarea:focus {
	outline: 2px solid var(--waku-yellow);
	outline-offset: 1px;
	border-color: var(--waku-orange);
}
.waku-est__note { margin: 12px 0 0; font-size: 12px; color: var(--waku-mute); }
.waku-est__alert {
	margin: 12px 0 0;
	background: #fff6e4;
	border: 1px solid #f4dcae;
	border-radius: 9px;
	padding: 10px 12px;
	font-size: 12px;
	color: #9a6200;
	word-break: auto-phrase;
}
.waku-est__alert a {
	font-weight: 800;
	color: var(--waku-orange-dark);
	text-decoration: none;
	margin-left: 4px;
	font-feature-settings: "tnum";
}

/* --- 車種選択 --- */
.waku-est__cars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.waku-est__car {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 2px solid var(--waku-line);
	border-radius: 12px;
	padding: 10px 14px 10px 10px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}
.waku-est__car:hover { background: #fffaf3; }
.waku-est__car:has(input:checked) {
	border-color: var(--waku-orange);
	background: #fff6e9;
}
.waku-est__car input { accent-color: var(--waku-orange); width: 18px; height: 18px; flex: none; }

/* 満車の車種は選べない。押せないことが見て分かるようにする */
.waku-est__car.is-disabled {
	opacity: .5;
	cursor: not-allowed;
	background: #faf8f5;
}
.waku-est__car.is-disabled:hover { background: #faf8f5; }
.waku-est__car.is-disabled .waku-est__car-price { color: var(--waku-mute); }
.waku-est__car img,
.waku-est__car-noimg {
	width: 84px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	flex: none;
	background: #f4ede4;
}
.waku-est__car-body { flex: 1; min-width: 0; line-height: 1.4; }
.waku-est__car-body strong { display: block; font-size: 14px; font-weight: 800; }
.waku-est__car-body small { display: block; font-size: 11px; color: var(--waku-mute); }
.waku-est__car-right {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}
.waku-est__car-price {
	font-size: 15px;
	font-weight: 800;
	color: var(--waku-orange-dark);
	letter-spacing: -.01em;
	font-feature-settings: "tnum";
	white-space: nowrap;
}
.waku-est__h small.is-high { color: #c0392b; font-weight: 700; }
.waku-est__car-stock {
	flex: none;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 9px;
	border-radius: 999px;
}
.waku-est__car-stock.is-ok { background: #e7f6ed; color: var(--waku-ok); }
.waku-est__car-stock.is-full { background: #eee; color: #999; }

/* --- オプション行 --- */
.waku-est__rows { list-style: none; margin: 0; padding: 0; }
.waku-est__rows li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	border-bottom: 1px dashed var(--waku-line);
}
.waku-est__rows li:last-child { border-bottom: 0; }
/* 名前は縮んでよいが、潰れて縦書きにならないよう下限を持たせる */
.waku-est__rowname {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13px;
	line-height: 1.5;
	word-break: auto-phrase;
}
/* 何のための項目かを1行で添える。加入判断に必要な情報なので薄くしすぎない */
.waku-est__rowname small {
	display: block;
	margin-top: 3px;
	font-size: 11px;
	line-height: 1.6;
	color: #6b5c4a;
	word-break: auto-phrase;
}
.waku-est__rowyen {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	font-feature-settings: "tnum";
}
.waku-est__rowyen small { font-size: 10px; font-weight: 500; color: var(--waku-mute); }
.waku-est__rows select {
	width: 64px;
	padding: 6px 8px;
	border: 1px solid #ddd;
	border-radius: 8px;
	flex: none;
}
.waku-est__sw { display: flex; align-items: center; gap: 6px; flex: none; cursor: pointer; }
.waku-est__sw input { width: 18px; height: 18px; accent-color: var(--waku-orange); }
.waku-est__sw span { font-size: 12px; color: var(--waku-mute); }

/* --- 注意事項 --- */
.waku-est__acc {
	border-bottom: 1px solid var(--waku-line);
	padding: 10px 0;
}
.waku-est__acc summary {
	cursor: pointer;
	font-size: 13px;
	font-weight: 700;
	color: var(--waku-orange-dark);
}
.waku-est__acc div { font-size: 12px; color: #5f544b; padding-top: 8px; }
.waku-est__acc p { margin: 0 0 8px; }

/* --- お見積り --- */
.waku-est__side { position: relative; align-self: stretch; }
.waku-est__card {
	background: #fff;
	border: 2px solid var(--waku-line);
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 8px 28px -18px rgba(43,35,32,.4);
}
.waku-est__cardh {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 800;
	color: var(--waku-orange-dark);
	padding-bottom: 10px;
	border-bottom: 2px solid var(--waku-line);
}
.waku-est__sum { margin: 0 0 12px; }
.waku-est__sum div {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 10px;
	padding: 5px 0;
}
.waku-est__sum dt { font-size: 12px; color: #5f544b; margin: 0; line-height: 1.5; }
.waku-est__sum dd {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	font-feature-settings: "tnum";
}
.waku-est__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding-top: 12px;
	border-top: 1px solid var(--waku-line);
	font-size: 13px;
	font-weight: 700;
}
.waku-est__total strong {
	font-size: 28px;
	line-height: 1;
	letter-spacing: -.02em;
	color: var(--waku-orange-dark);
	font-feature-settings: "tnum";
}
.waku-est__tax { margin: 4px 0 14px; font-size: 11px; color: var(--waku-mute); text-align: right; }
.waku-est__btn {
	width: 100%;
	border: 0;
	border-radius: 999px;
	background: var(--waku-orange);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	padding: 14px 16px;
	cursor: pointer;
	box-shadow: 0 3px 0 var(--waku-orange-dark);
	transition: filter .15s ease, transform .05s ease;
}
.waku-est__btn:hover:not(:disabled) { filter: brightness(1.06); }
.waku-est__btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--waku-orange-dark); }
.waku-est__btn:disabled { background: #c9c2ba; box-shadow: none; cursor: default; }
.waku-est__err {
	margin: 10px 0 0;
	background: #fdecea;
	color: #c62828;
	border-radius: 8px;
	padding: 9px 12px;
	font-size: 12px;
}
.waku-est__pending { margin: 10px 0 0; font-size: 11px; color: var(--waku-mute); text-align: center; }

/* --- 完了 --- */
.waku-est__done { grid-column: 1 / -1; text-align: center; padding: 40px 20px; }

/* 追従用の目印。高さは持たせない */
.waku-est__mark { height: 0; }

/* --- スマホ：見積りを下部バーに --- */
@media screen and (max-width: 900px) {
	.waku-est { grid-template-columns: 1fr; gap: 0; }
	.waku-est__grid2 { grid-template-columns: 1fr; }
	.waku-est__side {
		position: fixed;
		left: 0; right: 0; bottom: 0;
		z-index: 60;
		padding: 0;
	}
	.waku-est__card {
		border-radius: 14px 14px 0 0;
		border-width: 1px 0 0;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		box-shadow: 0 -6px 20px -12px rgba(43,35,32,.45);
	}
	.waku-est__cardh,
	.waku-est__sum,
	.waku-est__tax,
	.waku-est__pending { display: none; }
	.waku-est__total { border-top: 0; padding-top: 0; margin-bottom: 8px; }
	.waku-est__total strong { font-size: 24px; }
	.waku-est__btn { padding: 12px 16px; }
	/* 下部バーに隠れないよう余白を確保 */
	.waku-est__main { padding-bottom: 130px; }
	.waku-est__car img, .waku-est__car-noimg { width: 68px; height: 46px; }

	/* オプション行：名前を1行目、金額と選択を2行目に折り返す */
	.waku-est__rows li {
		flex-wrap: wrap;
		gap: 6px 10px;
		padding: 12px 0;
	}
	.waku-est__rowname { flex: 1 1 100%; font-size: 13px; }
	.waku-est__rowyen { margin-left: auto; }
	.waku-est__sec { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.waku-est__btn, .waku-est__car { transition: none; }
}
