/*
Theme Name: Nishiki Pro Child
Theme URI: https://support.animagate.com/product/wp-nishiki-pro/
Template: nishiki-pro
Author: Tetsuya Imamura[AnimaGate, Inc.]
Author URI: https://support.animagate.com/product/wp-nishiki-pro/
Description: Nishiki Pro is a fully responsive theme. Elegance,Refined,Multifunctional. In your admin panel, go to Appearance -&gt; Customize. About 80 customization can be done without writing the code. responsive layout, front page setting, movie setting, etc. Customization often required for web production / website operation can be set. Gutenberg Block Editor Style Support.
Tags: one-column,two-columns,left-sidebar,right-sidebar,flexible-header,custom-colors,custom-header,custom-menu,custom-logo,featured-images,sticky-post,blog,entertainment,portfolio,editor-style,footer-widgets,full-width-template,block-styles,wide-blocks
Version: 1.0.378.1749490075
Updated: 2025-06-10 02:27:55
Updated: 2025-06-10 02:27:55
*/
/*
 * 親テーマのスクリプトとの競合を避けるため、display:none ではなく
 * 要素をレイアウトに残しつつ視覚的に隠す手法に変更します。
 */
.shop-item--hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* 絞り込み結果が0件の場合のメッセージスタイル */
.shop-no-results {
  padding: 2em 1em;
  text-align: center;
  font-weight: bold;
  background-color: #f7f7f7;
  margin: 10px 0;
}

