/*
 * 農機具買取事例検索システム フロント用スタイル
 *
 * モバイルファースト。SWELLの本文スタイルを壊さないよう、
 * 指定は .ntpc-wrap 配下に限定し、見出しの装飾も控えめにする。
 */

.ntpc-wrap {
	--ntpc-border: #e0e0e0;
	--ntpc-bg-soft: #f7f7f5;
	--ntpc-accent: #FF6600;
	--ntpc-text-muted: #666;
	margin: 2em 0;
	font-size: 15px;
	line-height: 1.7;
}

/* ------------------------------------------------------------------
 * 検索フォーム
 * --------------------------------------------------------------- */

.ntpc-search {
	background: var(--ntpc-bg-soft);
	border: 1px solid var(--ntpc-border);
	border-radius: 8px;
	padding: 1.2em 1em;
	/*
	 * 検索後にこの位置へ戻ってくる（form の action が #ntpc-search-N）。
	 * 固定ヘッダーの下に潜り込まないよう余白を確保する。
	 */
	scroll-margin-top: 90px;
}

.ntpc-search__title {
	margin: 0 0 0.8em;
	font-size: 1.05em;
	font-weight: 700;
	line-height: 1.4;
}

.ntpc-search__form {
	display: block;
}

.ntpc-field {
	margin-bottom: 0.6em;
}

.ntpc-field__label {
	display: block;
	margin-bottom: 0.3em;
	font-size: 0.9em;
	font-weight: 700;
	color: var(--ntpc-text-muted);
}

.ntpc-field__select {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 0.6em 0.7em;
	font-size: 16px; /* iOSで拡大されないよう16px以上にする */
	line-height: 1.4;
	border: 1px solid #c8c8c8;
	border-radius: 6px;
	background-color: #fff;
	box-sizing: border-box;
}

.ntpc-field__hp {
	margin: 0.4em 0 0.9em;
	min-height: 1.5em;
	font-size: 1.15em;
	font-weight: 700;
}

.ntpc-field__hp:empty {
	margin-bottom: 0.3em;
	min-height: 0;
}

.ntpc-button {
	display: block;
	width: 100%;
	padding: 0.85em 1em;
	font-size: 1em;
	font-weight: 700;
	color: #fff;
	background: var(--ntpc-accent);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	text-align: center;
}

.ntpc-button:hover {
	opacity: 0.88;
}

.ntpc-error {
	margin: 0 0 0.8em;
	padding: 0.6em 0.8em;
	background: #fff4f4;
	border-left: 3px solid #d33;
	font-size: 0.92em;
}

/* ------------------------------------------------------------------
 * 検索結果
 * --------------------------------------------------------------- */

.ntpc-result,
.ntpc-reference {
	margin-top: 1.8em;
}

.ntpc-result__title,
.ntpc-reference__title {
	margin: 0 0 0.4em;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.4;
}

.ntpc-result__hp {
	margin: 0 0 0.8em;
	font-size: 1.05em;
	font-weight: 700;
	color: var(--ntpc-text-muted);
}

.ntpc-result__empty {
	margin: 0.5em 0 1em;
	padding: 0.9em 1em;
	background: var(--ntpc-bg-soft);
	border-radius: 6px;
}

.ntpc-reference__lead {
	margin: 0 0 0.9em;
	font-size: 0.9em;
	color: var(--ntpc-text-muted);
}

/* サマリー（件数・最高・最低） */

.ntpc-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6em;
	margin-bottom: 1em;
}

.ntpc-summary__item {
	flex: 1 1 auto;
	min-width: 8.5em;
	padding: 0.7em 0.9em;
	background: var(--ntpc-bg-soft);
	border: 1px solid var(--ntpc-border);
	border-radius: 6px;
}

.ntpc-summary__label {
	display: block;
	font-size: 0.82em;
	color: var(--ntpc-text-muted);
}

.ntpc-summary__value {
	display: block;
	margin-top: 0.15em;
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.3;
}

.ntpc-summary__value--price {
	color: #c0392b;
}

