/*
Theme Name: 押上一丁目町会
Theme URI: https://oshiage.one/
Author: 押上一丁目町会 文化部
Author URI: https://oshiage.one/
Description: 墨田区押上一丁目町会の公式サイト用ブロックテーマ。高齢の役員さんが読める・使えることを最優先に、本文18px以上、ボタン56px以上、色に頼らない設計にしている。配色は町会の神輿の写真から採取。
Version: 0.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oshiage
Tags: block-theme, one-column, accessibility-ready
*/

/* ─────────────────────────────────────────────────────────────
   デザインの規定は theme.json 側にある。
   ここには theme.json で表現できないものだけを書くこと。

   守るべき制約（docs/yoyaku/01-requirements.md）
   - 本文 18px 以上、ボタン・タップ領域 56px 以上
   - 色だけで区別させない。必ず文字か形を併用する
     ★特に「金」と「空」は P型/D型の色覚特性では区別がつかない（1.1:1）
   - 1画面に情報を詰め込まない
   ───────────────────────────────────────────────────────────── */

/* タップ領域の下限。指で押すものはすべてこれ以上にする */
.wp-element-button,
.wp-block-button__link,
.oshiage-tap {
	min-height: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
}

/* 幅いっぱいのボタン（スマホでの主要導線）
   親の .wp-block-buttons が flex なので、ボタン自体にも幅を効かせる必要がある */
.wp-block-button.is-style-oshiage-block {
	width: 100%;
	flex-basis: 100%;
}
.wp-block-button.is-style-oshiage-block .wp-block-button__link {
	width: 100%;
	min-height: 64px;
}

/* 白抜きボタン。塗りとの違いを色ではなく「枠の有無」で示す */
.is-style-oshiage-outline .wp-block-button__link {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--ai);
	border: 3px solid var(--wp--preset--color--ai);
}

/* 見出しの飾り罫。金は装飾のみに使う（本文には使わない） */
.is-style-oshiage-bar {
	padding-left: var(--wp--preset--spacing--30);
	border-left: 6px solid var(--wp--preset--color--kin-l);
}

/* ── 折りたたみ（core/details）──
   開閉は色ではなく ＋ / − の形で示す。閉じていても中身が想像できるよう、
   見出しの下に1行の説明を置く運用にする。 */
.wp-block-details {
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.wp-block-details:first-of-type {
	border-top: 1px solid var(--wp--preset--color--line);
}
.wp-block-details > summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--wp--preset--spacing--30);
	min-height: 76px;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--20);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	color: var(--wp--preset--color--ai);
	line-height: 1.4;
}
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after {
	content: "";
	flex: none;
	width: 34px; height: 34px;
	border: 2.5px solid currentColor;
	border-radius: 50%;
	background:
		linear-gradient(currentColor, currentColor) center/16px 3px no-repeat,
		linear-gradient(currentColor, currentColor) center/3px 16px no-repeat;
}
.wp-block-details[open] > summary::after {
	background: linear-gradient(currentColor, currentColor) center/16px 3px no-repeat;
}
.wp-block-details > summary:hover { background: var(--wp--preset--color--sora-l); }
/* summary が flex なので、見出しと説明はひとつの箱にまとめて縦に積む */
.wp-block-details > summary .oshiage-ttl { display: block; }
.wp-block-details > summary .oshiage-sub {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
	color: #5a5a5a;
}

/* ── 写真を主役にするヒーロー ── */
.oshiage-hero img {
	display: block;
	width: 100%;
	height: 46vh;
	min-height: 300px;
	max-height: 420px;
	object-fit: cover;
	object-position: 50% 28%;
}

/* ── 準備中の告知帯。公開前の仮運用で使う ── */
.oshiage-draft {
	background: repeating-linear-gradient(45deg,
		#FFE14D, #FFE14D 14px, #1F1F1F 14px, #1F1F1F 28px);
	padding: 5px;
}
.oshiage-draft > p {
	margin: 0;
	background: var(--wp--preset--color--white);
	text-align: center;
	font-weight: 700;
	padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40);
	line-height: 1.5;
}

/* 画面には出さないが読み上げには残す（スキップリンク等） */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip-path: inset(50%);
	white-space: nowrap;
}