/* 詳細表示機能のスタイル */
.shop-details-button {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.shop-details-button:hover {
  background-color: #f0f0f0;
}

/* MAPボタンと詳細ボタンのグループ */
.shop-button-group {
  display: flex;
  gap: 5px; /* ボタン間の余白 */
}

/* 新しいMAPボタンのスタイル */
.shop-map-button {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  background-color: var(--nishiki-pro-link-color-02, #0044a3);
  border: 1px solid var(--nishiki-pro-link-color-02, #0044a3);
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.shop-map-button:hover {
  background-color: #fff;
  color: var(--nishiki-pro-link-color-02, #0044a3);
}

.shop-item__details-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out, background-color 0.3s ease-out;
  background-color: #fdfdfd;
  padding: 0 20px;
}

/* --- アコーディオン開閉時のハイライト表示 --- */

/* 背景色の変更を滑らかにするためのtransitionを追加 */
.shop-row.shop-item {
  transition: background-color 0.3s ease-out;
}

/* 開いた行とその詳細エリアの背景色を変更 */
.shop-row.shop-item.is-open,
.shop-row.is-open + .shop-item__details-content {
  background-color: #eef4f9; /* スマホのカード枠線と同じ色 */
}

/* --- 詳細情報エリアの新しいスタイル --- */
.shop-row.is-open + .shop-item__details-content {
  max-height: 1500px; /* 十分な高さを確保 */
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.details-list {
  display: grid;
  grid-template-columns: 160px 1fr; /* ラベル列の幅を広げて改行を防ぐ */
  gap: 12px 15px; /* 行間と列間 */
  margin: 0;
  line-height: 1.6;
}

.details-list dt {
  font-weight: bold;
  color: #555;
  text-align: right;
  padding-right: 15px;
  border-right: 2px solid #eef4f9;
}

.details-list dd {
  margin: 0;
}

.details-list dd a {
  color: var(--nishiki-pro-link-color-02, #0044a3);
  text-decoration: underline;
}
.details-list dd a:hover {
  text-decoration: none;
}

/* 補足説明エリア */
.shop-description {
  margin-top: 15px;
}
.shop-description h4 {
  font-size: 1.1rem;
  color: #333;
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 2px solid #eef4f9;
}

/* --- SNSアイコンのスタイル --- */
.sns-icon-container {
  display: flex;
  align-items: center;
  gap: 15px; /* アイコン間の余白 */
}

.sns-icon-link svg {
  display: block; /* aタグ内の余白をなくす */
  width: 24px;
  height: 24px;
  fill: #888; /* アイコンのデフォルト色 */
  transition: fill 0.2s ease-in-out;
}

.sns-icon-link:hover svg {
  fill: var(--nishiki-pro-link-color-02, #0044a3); /* ホバー時の色 */
}

/* 店舗一覧の行の区切り線を設定 */
.shop-table-header,
.shop-row.shop-item {
  /* この一行で 太さ、線の種類、色 を指定できます */
  border-bottom: 2px solid #eef4f9; 
}


/* --- フェーズ1：2カラムレイアウトここから --- */

.medio-layout-wrapper {
  display: flex;
  align-items: flex-start; /* 上揃え */
  gap: 30px; /* カラム間の余白 */
}

/* 左カラム（一覧） */
.medio-layout-main {
  width: 65%;
  flex-shrink: 0; /* 幅が65%より縮まないようにする */
}

/* 右カラム（マップ） */
.medio-layout-aside {
  width: calc(35% - 30px); /* カラム間のgap(30px)を引いて合計幅を100%に収める */
  flex-shrink: 0;
  position: -webkit-sticky; /* Safari用 */
  position: sticky;
  /* position: sticky; によるGoogleマップの描画不具合を解消するためのハック */
  /* これにより、この要素がGPUアクセラレーションの対象となり、再描画が安定します */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);  
  top: 50px; /* 上からの距離（ヘッダーの高さなどに合わせる） */ 
}

/* マップを画面に固定 */
.medio-layout-aside #shop-map {
  height: 80vh !important; /* ビューポートの高さの80% */
}

/* --- スマホ表示用の設定 (991px以下) --- */
@media (max-width: 991px) {
  .medio-layout-wrapper {
    flex-direction: column; /* 縦並びにする */
  }

  .medio-layout-main,
  .medio-layout-aside {
    width: 100%; /* 幅を100%に戻す */
  }

  /* マップの固定を解除 */
  .medio-layout-aside {
    position: static;
  }
  .medio-layout-aside #shop-map {
    height: 500px !important; /* 元の高さに戻す */
  }
}

/* --- フェーズ1：2カラムレイアウトここまで --- */

/* 親テーマ(Nishiki Pro)の #primary に設定されている overflow:hidden を上書きします。*/
body.page-template-page_shop_list #primary {
  overflow: visible !important;
}


/* --- フェーズ2：アコーディオンレイアウトここから --- */

/* PC表示 (992px以上) のみに適用 */
@media (min-width: 992px) {
  /* ヘッダーと行のレイアウトをグリッドに変更 */

  /* PC表示ではマップが常に表示されているため、行内のMAPボタンは不要 */
  .shop-map-button {
    display: none;
  }
    
  .shop-table-header,
  .shop-row.shop-item {
    display: grid;
    /* ☆ | 店舗名 | ジャンル | 地域 | ボタン */
    /* 各カラムの幅を「3:2:2」の比率で指定し、バランスを調整 */
    grid-template-columns: 70px 3fr 2fr 2fr 80px; 
    align-items: center;
    gap: 10px; /* カラム間の余白を少し詰める */
    padding: 10px 15px;
  }

  /* ヘッダーの不要な列を非表示 */
  .shop-table-header .shop-col.address,
  .shop-table-header .shop-col.additional {
    display: none;
  }

  /* 一覧行の不要な列を非表示 */
  .shop-row.shop-item .shop-col.address,
  .shop-row.shop-item .shop-col.additional {
    display: none;
  }

  /* ☆マークのカラムのみ中央揃えに */
  .shop-table-header .shop-col.star,
  .shop-row.shop-item .shop-col.star {
    /* text-align: center; を削除し、flexboxで中央揃え */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px; /* 星と星の間の余白 */
  }

  /* 店名のスタイル調整 */
  .shop-row.shop-item .shop-col.name h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--nishiki-pro-link-color-02, #0044a3);
  }

  /* ジャンル・地域のスタイル調整 */
  .shop-row.shop-item .shop-col.category,
  .shop-row.shop-item .shop-col.area {
    font-size: 0.85rem;
    color: #666;
  }
  
    /* ☆マークの文字色などを調整 */
  .shop-row.shop-item .shop-col.star {
    font-size: 1.2rem;
  }

  /* 詳細情報の区切り線 */
  .details-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 15px 0;
  }
}

/* --- フェーズ2：アコーディオンレイアウトここまで --- */

/* --- フェーズ6：☆マークの色分け --- */
/* ヘッダーの☆（凡例） */
.shop-table-header .shop-col.star {
  font-size: 1rem;
  font-weight: bold;
}
.star-loco-head {
  color: #f5a623; /* ゴールド */
}
.star-wcard-head {
  color: #4a90e2; /* ブルー */
}

/* 各店舗行の★ */
.star-loco {
  color: #f5a623; /* ゴールド */
}
.star-wcard {
  color: #4a90e2; /* ブルー */
}

/* --- フェーズ4：PC用マルチセレクトフィルターここから --- */

/* PC表示 (992px以上) のみに適用 */
@media (min-width: 992px) {
  /* フィルター群をFlexboxで横並びにする */
  .shop-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
  }

  /* マルチセレクトドロップダウンのコンテナ */
  #benefit-filter {
    position: relative;
  }

  /* マルチセレクトのパネル（チェックボックスリスト） */
  #benefit-filter-panel {
    display: none; /* JSで is-open クラスをトグル */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 10px;
    z-index: 100;
    min-width: 220px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  #benefit-filter-panel.is-open {
    display: block;
  }

  #benefit-filter-panel label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
  }
  #benefit-filter-panel label:last-child {
    margin-bottom: 0;
  }

  /* ドロップダウン内の☆マークのスタイル */
  #benefit-filter-panel .star-loco,
  #benefit-filter-panel .star-wcard {
    font-weight: bold; /* 太字にして目立たせる */
  }
}

