/**
 * 市区町村絞り込み検索まわり専用スタイル。
 * フォーム・STEP・検索事例カード・検索結果ページ。
 */

/* --------------------------------
 * 検索セクション共通変数（STEP・フォームで共有）
 * -------------------------------- */
.yws-search-section,
.yws-city-find-presets {
	--yws-accent: #5d92d3;
	--yws-shadow-card: 0 8px 20px rgba(15, 23, 42, .05);
	--yws-shadow-btn: 0 8px 18px rgba(93, 146, 211, .22);
	--yws-fz-button: 0.95rem;
	--yws-fz-label: 0.92rem;
}

/* --------------------------------
 * STEPガイド
 * -------------------------------- */
.yws-search-section .yws-city-filter-form-steps {
	margin: 0 0 1.35em;
	padding: 14px 16px;
	border: 1px solid #dbe8f6;
	border-radius: 10px;
	background: linear-gradient(180deg, #f8fbff 0%, #f3f8fe 100%);
}

.yws-search-section .yws-city-filter-form-step {
	padding: 3px 0!important;
	color: #334155;
	font-size: 0.9em;
	line-height: 1.75;
}

.yws-search-section .yws-city-filter-form-step:last-child {
	margin-bottom: 0;
}

.yws-search-section .yws-city-filter-step {
	display: inline-block;
	min-width: 4.6em;
	margin-right: 0.65em;
	padding: 0.15em 0.65em;
	border-radius: 4px;
	background: #5d92d3;
	color: #fff;
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-align: center;
	vertical-align: baseline;
}

/* --------------------------------
 * 絞り込みフォーム
 * -------------------------------- */
.yws-filter-form {
	padding: 24px;
	border: 1px solid var(--yws-border-soft);
	border-radius: var(--yws-radius-lg);
	background: linear-gradient(180deg, #fff 0%, var(--yws-bg-soft) 100%);
	box-shadow: var(--yws-shadow-card);
}

.yws-search-section .yws-filter-form {
	--yws-accent: #5d92d3;
	--yws-shadow-card: 0 8px 20px rgba(15, 23, 42, .05);
	--yws-shadow-btn: 0 8px 18px rgba(93, 146, 211, .22);
	--yws-fz-button: 0.95rem;
	--yws-fz-label: 0.92rem;
}

.yws-filter-form .yws-filter-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 15px;
}

.yws-filter-form .yws-filter-item {
	padding: 10px 16px 16px;
	border: 1px solid var(--yws-border-soft);
	border-radius: var(--yws-radius-md);
	background: var(--yws-bg);
	transition:
		background-color .2s ease,
		border-color .2s ease,
		box-shadow .2s ease;
}

.yws-filter-form .yws-filter-item.is-filled {
	border-color: #bfdcff;
	background: #f3f9ff;
}

.yws-filter-form .yws-filter-item.is-error {
	border-color: #e57d7d;
	background: #fff8f8;
}

.yws-filter-form .yws-filter-label {
	display: inline-flex;
	margin: 0 0 8px;
	color: var(--yws-text);
	font-size: var(--yws-fz-label);
	font-weight: 700;
}

.yws-filter-form .yws-filter-unit {
	color: var(--yws-text-light);
	font-size: .92em;
	font-weight: 500;
}

.yws-filter-form .yws-filter-select,
.yws-filter-form .yws-filter-input {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 11px 12px;
	border: 1px solid var(--yws-border);
	border-radius: 10px;
	background: #fff;
	color: var(--yws-text);
	font-size: 14px;
	outline: none;
	transition:
		border-color .2s ease,
		box-shadow .2s ease,
		background-color .2s ease;
}

.yws-filter-form .yws-filter-select:focus,
.yws-filter-form .yws-filter-input:focus {
	border-color: var(--yws-accent);
	background: #fff;
	box-shadow: 0 0 0 4px rgba(93, 146, 211, .14);
}

.yws-filter-form .yws-filter-select {
	padding-right: 40px;
	appearance: none;
	-webkit-appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, #7c8aa5 50%),
		linear-gradient(135deg, #7c8aa5 50%, transparent 50%);
	background-position:
		calc(100% - 18px) calc(50% - 2px),
		calc(100% - 12px) calc(50% - 2px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

.yws-filter-form .yws-filter-range {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 8px;
	align-items: center;
}

.yws-filter-form .yws-filter-input::placeholder {
	color: #9aa3b2;
}

.yws-filter-form .yws-filter-error {
	display: none;
	margin: 8px 0 0;
	color: #c24141;
	font-size: .8rem;
	line-height: 1.5;
}

.yws-filter-form .yws-filter-item.is-error .yws-filter-error {
	display: block;
}

.yws-filter-form .yws-filter-mobile-toggle {
	display: block;
	margin-top: 16px;
}

.yws-filter-form .yws-filter-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	margin-top: 0;
	padding: 0 16px;
	border: 1px solid var(--yws-border);
	border-radius: 999px;
	background: #fff;
	color: var(--yws-text);
	cursor: pointer;
	font-size: var(--yws-fz-button);
	font-weight: 700;
	line-height: 1.4;
	transition:
		background-color .2s ease,
		border-color .2s ease,
		color .2s ease;
}

.yws-filter-form .yws-filter-more:hover,
.yws-filter-form .yws-filter-more:focus {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.yws-filter-form .yws-filter-collapsed {
	display: none;
}

.yws-filter-form .yws-filter-grid.is-expanded .yws-filter-collapsed {
	display: block;
}

.yws-filter-form .yws-filter-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--yws-border-soft);
}

.yws-filter-form .yws-filter-submit,
.yws-filter-form .yws-filter-reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	border-radius: 999px;
	text-decoration: none !important;
	font-size: var(--yws-fz-button);
	font-weight: 700;
	transition:
		background-color .2s ease,
		border-color .2s ease,
		color .2s ease,
		transform .2s ease;
}

.yws-filter-form .yws-filter-submit {
	padding: 0 50px;
	border: 1px solid var(--yws-accent);
	background: var(--yws-accent);
	color: #fff;
	box-shadow: var(--yws-shadow-btn);
	cursor: pointer;
}

.yws-filter-form .yws-filter-submit:hover,
.yws-filter-form .yws-filter-submit:focus {
	border-color: #4f84c6;
	background: #4f84c6;
	color: #fff;
	transform: translateY(-1px);
}

.yws-filter-form .yws-filter-reset {
	padding: 0 50px;
	border: 1px solid var(--yws-border);
	background: #fff;
	color: var(--yws-text-soft);
}

.yws-filter-form .yws-filter-reset:hover,
.yws-filter-form .yws-filter-reset:focus {
	border-color: #cbd5e1;
	background: #f8fafc;
	color: var(--yws-text);
}

/* --------------------------------
 * 検索事例カード
 * -------------------------------- */
.yws-city-find-presets .yws-city-find-preset-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 32px;
}

