/*
Theme Name: ココハロ！
Template: twentytwentyfive
Description: ココハロ！（amenity-safe.com）の子テーマ。Twenty Twenty-Five を土台に、色・書体・読みやすさを整える。
Version: 1.1.2
Text Domain: cocohalo
*/

/* 日本語の組み方 */
body { line-break: strict; overflow-wrap: break-word; }
h1, h2, h3 { word-break: auto-phrase; text-wrap: pretty; }
td { word-break: auto-phrase; }
.nowrap { display: inline-block; max-width: 100%; }

/* 見出しは自分の中身に近く、前の段から離す */
main .wp-block-post-content > h2.wp-block-heading { margin-block: 2.5rem 0.75rem; }
main .wp-block-post-content > h2.wp-block-heading:first-child { margin-top: 0; }

/* 電話番号のリンク */
a[href^="tel:"] { font-weight: 700; }

/* 見出し h2 は左に青い線（今の土台と同じ形） */
.wp-site-blocks h2.wp-block-heading { border-left: 6px solid var(--wp--preset--color--accent-1); padding-left: 0.6rem; }

/* お知らせの囲み */
.cocohalo-notice { background: var(--wp--preset--color--accent-4); border: 1px solid var(--wp--preset--color--accent-5); border-left-width: 6px; border-radius: 4px; padding: 1.25rem 1.5rem 1.25rem 1.25rem; }
.cocohalo-notice h2.wp-block-heading { border-left: none; padding-left: 0; margin-top: 0; font-size: 1.125rem; }

/* 通販サイトへの案内（大胆にするのはここだけ） */
.cocohalo-shop { background: var(--wp--preset--color--accent-3); border: 2px solid var(--wp--preset--color--accent-1); border-radius: 6px; padding: 1.5rem 1.5rem 1.75rem 1.625rem; }
.cocohalo-shop h2.wp-block-heading { border-left: none; padding-left: 0; margin-top: 0; color: var(--wp--preset--color--accent-2); }
.cocohalo-shop .wp-block-button__link { font-size: 1.125rem; padding: 0.85rem 1.75rem; }

/* 表（行の見出しつき） */
.cocohalo-table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; }
.cocohalo-table caption { text-align: left; font-weight: 700; margin-bottom: 0.5rem; }
.cocohalo-table th, .cocohalo-table td { border: 1px solid var(--wp--preset--color--accent-6); padding: 0.7rem 0.85rem; text-align: left; vertical-align: top; overflow-wrap: normal; word-break: auto-phrase; }
.cocohalo-table th { background: #f0f4f8; width: 9.5rem; font-weight: 700; }
@media (max-width: 37.5rem) {
  .cocohalo-table, .cocohalo-table tbody, .cocohalo-table tr, .cocohalo-table th, .cocohalo-table td { display: block; width: auto; }
  .cocohalo-table th { border-bottom: none; }
  .cocohalo-table td { border-top: none; margin-bottom: 0.6rem; }
  .cocohalo-notice, .cocohalo-shop { padding: 1rem; }
  .cocohalo-shop { padding-left: 1.25rem; }
}

/* フォーカスを見えるように */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent-2); outline-offset: 2px;
}

/* ヘッダー */
.cocohalo-header { border-bottom: 3px solid var(--wp--preset--color--accent-1); }
.cocohalo-header .wp-block-site-title a { text-decoration: none; color: var(--wp--preset--color--accent-2); }
.cocohalo-header .wp-block-navigation a { text-decoration: underline; text-underline-offset: 0.2em; }
.cocohalo-header .wp-block-navigation .current-menu-item > a { font-weight: 700; color: var(--wp--preset--color--accent-2); text-decoration-thickness: 3px; }
.cocohalo-header .wp-block-site-tagline { font-size: 0.9375rem !important; color: #444 !important; }
.cocohalo-header .wp-block-navigation-item__content { display: inline-block; padding-block: 0.6rem; }
@media (max-width: 37.5rem) {
  .cocohalo-header .wp-block-navigation__container { gap: 0 0.9rem !important; }
  .cocohalo-header .wp-block-navigation { font-size: 0.9375rem; }
}

/* お問い合わせフォーム（Contact Form 7） */
.wpcf7 form p { margin: 0 0 1.25rem; }
.wpcf7 label { display: block; font-weight: 700; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea {
  display: block; width: 100%; margin-top: 0.4rem; padding: 0.65rem 0.75rem; font: inherit; font-weight: 400;
  color: var(--wp--preset--color--contrast); background: #fff; border: 1px solid #767676; border-radius: 4px; box-sizing: border-box;
}
.wpcf7 textarea { height: 10rem; min-height: 10rem; resize: vertical; }
.wpcf7 input[type="submit"] {
  font: inherit; font-weight: 700; font-size: 1.0625rem; color: #fff; background: var(--wp--preset--color--accent-1);
  border: none; border-radius: 4px; padding: 0.8rem 2rem; cursor: pointer; margin-top: 0.5rem;
}
.wpcf7 input[type="submit"]:hover, .wpcf7 input[type="submit"]:focus-visible { background: var(--wp--preset--color--accent-2); }
.wpcf7-not-valid-tip { color: #b3261e; font-weight: 700; margin-top: 0.3rem; }
.wpcf7 [aria-invalid="true"] { border-color: #b3261e; border-width: 2px; }
.wpcf7 form .wpcf7-response-output { margin: 1rem 0 0; padding: 0.75rem 1rem; border-width: 2px; border-radius: 4px; }
.wpcf7-spinner { vertical-align: middle; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