/* テーブル */

.ntpc-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-bottom: 1em;
}

.ntpc-table {
	width: 100%;
	min-width: 34em; /* これ以下は横スクロールさせる。文字を潰さない（仕様書 §49） */
	border-collapse: collapse;
	font-size: 0.92em;
}

.ntpc-table th,
.ntpc-table td {
	padding: 0.55em 0.7em;
	border: 1px solid var(--ntpc-border);
	text-align: left;
	vertical-align: middle;
	white-space: nowrap;
}

.ntpc-table thead th {
	background: var(--ntpc-bg-soft);
	font-size: 0.9em;
	font-weight: 700;
	color: var(--ntpc-text-muted);
}

.ntpc-table__price {
	font-weight: 700;
	white-space: nowrap;
}

.ntpc-table__model {
	font-weight: 700;
	background: #fcfcfb;
}

.ntpc-table--reference {
	min-width: 42em;
}

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

.ntpc-cta {
	margin-top: 1.8em;
	padding: 1.2em 1em;
	background: #fffaf5;
	border: 1px solid #ffd9b8;
	border-radius: 8px;
}

.ntpc-cta__heading {
	margin: 0 0 0.5em;
	font-size: 1.1em;
	font-weight: 700;
}

.ntpc-cta__description {
	margin-bottom: 1em;
	font-size: 0.95em;
}

.ntpc-cta__description p {
	margin: 0 0 0.6em;
}

.ntpc-cta__action {
	margin: 0;
}

.ntpc-cta__button {
	display: block;
	padding: 0.9em 1.2em;
	font-size: 1em;
	font-weight: 700;
	color: #fff !important;
	background: var(--ntpc-accent);
	border-radius: 6px;
	text-align: center;
	text-decoration: none !important;
	line-height: 1.5;
}

.ntpc-cta__button:hover {
	opacity: 0.88;
}

/* ------------------------------------------------------------------
 * CTAバナー（画像1枚をそのままリンクにする）
 * --------------------------------------------------------------- */

/*
 * 幅は買取事例テーブルと揃える（どちらも .ntpc-wrap いっぱい）。
 * テーマ側が本文中の a / img に余白・枠・最大幅を足してくることがあるので、
 * バナーに限って明示的に打ち消す。
 */
.ntpc-cta-banner {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 1.8em 0 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	overflow: hidden;
	line-height: 0;
	text-decoration: none !important;
	transition: opacity 0.15s ease;
}

.ntpc-cta-banner:hover {
	opacity: 0.9;
}

.ntpc-cta-banner:focus-visible {
	outline: 3px solid var(--ntpc-accent);
	outline-offset: 2px;
}

.ntpc-cta-banner__image {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: inherit;
	box-shadow: none;
}

/* ------------------------------------------------------------------
 * 注意書き・管理者向け表示
 * --------------------------------------------------------------- */

.ntpc-notice {
	margin: 1.4em 0;
	font-size: 0.95em;
	color: #4a4a4a;
	line-height: 1.8;
}

.ntpc-notice p {
	margin: 0 0 0.6em;
}

.ntpc-notice p:last-child {
	margin-bottom: 0;
}

.ntpc-admin-notice {
	margin: 1em 0;
	padding: 0.8em 1em;
	background: #fff8e5;
	border-left: 4px solid #dba617;
	font-size: 0.9em;
}

/* ------------------------------------------------------------------
 * PC
 * --------------------------------------------------------------- */

@media screen and (min-width: 600px) {

	.ntpc-search__form {
		display: flex;
		flex-wrap: wrap;
		align-items: flex-end;
		gap: 0.8em;
	}

	.ntpc-field {
		flex: 1 1 16em;
		margin-bottom: 0;
	}

	.ntpc-field__hp {
		flex: 0 0 auto;
		margin: 0 0 0.55em;
	}

	.ntpc-button {
		flex: 0 0 auto;
		width: auto;
		min-width: 12em;
	}

	.ntpc-cta__button {
		display: inline-block;
		min-width: 20em;
	}
}