/* --- フェーズ4：PC用マルチセレクトフィルターここまで --- */

/* --- フェーズ5：フィルターデザインの統一ここから --- */

/* フィルターボタンの共通スタイル (PC/スマホ共通) */
.shop-filters select,
#benefit-filter-button {
  /* Appearance */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Box Model & Sizing */
  height: 36px; /* 高さを固定 */
  min-height: 36px; /* 親テーマのmin-heightを上書きして高さを完全に統一 */
  box-sizing: border-box; /* paddingとborderを高さに含める */
  padding: 0 30px 0 12px; /* 右側に矢印用のスペースを確保 */
  margin: 0; /* ブラウザのデフォルトマージンをリセット */
  border: 1px solid var(--nishiki-pro-main-color-01, #023875);
  border-radius: 4px;

  /* Typography */
  color: #fff;
  font-family: "Zen Old Mincho", serif;
  font-size: 16px; /* サイトの基本フォントサイズに合わせる */
  font-weight: 600; /* サイトの基本ウェイトに合わせる */
  line-height: 34px; /* (height - border*2) to vertically center text */
  text-align: left;

  /* Background, Cursor, Icon */
  background-color: var(--nishiki-pro-main-color-01, #023875);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M8 11.293l-4.646-4.647a.5.5 0 0 1 .708-.708L8 9.879l4.939-4.939a.5.5 0 0 1 .708-.708L8 11.293z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
  cursor: pointer;
}

/* disabled状態のselectの共通スタイル */
.shop-filters select:disabled {
  background-color: #f5f5f5;
  color: #999;
  /* disabled時は白い矢印が見えにくいため、アイコンもグレーにする */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23999'%3E%3Cpath d='M8 11.293l-4.646-4.647a.5.5 0 0 1 .708-.708L8 9.879l4.939-4.939a.5.5 0 0 1 .708-.708L8 11.293z'/%3E%3C/svg%3E");
  cursor: not-allowed;
}

/* PC表示 (992px以上) のみに適用 */
@media (min-width: 992px) {
  /* 既存のselect要素と新しいボタンのレイアウト */
  .shop-filters select,
  #benefit-filter-button {
    width: auto; /* コンテンツに合わせて幅を自動調整 */
    vertical-align: middle; /* 要素の垂直方向の整列を統一 */
  }
}

/* --- フェーズ5：フィルターデザインの統一ここまで --- */

