/*
Theme Name: Air G mo
Theme URI: https://airgmo.jp/
Author: Air G mo
Description: Air G mo（運命をデザインするトータルビューティーサロン）のためのブロックテーマ。色・文字・ヘッダー・フッターは叩き台デザインに合わせています。
Version: 1.0.23
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: airgmo
*/

a:hover {
	opacity: 0.75;
}

/* ロゴ下の英字 */
.agm-logo-sub {
	letter-spacing: 0.16em;
}

/* 小見出し（ラベル）: 例「HAIR / 歴史」 */
.is-style-agm-label {
	letter-spacing: 0.2em;
	font-weight: 700;
}

/* 年表の1行 */
.is-style-agm-timeline-row {
	border-top: 1px solid var(--wp--preset--color--rule);
}

/* スマホでナビの開閉ボタンを押しやすく */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	min-width: 44px;
	min-height: 44px;
}

/* フッターのリンク */
.agm-footer a {
	color: inherit;
}

/* 文章の折り返しを自然に */
body {
	text-wrap: pretty;
}

/* 応募フォーム（Contact Form 7） */
.wpcf7 form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border: 1px solid #DED2C3;
	border-radius: 16px;
	background: #FFFFFF;
}
.wpcf7 form p {
	margin: 0;
}
.wpcf7 label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
	font-weight: 700;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="email"],
.wpcf7 select,
.wpcf7 textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 44px;
	padding: 0 14px;
	border: 1px solid var(--wp--preset--color--rule);
	border-radius: 8px;
	background: var(--wp--preset--color--base);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	color: var(--wp--preset--color--contrast);
}
.wpcf7 textarea {
	padding: 12px 14px;
	min-height: 120px;
	resize: vertical;
}
.wpcf7 .wpcf7-acceptance {
	font-size: 13px;
}
.wpcf7 .wpcf7-acceptance a {
	text-decoration: underline;
}
.wpcf7 input[type="submit"] {
	width: 100%;
	min-height: 52px;
	margin-top: 4px;
	border: none;
	border-radius: 999px;
	background: var(--wp--preset--color--accent);
	color: #FFFFFF;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.wpcf7 .wpcf7-spinner {
	display: block;
	margin: 8px auto 0;
}
.wpcf7 .wpcf7-not-valid-tip {
	font-size: 12px;
	font-weight: 400;
}

/* 写真の切り抜き位置（叩き台の object-position を再現） */
.agm-pos-center img { object-position: 50% 50%; }
.agm-pos-center-15 img { object-position: 50% 15%; }
.agm-pos-center-20 img { object-position: 50% 20%; }
.agm-pos-center-25 img { object-position: 50% 25%; }
.agm-pos-center-30 img { object-position: 50% 30%; }
.agm-pos-center-35 img { object-position: 50% 35%; }
.agm-pos-center-40 img { object-position: 50% 40%; }

/* カードを並べたとき、最後のボタンをカードの下端にそろえる */
/* （横並びの行＝例「・＋文字」はそのまま横並びにする） */
.wp-block-group.is-layout-grid > .wp-block-group:not(.is-layout-flex) {
	display: flex;
	flex-direction: column;
}
.wp-block-group.is-layout-grid > .wp-block-group > .wp-block-buttons:last-child {
	margin-top: auto;
	padding-top: 14px;
}

/* 料金を右端にそろえ、説明文のほうを折り返す */
.agm-nowrap {
	white-space: nowrap;
	flex-shrink: 0;
	text-align: right;
}
.is-layout-flex:has(> .agm-nowrap) > :not(.agm-nowrap) {
	flex: 1 1 auto;
	min-width: 0;
}

/* スマホでは「料金＋補足」のかたまりだけ折り返して、説明文の幅を確保する */
@media (max-width: 600px) {
	.wp-block-group.agm-nowrap {
		white-space: normal;
		max-width: 118px;
	}
}

/* 名前＋札（例：髪質改善プレミアム［オーダーメイド］）は名前の途中で改行しない */
p:has(> span[style*="inline-block"]),
h2:has(> span[style*="inline-block"]),
h3:has(> span[style*="inline-block"]) {
	word-break: keep-all;
	overflow-wrap: anywhere;
}

/* 固定幅の項目名（住所・営業時間・年表の年など）は縮めない */
.agm-fixed {
	flex-shrink: 0;
}

/* ヘッダー：項目が多いので、1200px未満は「≡」メニューにまとめる */
header .wp-block-button__link {
	white-space: nowrap;
}
@media (max-width: 1199px) {
	header .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
	header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
		display: none;
	}
}

/* タップで表示する開閉ボックス（例：サプリ購入ページのパスワード） */
.wp-block-details.agm-reveal > summary {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	box-sizing: border-box;
	border: 1px solid #BFB2A3;
	border-radius: 999px;
	color: var(--wp--preset--color--muted);
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}
.wp-block-details.agm-reveal > summary::-webkit-details-marker {
	display: none;
}
.wp-block-details.agm-reveal[open] > summary {
	display: none;
}
.wp-block-details.agm-reveal > p {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	box-sizing: border-box;
}

/* 横に並ぶ枠（例：店舗案内）の最後のボタン群を下端にそろえる */
.wp-block-group.is-layout-grid > .wp-block-group > .wp-block-group.is-layout-grid:last-child {
	margin-top: auto;
}

/* 店舗案内：門司店と小倉店の行（写真・店名・住所・営業時間・定休日・電話・ボタン）の高さをそろえ、区切り線を一直線にする */
@media (min-width: 600px) {
	@supports (grid-template-rows: subgrid) {
		#stores > .wp-block-group.is-layout-grid > .wp-block-group {
			display: grid;
			grid-template-rows: subgrid;
			grid-row: span 7;
			row-gap: 0;
		}
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > * {
			margin-block-start: 0 !important;
		}
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > :nth-child(1),
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > :nth-child(2) {
			margin-bottom: 28px;
		}
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > :nth-child(3) {
			display: contents;
		}
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > :nth-child(3) > * {
			margin-block-start: 0 !important;
		}
		#stores > .wp-block-group.is-layout-grid > .wp-block-group > :nth-child(4) {
			margin-top: 28px;
			align-self: start;
		}
	}
}