.yws-city-find-preset-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
	padding: 18px 18px 16px;
	border: 1px solid #dbe8f6;
	border-radius: 14px;
	background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
	box-shadow:
		0 4px 14px rgba(37, 99, 235, .06),
		0 1px 2px rgba(15, 23, 42, .04);
	transition:
		border-color .2s ease,
		box-shadow .2s ease,
		transform .2s ease;
}

.yws-city-find-preset-card:hover {
	border-color: #b8d4f0;
	box-shadow:
		0 10px 24px rgba(37, 99, 235, .1),
		0 2px 6px rgba(15, 23, 42, .05);
	transform: translateY(-2px);
}

.yws-city-find-preset-badge {
	display: inline-block;
	margin: 0 0 12px;
	padding: 2px 12px;
	border-radius: 999px;
	background: #fde8ef;
	border: 1px solid #f5b8ca;
	color: #c0365f;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	width: fit-content;
}

.yws-city-find-preset-card-title {
	margin: 0 0 10px;
	padding: 0;
	background: none;
	box-shadow: none;
	font-size: 1.02rem;
	line-height: 1.55;
}

.yws-city-find-preset-card-title-link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: inherit;
	text-decoration: none!important;
}

.yws-city-find-preset-card-title-link:hover {
	color: #2563eb;
}