/* --- フェーズ3：モバイル用フィルターUIここから --- */

/* モバイル用フィルター表示ボタン (普段は非表示) */
.medio-filter-toggle-button {
  display: none;
}

/* フィルターパネルのタイトルと閉じるボタン (普段は非表示) */
.filter-panel-title,
.medio-filter-close-button,
.filter-panel-actions {
  display: none;
}

/* --- スマホ表示用の設定 (991px以下) --- */
@media (max-width: 991px) {
  /* PC用の選択中フィルター表示エリアはスマホでは非表示 */
  #active-filters-display.pc-only-filter {
    display: none;
  }

  /* フィルター表示ボタンを表示 */
  .medio-filter-toggle-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--nishiki-pro-main-color-01, #023875);
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }

  /* --- ここからモバイルの一覧表示をカード形式に --- */

  /* PC用のテーブルヘッダーを非表示 */
  .shop-table-header {
    display: none;
  }

  /* 各店舗の行をカード形式にする */
  .shop-row.shop-item {
    display: flex;
    flex-wrap: wrap; /* 要素を折り返す */
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eef4f9;
    border-radius: 5px;
    background-color: #fff;
  }

  /* 各カラムのデフォルトスタイル */
  .shop-row.shop-item .shop-col {
    width: 100%;
    padding: 4px 0;
    text-align: left; /* 全て左揃えに */
  }

  /* 店舗名 (カードのヘッダー) */
  .shop-row.shop-item .shop-col.name {
    order: 1; /* 1番目に表示 */
    width: calc(100% - 70px); /* 星マークのカラム幅を広げた分、狭める */
  }
  .shop-row.shop-item .shop-col.name h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    /* PC表示と文字色を統一 */
    color: var(--nishiki-pro-link-color-02, #0044a3);    
    margin: 0;
  }

  /* 星マーク (カードのヘッダー右) */
  .shop-row.shop-item .shop-col.star {
    order: 2; /* 2番目に表示 */
    width: 70px; /* PC表示と合わせて幅を広げる */
    padding: 0;
    font-size: 1.5rem;
    /* flexboxで横並び・右揃えにする */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px; /* 星と星の間の余白 */
  }

  /* ジャンルと地域 (ラベル付き) */
  .shop-row.shop-item .shop-col.category { order: 3; }
  .shop-row.shop-item .shop-col.area { order: 4; }

  .shop-row.shop-item .shop-col.category::before { content: "【ジャンル】"; }
  .shop-row.shop-item .shop-col.area::before { content: "【地域】"; }

  .shop-row.shop-item .shop-col.category::before,
  .shop-row.shop-item .shop-col.area::before {
    font-weight: bold;
    display: inline-block;
    min-width: 80px;
    color: #555;
  }
  
  /* スマホ表示用の詳細レイアウト調整 */
  .details-list {
    grid-template-columns: 1fr; /* 1列にする */
    gap: 0; /* 項目間のgapをリセットし、dtとddのmarginで制御 */
  }

  .details-list dt {
    text-align: left;
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: 5px; /* タイトルとデータの間の小さな余白 */
  }
  .details-list dd {
    margin-bottom: 15px; /* 各項目のデータの下に余白を作り、グループ化を明確にする */
    padding-left: 1em; /* データをインデントして見やすくする */
  }

  /* 詳細ボタン (カードのフッター) */
  .shop-row.shop-item .shop-col.details-toggle-col {
    order: 5; /* 最後に表示 */
    margin-top: 10px;
    text-align: right;
  }

  /* --- ここまでモバイルのカード表示 --- */

  /* フィルターパネルを画面いっぱいのオーバーレイにする */
  .shop-filters {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 9999;
    padding: 20px;
    overflow-y: auto;
    /* 最初は非表示 */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
  }

  /* フィルターパネル表示時のスタイル */
  .shop-filters.is-visible {
    transform: translateY(0);
  }

  /* パネル内の要素を表示 */
  .filter-panel-title,
  .medio-filter-close-button,
  .filter-panel-actions {
    display: block;
  }

  .filter-panel-title {
    font-size: 1.2rem;
    margin: 0 0 20px;
    text-align: center;
  }

  .medio-filter-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
  }

  .filter-panel-actions {
    margin-top: auto; /* ボタンをパネル下部に配置 */
    padding-top: 20px;
  }

  .filter-button {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }

  .filter-button.apply {
    color: #fff;
    background-color: var(--nishiki-pro-link-color-02, #0044a3);
    margin-bottom: 10px;
  }

  .filter-button.reset {
    color: #333;
    background-color: #eee;
  }
  
  /* モバイルフィルターパネル内のselect要素もPCと同じデザインに */
  .shop-filters select {
    width: 100%;
    margin-bottom: 15px;
  }

  /* モバイルフィルターパネル内の会員証フィルターのスタイル */
  #benefit-filter {
    width: 100%;
  }
  #benefit-filter-button {
    width: 100%;
  }
  #benefit-filter-panel {
    width: 100%;
  }
}

