@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/* ヘッダーのサイトタイトルを大きく・太字に */
.site-name-text {
  font-size: 34px;
  font-weight: bold;
}

/* 編集フォームの「対象記事」フィールド（URLのpost_idで自動指定するため非表示） */
.event-hidden-field {
  display: none !important;
}

/* 各ページのタイトル（記事・固定ページ共通）を中央揃えに */
.entry-title {
  text-align: center;
}

/************************************
** 活動報告 投稿フォーム（/event-up/）調整
************************************/
/* 入力欄をタップした際にスマホ（iOS Safari等）が自動でズームしてしまうのを防ぐ
   （フォントサイズが16px未満だとブラウザが自動でズームインする仕様のため） */
.frontend-form input[type="text"],
.frontend-form input[type="email"],
.frontend-form input[type="date"],
.frontend-form textarea,
.frontend-form select {
  font-size: 16px;
}

/* 「内容」欄（本文エディタ）の高さは、ACFフィールド側の rows 設定（50 = 20px×50 = 1000px）で調整済み */

/* 投稿する／削除するボタンを大きく・同じサイズに揃える */
.frontend-form .fea-submit-button,
.frontend-form .fea-delete-button {
  font-size: 22px;
  padding: 18px 48px;
  height: auto;
  line-height: 1.4;
}

/* 編集画面の見出し（記事名＋編集） */
.event-edit-heading {
  text-align: center;
  margin-bottom: 20px;
}

/* 編集キャンセルリンク */
.event-edit-cancel {
  text-align: center;
  margin-top: 12px;
}
.event-edit-cancel a {
  color: #777;
  text-decoration: underline;
}

/* 各項目名（タイトル・開催日・イベント画像・内容など）を太字＋下線に */
.frontend-form .acf-label label {
  font-weight: bold;
  text-decoration: underline;
}

/* 「写真を追加」ボタンを左端に揃える */
.frontend-form .fea-uploads-toolbar .acf-hl {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  padding: 0;
  margin: 0;
}
.frontend-form .fea-uploads-toolbar .acf-hl > li {
  float: none;
  margin: 0 8px 8px 0;
}

/* 写真の「残り○枚」表示 */
.frontend-form .fea-uploads-remaining {
  font-weight: bold;
  color: #555;
}
.frontend-form .fea-uploads-remaining.is-full {
  color: #d32f2f;
}
.frontend-form .fea-uploads-overflow-warning {
  color: #d32f2f;
  font-weight: bold;
  margin: 8px 0;
}

/* 活動報告の投稿一覧（投稿日 → 投稿名 → 写真） */
.event-submissions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.event-submission-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background-color .2s;
}
.event-submission-item:hover {
  background-color: #f7f7f7;
}
.event-submission-date {
  flex: 0 0 auto;
  width: 6.5em;
  color: #777;
  font-size: 14px;
}
.event-submission-title {
  flex: 1 1 auto;
  font-weight: bold;
}
.event-submission-thumb {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
}
.event-submission-thumb img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

/* 投稿完了後の「続けて投稿する／編集する」モーダル */
.event-post-success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 20px;
  box-sizing: border-box;
}
.event-post-success-modal {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 32px 28px 28px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}
.event-post-success-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #999;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-post-success-close:hover {
  background: #f0f0f0;
  color: #333;
}
.event-post-success-message {
  font-weight: bold;
  font-size: 18px;
  margin: 0 0 20px;
  color: #2e7d32;
}
.event-post-success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.event-post-success-button {
  display: block;
  padding: 14px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
}
.event-post-success-button.continue {
  background: #2e7d32;
  color: #fff;
}
.event-post-success-button.edit {
  background: #fff;
  color: #2e7d32;
  border: 1px solid #2e7d32;
}

/* 写真クリック時の拡大表示（キャプション編集は無し） */
.event-photo-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  cursor: zoom-out;
  padding: 20px;
  box-sizing: border-box;
}
.event-photo-lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}
.event-photo-lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* アイキャッチ（記事一覧のサムネイル）を、元画像が縦長でも
   L判写真の比率（3:2）で中央を横長にクロップ表示 */
.entry-card-thumb-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  display: block;
}

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /* スマホ用メニューバーを画面下から画面上部の固定バーに変更
     （Cocoon本体の「ヘッダー設置」モード用の数値を流用）
     ※ Cocoon側のjavascript.jsがスクロール時にこのバーの bottom/z-index を
     　 インラインスタイルで書き換えてくる（下固定バー用の隠す/出す処理）ため、
     　 !important で常に上固定を維持する */
  .mobile-footer-menu-buttons {
    top: 0 !important;
    bottom: auto !important;
    justify-content: space-around;
    min-width: 46px;
    z-index: 100 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    padding-bottom: 0;
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top);
  }

  /* 上部固定バーの高さ分、本文を押し下げる */
  body {
    margin-top: 50px;
  }

  /* ロゴ下にだらっと並んでいた簡易メニュー一覧は非表示にし、
     上部のハンバーガーメニュー（三本線）に一本化する */
  #navi .navi-in > .menu-mobile {
    display: none !important;
  }
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}