.yws-city-find-preset-card-icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	color: #5d92d3;
}

.yws-city-find-preset-card-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.yws-city-find-preset-card-title-text {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 700;
}

.yws-city-find-preset-card-desc {
	color: #4b5563;
	font-size: .85em;
	padding: 0!important;
}

.yws-city-find-preset-card-action {
	margin: auto 0 0;
	text-align: right;
}

.yws-city-find-preset-card-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	text-decoration: none;
	color: #5d92d3;
}

.yws-city-find-preset-card-link::after {
	content: "→";
	transition: transform .2s ease;
}

.yws-city-find-preset-card:hover .yws-city-find-preset-card-link::after {
	transform: translateX(3px);
}

.yws-city-find-preset-card-link:hover {
	color: #2563eb;
	text-decoration: underline;
}

/* --------------------------------
 * 検索結果・プリセット結果ページ
 * -------------------------------- */
.yws-search-city-page .yws-lead {
	margin-bottom: 10px;
	line-height: 1.9;
}

.yws-search-city-page .yws-search-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px 16px;
	margin: 0 0 24px;
}

.yws-search-city-page .yws-notice {
	margin: 0;
	font-weight: 700;
	font-size: unset;
}

.yws-search-city-page .yws-refine-link-wrap {
	margin: 0;
}

.yws-search-city-page .yws-refine-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	text-decoration: none;
}

.yws-search-city-page .yws-refine-link::before {
	content: "←";
}

.yws-search-city-page .yws-refine-link:hover {
	text-decoration: underline;
}

.yws-search-city-page .yws-search-summary-list {
	list-style: none;
	margin: 20px 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
}

.yws-search-city-page .yws-search-summary-list li {
	display: inline-flex;
	align-items: center;
	padding: 7px 12px;
	background: #f7f7f7;
	border: 1px solid #dddddd;
	border-radius: 999px;
	font-size: 14px;
	line-height: 1.5;
}

.yws-search-city-page .yws-search-row-item:last-child {
	border: none;
}

.yws-search-city-page .yws-search-card-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.yws-search-city-page .yws-search-row-item {
	margin: 0;
	padding: 30px 0;
	border-bottom: 1px solid #e5e5e5;
}

.yws-search-city-page .yws-search-row-head {
	margin-bottom: 15px;
}

.yws-search-city-page .yws-search-row-title-line {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 14px;
}

.yws-search-city-page .yws-search-row-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #5d92d3;
	flex: 0 0 auto;
	background: none;
	border-radius: 0;
	margin: 4px -8px 0 0;
}

.yws-search-city-page .yws-ranking-name {
	display: inline-block;
	font-size: 1.15em;
	font-weight: 700;
	text-decoration: none;
}

.yws-search-city-page .yws-ranking-name:hover {
	text-decoration: underline;
}

.yws-search-city-page .yws-ranking-population {
	display: inline-block;
	color: #555;
	font-weight: 700;
	white-space: nowrap;
}

.yws-search-city-page .yws-search-result-metrics-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px 14px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.yws-search-city-page .yws-search-result-metrics-list li {
	padding: 8px 10px;
	background: #f8f8f8;
	border-radius: 6px;
	line-height: 1.6;
	font-size: 14px;
}

@media (max-width: 960px) {
	.yws-filter-form .yws-filter-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.yws-filter-form .yws-filter-submit,
	.yws-filter-form .yws-filter-reset {
		width: 100%;
	}

	.yws-city-find-presets .yws-city-find-preset-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.yws-search-city-page .yws-search-topline {
		align-items: flex-start;
	}

	.yws-search-city-page .yws-search-row-title-line {
		gap: 6px 10px;
	}

	.yws-search-city-page .yws-search-row-icon {
		width: 24px;
		height: 24px;
	}

	.yws-search-city-page .yws-search-result-metrics-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.yws-search-city-page .yws-search-summary-list li {
		font-size: 13px;
		padding: 6px 10px;
	}
}
