@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
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/* 用語カード風 */
.term-box{
  border:1px solid #ddd;
  border-radius:12px;
  padding:16px;
  margin:18px 0;
  background:#fff;
}
.term-box h3{ margin-top:0; }
.term-impact{
  border-left:4px solid #111;
  padding-left:12px;
  margin:10px 0;
}
.term-note{
  font-size:0.95em;
  opacity:.85;
}

/* ==========================================
   1. Base Colors
   ========================================== */
:root{
  --p-red:#b71c1c;
  --p-blue:#0073aa;
  --p-green:#28a745;
  --p-orange:#ffa940;

  --p-gray:#757575;
  --p-dark-gray:#424242;
}

/* ==========================================
   2. Header & Red Bar
   ========================================== */
/* Cocoonのヘッダー本体だけを非表示（全ページ） */
#header-container,
#site-header,
header#header{
  display:none !important;
}

.custom-brand-bar{
  background-color:var(--p-red) !important;
  color:#fff !important;
  padding:15px 16px;
  text-align:center;
  font-weight:bold;
}

.custom-page-header{
  padding:16px;
  background:#fff;
  border-bottom:1px solid #eee;
}
.custom-page-header h1{
  font-size:1.1rem;
  margin:0;
  border-left:4px solid var(--p-red);
  padding-left:10px;
}

/* ==========================================
   3. Golden Format Boxes
   ========================================== */
.summary-box{
  border:2px solid var(--p-red);
  padding:15px;
  border-radius:8px;
  margin-bottom:20px;
}

.detail-worker,.detail-user{
  border-radius:8px;
  margin-bottom:15px;
  overflow:hidden;
}
.detail-worker{ border:2px solid var(--p-blue); }
.detail-user{ border:2px solid var(--p-green); }

.detail-worker summary,
.detail-user summary{
  color:#fff !important;
  padding:10px;
  font-weight:bold;
  cursor:pointer;
  list-style:none;
}
.detail-worker summary{ background:var(--p-blue); }
.detail-user summary{ background:var(--p-green); }

.detail-worker summary::-webkit-details-marker,
.detail-user summary::-webkit-details-marker{
  display:none;
}

.impact-box{
  border:2px solid var(--p-orange);
  background:#fff7e6;
  padding:15px;
  border-radius:8px;
  margin-bottom:20px;
}
.caregiver-view{
  border:2px solid var(--p-blue);
  background:#f0f7ff;
  padding:15px;
  border-radius:8px;
  margin-bottom:20px;
}

/* ==========================================
   4. Common Parts
   ========================================== */
.nav-btn-unified{
  display:block !important;
  width:100% !important;
  max-width:600px;
  margin:30px auto;
  padding:15px;
  background-color:var(--p-blue) !important;
  color:#fff !important;
  text-align:center;
  text-decoration:none;
  font-weight:bold;
  border-radius:10px;
}

/* ==========================================
   5. Sidebar Cards (共通ベース)
   ========================================== */
.sidebar-contact-hub .contact-card,
.sidebar-guide-button{
  display:block;
  margin-bottom:15px;
  padding:15px;
  border-radius:8px;
  text-decoration:none !important;
  transition:all 0.3s ease;
  border:1px solid #ddd;
  box-shadow:0 2px 5px rgba(0,0,0,0.05);
  background:#fff;
}
.sidebar-contact-hub .contact-card:hover,
.sidebar-guide-button:hover{
  transform:translateY(-3px);
  box-shadow:0 5px 15px rgba(0,0,0,0.1);
}

/* Contact Hub（中身） */
.sidebar-contact-hub .card-title{
  font-weight:bold;
  font-size:15px;
  margin-bottom:5px;
  display:flex;
  align-items:center;
}
.sidebar-contact-hub .card-title i{ margin-right:8px; }
.sidebar-contact-hub .card-desc{
  font-size:11px;
  color:#666;
  line-height:1.4;
}

.card-fear{ border-left:6px solid var(--p-red); }
.card-fear .card-title{ color:var(--p-red); }
.card-hope{ border-left:6px solid var(--p-blue); }
.card-hope .card-title{ color:var(--p-blue); }
.card-general{ border-left:6px solid var(--p-gray); }
.card-general .card-title{ color:var(--p-dark-gray); }

