/*
 * 簡単見積もり（畳張替え計算機） スタイル
 * 元デザイン（元.html / Tailwind CSS）を素のCSSに書き起こしたもの。
 * すべてのクラスに .tec- 接頭辞を付け、テーマ側のスタイルとの衝突を防いでいます。
 */

.tec-app {
	--tec-light: #E8E4D9;
	--tec-green: #88A45C;
	--tec-dark: #4A5D23;
	--tec-accent: #C5A059;
	--tec-brown: #4A3B2A;

	width: 100%;
	padding: .5rem;
	border-radius: 1.5rem;
	font-family: "Noto Sans JP", sans-serif;
	background-color: #F9F9F7;
	color: var(--tec-brown);
	box-sizing: border-box;
}

.tec-app *,
.tec-app *::before,
.tec-app *::after {
	box-sizing: border-box;
}

@media (min-width: 640px) {
	.tec-app { padding: 1.5rem; }
}

@media (min-width: 1024px) {
	.tec-app { padding: 3rem; }
}

.tec-inner {
	max-width: 64rem;
	margin: 0 auto;
}

.tec-widget-title {
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--tec-dark);
	text-align: center;
	margin: 0 0 1.5rem;
}

@media (min-width: 640px) {
	.tec-widget-title { font-size: 1.625rem; }
}

.tec-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 1024px) {
	.tec-grid { grid-template-columns: repeat(5, 1fr); }
	.tec-col-form { grid-column: span 3; }
	.tec-col-result {
		grid-column: span 2;
		position: sticky;
		top: 2rem;
	}
}

.tec-col-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

/* --- カード --- */

.tec-card {
	background-color: #fff;
	border: 1px solid var(--tec-light);
	border-radius: 1.5rem;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
	overflow: hidden;
}

.tec-section {
	padding: 1.5rem;
	border-bottom: 1px solid var(--tec-light);
}

.tec-section:last-child {
	border-bottom: none;
	background-color: rgba(249, 250, 251, .3);
}

@media (min-width: 640px) {
	.tec-section { padding: 2rem; }
}

.tec-row {
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: 1.5rem;
}

.tec-label {
	font-weight: 700;
	color: var(--tec-dark);
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: 1.125rem;
	margin: 0 0 1.5rem;
}

.tec-row .tec-label {
	margin-bottom: 0;
}

.tec-badge {
	background-color: var(--tec-green);
	color: #fff;
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 9999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: .875rem;
	flex-shrink: 0;
}

/* --- 帖数 --- */

.tec-count {
	text-align: right;
}

.tec-count-num {
	font-size: 3rem;
	font-weight: 700;
	color: var(--tec-brown);
	line-height: 1;
}

.tec-count-unit {
	font-size: 1.25rem;
	font-weight: 700;
	margin-left: .25rem;
}

.tec-range {
	width: 100%;
	height: .75rem;
	background-color: #e5e7eb;
	border-radius: .5rem;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	margin: 0 0 .75rem;
	accent-color: var(--tec-green);
}

.tec-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	height: 24px;
	width: 24px;
	border-radius: 50%;
	background: var(--tec-green);
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
}

.tec-range::-moz-range-thumb {
	height: 24px;
	width: 24px;
	border-radius: 50%;
	background: var(--tec-green);
	cursor: pointer;
	border: 2px solid #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .1);
	appearance: none;
}

/* --- グレード選択 --- */

.tec-grades {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1rem;
}

.tec-grade-btn {
	appearance: none;
	-webkit-appearance: none;
	background-color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 1rem 0;
	border: 2px solid #f3f4f6;
	border-radius: 1rem;
	transition: background-color .15s ease, border-color .15s ease;
	cursor: pointer;
	font-family: inherit;
}

.tec-grade-btn:hover {
	background-color: #f9fafb;
}

.tec-grade-btn.is-active {
	border-color: var(--tec-green);
	background-color: rgba(136, 164, 92, .05);
	color: var(--tec-dark);
}

.tec-grade-name {
	font-size: 1.25rem;
	font-weight: 700;
}

.tec-grade-desc {
	font-size: .75rem;
	color: #6b7280;
}

.tec-grade-btn.is-active .tec-grade-desc {
	color: rgba(74, 93, 35, .7);
}

/* --- 仕様の詳細（施工内容によって切り替わるサブブロック） --- */

.tec-subblock {
	margin-bottom: 1.5rem;
}

.tec-subblock:last-child {
	margin-bottom: 0;
}

.tec-subblock-label {
	font-weight: 700;
	color: var(--tec-dark);
	font-size: 1rem;
	margin-bottom: .75rem;
}

.tec-subblock-desc {
	margin: .75rem 0 0;
	font-size: .8125rem;
	line-height: 1.6;
	color: #6b7280;
	min-height: 1.2em;
}

.tec-floor-options,
.tec-ura-options {
	grid-template-columns: repeat(2, 1fr);
}

/* --- 施工内容セレクト --- */

.tec-select {
	width: 100%;
	padding: 1rem;
	border: 1px solid #e5e7eb;
	border-radius: 1rem;
	background-color: #fff;
	cursor: pointer;
	font-family: inherit;
	font-size: 1rem;
	color: inherit;
}

/* --- 合計金額パネル --- */

.tec-result {
	background-color: var(--tec-dark);
	color: #fff;
	border-radius: 1.5rem;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
	padding: 2rem;
	text-align: center;
}

.tec-result-label {
	font-size: .875rem;
	opacity: .8;
	margin-bottom: .5rem;
	font-weight: 500;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.tec-result-price {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	letter-spacing: -.025em;
}

@media (min-width: 640px) {
	.tec-result-price { font-size: 3rem; }
}

.tec-result-detail {
	font-size: .875rem;
	opacity: .7;
	background-color: rgba(0, 0, 0, .2);
	padding: .75rem 1rem;
	border-radius: .75rem;
}

.tec-note {
	margin-top: 1rem;
	font-size: .75rem;
	line-height: 1.6;
	color: #9ca3af;
}

/* --- 相談・お問い合わせの案内（目立つボックス） --- */

.tec-cta {
	margin-top: 1.25rem;
	padding: 1.25rem 1.5rem;
	background-color: rgba(197, 160, 89, .12);
	border: 1px solid rgba(197, 160, 89, .4);
	border-radius: 1rem;
	text-align: left;
}

.tec-cta-badge {
	display: inline-block;
	padding: .25rem .75rem;
	margin-bottom: .5rem;
	background-color: var(--tec-accent);
	color: #fff;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .05em;
	border-radius: 9999px;
}

.tec-cta-text {
	margin: 0;
	font-size: .875rem;
	line-height: 1.8;
	color: var(--tec-brown);
}

/* --- 価格改定に関する注意文（ウィジェット全体の下） --- */

.tec-price-disclaimer {
	margin: 2rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--tec-light);
	font-size: .75rem;
	line-height: 1.6;
	color: #9ca3af;
	text-align: center;
}

/* --- 更新アニメーション --- */

.tec-fade-update {
	animation: tec-pulse .3s ease-in-out;
}

@keyframes tec-pulse {
	0% { transform: scale(1); }
	50% { transform: scale(1.05); color: var(--tec-green); }
	100% { transform: scale(1); }
}