/* --- フェーズ3：モバイル用フィルターUIここまで --- */

/* モーダルウィンドウ (普段は非表示) */
.medio-map-modal {
  display: none; /* JSで制御 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  /* ヘッダーやWordPress管理バーよりも確実に手前に表示するため、z-indexを非常に高い値に設定します */
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.medio-map-modal.is-open {
  display: block;
  opacity: 1;
}

.medio-map-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95%;
  height: 85%;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  padding: 15px;
  box-sizing: border-box;
}

#medio-modal-map-container,
#medio-modal-map-container > #shop-map {
  width: 100%;
  height: 100%;
}

.medio-map-close-button {
  position: absolute;
  top: -15px;
  right: -15px;
  /* モーダル本体よりもさらに手前に表示 */
  z-index: 100001;
  width: 40px;
  height: 40px;
  font-size: 2rem;
  line-height: 40px;
  text-align: center;
  color: #fff;
  background-color: #333;
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}

/* --- スマホ表示用の設定 (991px以下) --- */
@media (max-width: 991px) {
  /* 元のマップエリアを非表示に */
  .medio-layout-aside {
    display: none;
  }
}

/* --- スマホ用マップモーダルここまで --- */

/* --- 選択中フィルター表示エリアのスタイル --- */

/* PC表示 (992px以上) のみに適用 */
@media (min-width: 992px) {
  #active-filters-display {
    padding: 10px 15px;
    margin-bottom: 15px;
    background-color: #f7f7f7;
    border-radius: 4px;
    min-height: 20px; /* フィルターがない時も高さを確保 */
  }

  .active-filter-tag {
    display: inline-block;
    background-color: #eef4f9;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 5px; /* 折り返し時のため */
    font-size: 0.85rem;
  }

  .remove-filter {
    margin-left: 5px;
    color: #999;
    cursor: pointer;
    font-weight: bold;
  }

  .remove-filter:hover {
    color: #333;
  }
}

/* === Member Registration Form Styles === */
.medio-form-container {
  max-width: 600px;
  margin: 2em auto;
  padding: 2em;
  background-color: #f9f9f9;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.medio-form-container h1 {
  text-align: center;
  margin-bottom: 1em;
  font-size: 1.5rem;
  color: #333;
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 1rem;
}

.form-group input:focus {
  border-color: var(--nishiki-pro-main-color-01, #023875);
  outline: none;
  box-shadow: 0 0 0 2px rgba(2, 56, 117, 0.2);
}

.form-actions {
  text-align: center;
  margin-top: 2em;
}

.form-actions button {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  background-color: var(--nishiki-pro-main-color-01, #023875);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.form-actions button:hover:not(:disabled) {
  background-color: #012a5a;
}

.form-actions button:disabled {
  background-color: #999;
  cursor: not-allowed;
}

.medio-form-container #form-messages {
  margin-top: 1.5em;
  padding: 1em;
  border-radius: 4px;
  display: none; /* Hide by default */
}

/* Reset margin for the paragraph inside the message box */
.medio-form-container #form-messages p {
  margin: 0;
  padding: 0;
}

