/*
Theme Name: SWELL CHILD
Template: swell
Version: 1.0
Description: SWELL子テーマ
*/

/* ========================================
   検索結果ページ: 施設名の縦書き完全無効化
======================================== */

/* 最優先: すべての要素を横書きに */
body.page-id-55 *,
body.page-id-55 .facility-grid *,
body.page-id-55 .facility-card *,
body.page-template-search-facility *,
.search-results-container *,
.facility-grid *,
.facility-card * {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  -ms-writing-mode: lr-tb !important;
  direction: ltr !important;
  text-orientation: mixed !important;
}

/* 施設名の強制横書き */
body.page-id-55 .facility-card-title,
body.page-id-55 a.facility-card-title,
body.page-template-search-facility .facility-card-title,
.facility-card-title,
a.facility-card-title {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
  display: block !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

/* すべてのテキスト要素 */
body.page-id-55 h1, body.page-id-55 h2, body.page-id-55 h3,
body.page-id-55 p, body.page-id-55 div, body.page-id-55 span,
body.page-id-55 a, body.page-id-55 li,
body.page-template-search-facility h1,
body.page-template-search-facility h2,
body.page-template-search-facility h3,
body.page-template-search-facility p,
body.page-template-search-facility div,
body.page-template-search-facility span,
body.page-template-search-facility a,
body.page-template-search-facility li {
  writing-mode: horizontal-tb !important;
  -webkit-writing-mode: horizontal-tb !important;
}

/* 検索結果カードのレイアウト */
body.page-id-55 .facility-grid,
body.page-template-search-facility .facility-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  writing-mode: horizontal-tb !important;
}

/* カード内のすべての要素 */
.facility-card *,
.facility-card-content *,
.facility-basic-info *,
.facility-feature-tags * {
  writing-mode: horizontal-tb !important;
  direction: ltr !important;
}

/* WordPressのデフォルトスタイルを上書き */
html[lang] body.page-id-55 *,
html[lang] body.page-template-search-facility * {
  writing-mode: horizontal-tb !important;
}
