/* Tailwindユーティリティだけでは表現しづらい細部の調整。 */

/* トップページ・一覧ページの絞り込みチップ(sr-onlyなcheckbox + labelで実装)の選択状態 */
.sodachi-toggle-chip:has(input:checked) {
	background: #FFC401;
	border-color: transparent;
	color: #111;
	font-weight: 700;
}

/* お気に入りボタン(ハートアイコン)のアクティブ状態。JSでの動的なクラス付け外しを
   Tailwindのビルド(JITスキャン)に依存させず確実に反映させるため、専用クラスをここで定義する。 */
.icon.sodachi-favorited {
	color: #f87171;
	fill: #f87171;
}

/* details のマーカー(三角)を消す(chevronアイコンで表現するため) */
details > summary {
	list-style: none;
}
details > summary::-webkit-details-marker {
	display: none;
}
details[open] .icon[class*="chevron-down"],
details[open] summary .icon {
	transform: rotate(180deg);
}

/* WYSIWYG本文(マガジン記事・施設の紹介文詳細)の装飾。
   @tailwindcss/typographyプラグインを導入していないため(prose系クラスはTailwind側では
   何も生成されない)、the_content() 等が出力する生HTMLの見た目をここで手動定義している。
   後日プラグインを導入する場合はこのブロックと重複するため要調整。 */
.prose {
	color: #111;
	line-height: 2.1;
}
.prose :where(h2) {
	margin: 1.75em 0 0.75em;
	padding-bottom: 0.5em;
	border-bottom: 2px solid #FFC401;
	font-size: 1.35em;
	font-weight: 800;
	color: #222;
	line-height: 1.4;
}
.prose :where(h2):first-child {
	margin-top: 0;
}
.prose :where(h3) {
	position: relative;
	margin: 1.5em 0 0.6em;
	padding-left: 0.85em;
	font-size: 1.15em;
	font-weight: 800;
	color: #222;
	line-height: 1.5;
}
.prose :where(h3)::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.15em;
	bottom: 0.15em;
	width: 4px;
	border-radius: 2px;
	background: #FFC401;
}
.prose :where(h4) {
	margin: 1.25em 0 0.5em;
	font-size: 1em;
	font-weight: 700;
	color: #222;
}
.prose :where(p) {
	margin: 0 0 1em;
}
.prose :where(ul, ol) {
	margin: 0 0 1em 1.4em;
}
.prose :where(ul) {
	list-style: disc;
}
.prose :where(ol) {
	list-style: decimal;
}
.prose :where(li) {
	margin: 0.35em 0;
}
.prose :where(li)::marker {
	color: #FFC401;
}
.prose :where(a) {
	color: #b98900;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.prose :where(a):hover {
	color: #222;
}
.prose :where(strong, b) {
	color: #222;
	font-weight: 700;
}
.prose :where(blockquote) {
	margin: 1.5em 0;
	padding: 0.75em 1.25em;
	border-left: 4px solid #FFC401;
	border-radius: 0 0.75rem 0.75rem 0;
	background: #FFFBEB;
	color: #57534e;
	font-style: italic;
}
.prose :where(blockquote p) {
	margin: 0;
}
.prose :where(img) {
	width: 100%;
	height: auto;
	margin: 1.5em 0;
	border-radius: 1rem;
}
.prose :where(figcaption) {
	margin-top: 0.5em;
	font-size: 0.8em;
	color: #9ca3af;
	text-align: center;
}
.prose :where(hr) {
	margin: 2em 0;
	border: none;
	border-top: 1px solid #e5e7eb;
}
.prose :where(code) {
	padding: 0.15em 0.4em;
	border-radius: 0.35em;
	background: #f3f4f6;
	color: #b91c1c;
	font-size: 0.875em;
}
.prose :where(pre) {
	margin: 1.5em 0;
	padding: 1em;
	border-radius: 0.75rem;
	overflow-x: auto;
	background: #1f2937;
	color: #f9fafb;
}
.prose :where(pre code) {
	padding: 0;
	background: none;
	color: inherit;
}
.prose :where(table) {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
	font-size: 0.9em;
}
.prose :where(th, td) {
	border: 1px solid #e5e7eb;
	padding: 0.6em 0.8em;
	text-align: left;
}
.prose :where(th) {
	background: #f9fafb;
	font-weight: 700;
	color: #222;
}

/* ページネーション(paginate_links()の素の出力にスタイルを当てる) */
.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.25rem;
	height: 2.25rem;
	padding: 0 0.5rem;
	margin: 0 0.15rem;
	border-radius: 0.75rem;
	font-size: 0.875rem;
	color: #6b7280;
	text-decoration: none;
}
.page-numbers.current {
	background: #FFC401;
	color: #111;
	font-weight: 700;
}
.page-numbers:hover:not(.current) {
	background: #f5f5f5;
}

/* リークレット地図ページは全画面表示のため、ボディの余白を消す */
body.map-view {
	overflow: hidden;
}

/* WordPressコアやプラグイン(Contact Form 7含む)が前提としている支援技術用の
   隠しテキスト。テーマ側で未定義だと素のテキストとしてそのまま見えてしまうため定義する。 */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Contact Form 7 の素の出力にサイトのデザインを当てる(施設ページの見学予約・
   お問い合わせフォーム等、埋め込み箇所すべてに共通で適用される) */
.wpcf7-form {
	font-size: 0.875rem;
}
.wpcf7-form p {
	margin: 0 0 1.5rem;
}
.wpcf7-form p:last-child {
	margin-bottom: 0;
}
.wpcf7-form label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #222;
	margin-bottom: 0.5rem;
	line-height: 1.4;
}
.wpcf7-form-control-wrap {
	display: block;
}
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.75rem;
	padding: 0.75rem 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #222;
	background: #f5f5f5;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="email"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form textarea::placeholder {
	color: #9ca3af;
}
.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
	outline: none;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(255, 196, 1, 0.4);
}
.wpcf7-form textarea {
	min-height: 9rem;
	resize: vertical;
}
.wpcf7-form input[type="submit"] {
	width: 100%;
	padding: 0.875rem;
	border-radius: 0.75rem;
	font-weight: 700;
	font-size: 0.9375rem;
	color: #111;
	background: #FFC401;
	border: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}
.wpcf7-form input[type="submit"]:hover {
	filter: brightness(1.05);
}
.wpcf7-form input[type="submit"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.wpcf7-spinner {
	margin: 0.75rem auto 0;
}
.wpcf7-form input[aria-invalid="true"],
.wpcf7-form textarea[aria-invalid="true"] {
	background: #fef2f2;
	box-shadow: 0 0 0 1px #fecaca;
}
.wpcf7-not-valid-tip {
	color: #d4183d;
	font-size: 0.75rem;
	font-weight: 500;
	margin-top: 0.375rem;
	display: block;
}
.wpcf7-response-output {
	margin: 1.5rem 0 0;
	padding: 0.875rem 1rem;
	border-radius: 0.75rem;
	font-size: 0.8125rem;
	line-height: 1.6;
	background: #f5f5f5;
	border: 1px solid rgba(0, 0, 0, 0.08);
	color: #444;
}
.wpcf7-form.sent .wpcf7-response-output {
	background: #ecfdf5;
	color: #047857;
	border-color: #a7f3d0;
}
.wpcf7-form.invalid .wpcf7-response-output,
.wpcf7-form.unaccepted .wpcf7-response-output,
.wpcf7-form.payment-required .wpcf7-response-output {
	background: #fef2f2;
	color: #b91c1c;
	border-color: #fecaca;
}