/* Guide Buttons（中身） */
.sidebar-guide-button{
  color:#111;
  font-weight:bold;
  line-height:1.4;
}
.sidebar-guide-button small{
  display:block;
  font-size:11px;
  color:#666;
  font-weight:normal;
  margin-top:4px;
}
.sidebar-guide-button.guide-facility{ border-left:6px solid var(--p-blue); }
.sidebar-guide-button.guide-glossary{ border-left:6px solid var(--p-orange); }

/* ==========================================
   6. Tables: PCはスクロール不要 / スマホだけ横スクロール
   ========================================== */

/* ページ全体が横に動くのを防ぐ（止血） */
html, body{ overflow-x: hidden; }

/* ===== PC/共通：表は基本100%で表示（横スクロールしない） ===== */
.admin-table-wrap,
.wp-block-table{
  max-width:100%;
  overflow-x: visible;
}

.admin-table-wrap table,
.wp-block-table > table{
  width:100%;
  min-width:0;
  border-collapse:collapse;
}

/* ===== スマホだけ：表を横スクロールにする ===== */
@media (max-width:767px){

  .admin-table-wrap,
  .wp-block-table{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    border:1px solid #ddd;
    border-radius:10px;
  }

  .admin-table-wrap table,
  .wp-block-table > table{
    width:max-content;
    min-width:900px; /* 列数に応じて 800〜1000 */
  }

  /* スクロール案内（上に表示） */
  .admin-table-wrap::before,
  .wp-block-table::before{
    content:"← 横にスライドできます →";
    display:block;
    text-align:center;
    font-size:11px;
    color:#888;
    padding:8px 0 6px;
    font-weight:bold;
  }
}
/* ===== スマホ：表→カード切替 ===== */
@media (max-width: 767px){
  .wp-block-table{
    display:none;
  }
  .hub-card-list{
    display:block;
  }
}

/* PCではカード非表示 */
@media (min-width: 768px){
  .hub-card-list{
    display:none;
  }
}

/* ===== カードUI ===== */
.hub-card{
  border:1px solid #ddd;
  border-radius:10px;
  padding:14px;
  margin-bottom:14px;
  background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,.05);
}

.hub-card-date{
  font-size:.8em;
  color:#666;
  margin-bottom:6px;
}

.hub-card-title{
  font-weight:bold;
  font-size:.95em;
  margin-bottom:6px;
}

.hub-card-desc{
  font-size:.85em;
  color:#555;
  line-height:1.5;
  margin-bottom:8px;
}

.hub-card-action{
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.hub-badge{
  font-weight:bold;
  font-size:.8em;
}
.hub-badge.cancel{ color:#c62828; }
.hub-badge.stop{ color:#ff8f00; }

.hub-card-link{
  font-size:.85em;
  color:#0073aa;
  text-decoration:underline;
}
/* スマホでは表を非表示（カード表示用） */
@media (max-width: 767px){
  .admin-table-wrap{
    display:none;
  }
}
/* カードのバッジ色 */
.hub-badge.cancel{ color:#c62828 !important; }  /* 指定取消：赤 */
.hub-badge.stop{   color:#f9a825 !important; }  /* 効力停止/一部停止/全部停止：黄 */

/* 表の処分内容セル（4列目）も同じ色にする */
.hub-table td:nth-child(4) .hub-action-cancel{ color:#c62828 !important; font-weight:bold; }
.hub-table td:nth-child(4) .hub-action-stop{   color:#f9a825 !important; font-weight:bold; }

/* hub（都道府県ハブ）専用の微調整 */
.hub-block .hub-card.hidden-card { display: none !important; }
.hub-block .view-more-btn[data-mode="sp"] { margin-top: 14px; }
  .hub-block .hub-filter-btn{
    background:#fff;
    border:1px solid #ccc;
    padding:8px 12px;
    border-radius:6px;
    cursor:pointer;
    font-size:0.85em;
    font-weight:bold;
    color:#333;
  }
  .hub-block .hub-filter-btn.active{
    background:#111827;
    color:#fff;
    border:none;
  }