.medio-form-container #form-messages.is-error {
  display: block;
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.medio-form-container #form-messages.is-success {
  display: block;
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* === フォームメッセージ（案内用） === */
.medio-form-container .form-messages.is-notice {
  background-color: #d9edf7; /* 薄い青 */
  color: #31708f;
  border: 1px solid #bce8f1;
  display: block;
}
.medio-form-container .form-messages.is-notice p {
  margin: 0;
}

/* === Privacy Policy Agreement Section === */
.privacy-policy-agreement {
  margin-top: 2em;
  margin-bottom: 1.5em;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #fff;
}

.accordion-header {
  width: 100%;
  padding: 15px;
  background-color: #f7f7f7;
  border: none;
  /* border-bottom: 1px solid #e0e0e0; */
  text-align: left;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 4px 4px 0 0;
  color: #333;
}

.accordion-header:hover {
  background-color: #f0f0f0;
}

.accordion-icon {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  border-right: 2px solid #555;
  border-bottom: 2px solid #555;
  transform: rotate(45deg);
  transition: transform 0.3s ease-in-out;
  margin-right: 0.2em;
}

.accordion-header.is-open .accordion-icon {
  transform: rotate(-135deg);
  margin-top: -0.3em;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  padding: 0 20px;
  font-size: 0.9rem;
  line-height: 1.7;
  background-color: #fff;
  border-top: 1px solid #e5e5e5;
}

.accordion-content p {
  margin: 1.2em 0;
}

.form-group-checkbox {
  padding: 15px;
  background-color: #f7f7f7;
  border-top: 1px solid #e5e5e5;
  border-radius: 0 0 4px 4px;
}

.form-group-checkbox label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: bold;
  margin: 0;
  color: #555;
}

.form-group-checkbox input[type="checkbox"] {
  margin-right: 0.8em;
  width: 1.3em;
  height: 1.3em;
  cursor: pointer;
}

.single-giveaway-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2em 1em;
}

.giveaway-article {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  padding: 2em;
}

.giveaway-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5em;
}

.giveaway-meta {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
}

.prize-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
  padding: 0;
}

.prize-item {
  width: calc(50% - 10px);
}

.prize-item img {
  width: 100%;
  border-radius: 6px;
}

.prize-caption {
  font-size: 0.9em;
  margin-top: 0.5em;
  text-align: center;
}

@media (max-width: 600px) {
  .prize-item {
    width: 100%;
  }
}

/* === プロフィール写真撮影ページ Cropper.js スタイル === */
.photo-upload-container #cropper-container {
  width: 100%;
  height: 100%;
}

/* Cropper.jsが生成するimg要素は、コンテナいっぱいに広がるようにする */
.photo-upload-container #cropper-image {
  display: block;
  max-width: 100%;
}

/* Cropper.jsのビューボックス（切り抜き範囲の内側）のスタイル */
.cropper-view-box {
  outline: 2px solid #fff; /* 切り抜き範囲の枠線を白色に */
  outline-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6); /* 外側を半透明の黒で覆う */
}

/* Cropper.jsのドラッグ可能な面（切り抜き範囲全体）のスタイル */
.cropper-face {
  cursor: move;
}

/* Cropper.jsのガイドライン（点線）のスタイル */
.cropper-dashed {
  border-color: rgba(255, 255, 255, 0.5);
}

/* === Cropper.js 切り抜き枠内にカスタムフレームガイドを表示 === */
.photo-upload-container .cropper-view-box {
  /*
   * 疑似要素(::after)を配置するための基準点として機能させるために必要です。
   * Cropper.jsのデフォルトスタイルを上書きする可能性がありますが、動作に影響はありません。
   */
  position: relative;
}

.photo-upload-container .cropper-view-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* 【重要】ここに自作のガイド画像のパスを指定します */
  background-image: url('https://iandi-okinawa.net/wp8/wp-content/uploads/frame-guide.png'); /* 例: /wp-content/themes/nishiki-pro-child/images/frame-guide.png */
  background-size: contain; /* 画像が枠内に収まるように調整 */
  background-position: center;
  background-repeat: no-repeat;
  /* ガイド画像がマウス操作（ドラッグやリサイズ）を妨げないようにします */
  pointer-events: none;
}

/* === 「メディアとテキスト」ブロックのレイアウト調整 (改) === */

/*
 * 1. PC表示での上揃え (画面幅が768pxより大きい場合)
 *    align-itemsプロパティで、画像とテキストを上端に揃えます。
 */
@media (min-width: 768px) {
  .entry-content .wp-block-media-text {
    align-items: flex-start;
  }
}

/*
 * 2. タブレット表示でのレイアウト崩れ対策 (画面幅が767px以下の場合)
 *    WordPressのデフォルト(600px)より早く縦積みにすることで、タブレットでの表示崩れを防ぎます。
 */
@media (max-width: 767px) {
  .entry-content .wp-block-media-text.is-stacked-on-mobile {
    grid-template-columns: 100%; /* 1カラムレイアウトを強制 */
  }
}

/* === 会員検証ページ 案内ボックス === */
.verify-instruction-box {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2em;
  text-align: center;
}

.verify-instruction-box .verify-result-header .dashicons {
  color: #023875; /* サイトのメインカラー */
  font-size: 48px;
  width: 48px;
  height: 48px;
}

.verify-instruction-box .verify-result-body p {
  font-size: 1.1em;
  line-height: 1.7;
  color: #333;
}

.verify-instruction-box .verify-instruction {
  margin-top: 1.5em;
  font-size: 1em;
  color: #666;
}

/* === 企画管理者 タスク選択ページ === */
.task-selection-container {
  margin-top: 2em;
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.task-selection-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2em;
  border: 2px solid #eef4f9;
  border-radius: 8px;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.task-selection-button:hover {
  border-color: var(--nishiki-pro-main-color-01, #023875);
  background-color: #f8f9fa;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.task-selection-button .dashicons {
  font-size: 48px;
  width: 48px;
  height: 48px;
  color: var(--nishiki-pro-main-color-01, #023875);
  margin-bottom: 0.5em;
}

.task-selection-button .task-title {
  font-size: 1.3em;
  font-weight: bold;
  color: var(--nishiki-pro-main-color-01, #023875);
}

.task-selection-button .task-description {
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #666;
  max-width: 400px;
}

/* === アクセス不可案内ページのヘッダーレイアウト調整 === */
.page-template-page-unauthorized-access #primary {
  /* ヘッダーがオーバーレイ表示になった分、コンテンツを下にずらす */
  padding-top: 100px;
}

.button-edit.is-disabled{
  opacity:.5;
  cursor:not-allowed;
  pointer-events:none;
  background:#e5e7eb;      /* 明るいグレー */
  color:#6b7280;           /* 文字もグレー */
  border-color:#e5e7eb;
}

/* =========================
 * Giveaway: 開催開始（投稿）ボタン & ステータスバッジ
 * ========================= */
/* 汎用メッセージ（抽選実行ページ用） */
.medio-form-container .form-messages{
  display:none;
  margin:1em 0;
  padding:1em;
  border-radius:4px;
}
.medio-form-container .form-messages.is-success{
  display:block;
  background:#d4edda;
  color:#155724;
  border:1px solid #c3e6cb;
}
.medio-form-container .form-messages.is-error{
  display:block;
  background:#f8d7da;
  color:#721c24;
  border:1px solid #f5c6cb;
}

/* 一覧カード内のステータス表示 */
.giveaway-status{
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
  min-height:26px;
  padding:0 .7em;
  border-radius:9999px;
  font-size:.85rem;
  font-weight:700;
  line-height:1;
  border:1px solid transparent;
}
.giveaway-status.status-preparing{
  background:#fff7ed;      /* amber-50 */
  color:#9a3412;           /* amber-800 */
  border-color:#fdba74;    /* amber-300 */
}
.giveaway-status.status-active{
  background:#ecfdf5;      /* emerald-50 */
  color:#065f46;           /* emerald-800 */
  border-color:#6ee7b7;    /* emerald-300 */
}
.giveaway-status.status-finished{
  background:#eff6ff;      /* blue-50 */
  color:#1e3a8a;           /* blue-900 */
  border-color:#93c5fd;    /* blue-300 */
}
.giveaway-status.status-archived{
  background:#f3f4f6;      /* gray-100 */
  color:#374151;           /* gray-700 */
  border-color:#d1d5db;    /* gray-300 */
}

/* 抽選日バッジ（ステータスの右に表示） */
.giveaway-lottery-date-badge{
  display:inline-flex;
  align-items:center;
  box-sizing:border-box;
  min-height:26px;
  padding:0 .7em;
  border-radius:9999px;
  font-size:.85rem;
  font-weight:700;
  line-height:1;
  background:#f8fafc;      /* slate-50 */
  color:#334155;           /* slate-700 */
  border:1px solid #e2e8f0;/* slate-200 */
  white-space:nowrap;
}

/* バッジの横並び（詳細ヘッダ/一覧カード） */
.giveaway-badge-row,
.lottery-date-row{
  display:flex;
  align-items:center;
  column-gap:.5em;
  row-gap:.25em;
  flex-wrap:wrap;          /* 狭い幅では折り返し可 */
  margin:8px 0;
}
/* 一覧カードだけは2段構成にするため、縦方向の起点を上に合わせる */
.giveaway-card-content .giveaway-badge-row{
  align-items:flex-start;
}

/* 折り返し抑制（狭小時の不要改行を軽減） */
.giveaway-status,
.giveaway-lottery-date-badge{
  white-space:nowrap;
}

/* 「投稿（開催開始）」ボタン */
.button.publish-project-button{
  background:linear-gradient(180deg,#10b981,#059669); /* emerald */
  color:#fff;
  border:1px solid #059669;
  border-radius:6px;
  font-weight:700;
  padding:.6em 1em;
  box-shadow:0 2px 6px rgba(16,185,129,.25);
  transition:transform .02s ease, filter .2s ease, box-shadow .2s ease;
}
.button.publish-project-button:hover{
  filter:brightness(1.05);
  box-shadow:0 4px 12px rgba(16,185,129,.3);
}
.button.publish-project-button:active{
  transform:translateY(1px);
}
.button.publish-project-button[disabled],
.button.publish-project-button.is-disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
  filter:grayscale(.1) brightness(.95);
}

/* === 抽選日をステータスの下段に表示（一覧カード） === */
/* 一覧カードのコンテンツ領域にある抽選日バッジだけを縦配置にする */
.giveaway-card-content .giveaway-status + .giveaway-lottery-date-badge{
  display:inline-flex;    /* pill見た目は維持 */
  flex-basis:100%;        /* 強制的に次の行の先頭へ */
  margin-top:.5em;        /* ステータスとの間隔 */
  margin-left:0;          /* 左端をステータスと揃える */
  width:auto;             /* 内容幅にフィット */
}
/* 予防的にタイトルとの余白も適度に確保（任意） */
.giveaway-card-title{
  margin-bottom:.25em;
}

/* === 抽選日をステータスの下段に表示（詳細ページヘッダ） === */
/* 詳細表示ヘッダ（.giveaway-card-header 内）に限り、抽選日を次行へ回し左端をステータスに揃える */
.giveaway-card-header .lottery-date-row{
  align-items:flex-start;            /* 左端揃え（行内要素の縦位置を上に） */
}
.giveaway-card-header .lottery-date-row .giveaway-status + .giveaway-lottery-date-badge{
  flex-basis:100%;                   /* 次の行に回す */
  display:inline-flex;               /* pillの内側レイアウトは維持 */
  margin-top:.5em;                   /* ステータスとの間隔 */
  width:max-content;                 /* pill幅を内容にフィット */
}

/* 開催開始ボタンのスモール版（カード幅が狭いテーマ用に自動縮小） */
@media (max-width: 480px){
  .button.publish-project-button{
    width:100%;
    text-align:center;
  }
}

/* SVGファイルをショートコードで挿入 */
.medio-svg-wrap { width: min(100%, 1200px); margin-inline: auto; }
.medio-svg-wrap svg { display: block; width: 100%; height: auto; }
@media (max-width: 480px) {
  .medio-svg-wrap { padding-inline: 8px; }
}
