@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;

  --hub-danger:#d32f2f;
  --hub-warning:#f9a825;
  --hub-improve:#1890ff;
  --hub-improve-dark:#0958d9;
  --hub-border:#e5e7eb;
  --hub-soft:#f6f7fb;
}

/* ==========================================
   2. Header & Red Bar
   ========================================== */
#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);
}

.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); }

.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共通 / SP横スクロール
   ========================================== */
html, body{
  overflow-x:hidden;
}

.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;
  }

  .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;
  }
}

/* ==========================================
   7. Hub Layout / SP・PC切替
   ========================================== */
@media (max-width:767px){
  .hub-block .admin-table-wrap{
    display:none !important;
  }
  .hub-block .hub-card-list{
    display:block;
  }
}

@media (min-width:768px){
  .hub-block .hub-card-list{
    display:none !important;
  }
  .hub-block .admin-table-wrap{
    display:block;
  }
}

@media (min-width:768px){
  .hub-block [data-role="more"][data-mode="sp"],
  .hub-block .view-more-btn[data-mode="sp"]{
    display:none !important;
  }
}
@media (max-width:767px){
  .hub-block [data-role="more"][data-mode="pc"],
  .hub-block .view-more-btn[data-mode="pc"]{
    display:none !important;
  }
}

/* ==========================================
   8. Hub Card UI
   ========================================== */
.hub-card{
  border:1px solid var(--hub-border);
  border-radius:12px;
  padding:14px;
  margin:10px 0 14px;
  background:#fff;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}

.hub-block .hub-card.hidden-card{
  display:none !important;
}

.hub-card-date{
  font-weight:800;
  color:#111;
  font-size:.92em;
  margin-bottom:6px;
}

.hub-card-title{
  font-weight:900;
  font-size:1.05em;
  line-height:1.35;
  margin-bottom:6px;
}

.hub-card-meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 10px;
}

.hub-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-weight:800;
  font-size:.82em;
  background:#f3f4f6;
  color:#111;
}
.hub-chip.area{ background:#eef2ff; }
.hub-chip.service{ background:#ecfeff; }

.hub-card-desc{
  color:#444;
  line-height:1.55;
  font-size:.92em;
  margin-bottom:10px;
}

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

.hub-card-link{
  font-weight:900;
  font-size:.9em;
  color:#0073aa;
  text-decoration:none;
  white-space:nowrap;
}
.hub-card-link:hover,
.hub-card-link:focus{
  text-decoration:underline;
}

/* ==========================================
   9. Hub Badge / 処分色
   ========================================== */
.hub-badge{
  display:inline-block;
  font-weight:900;
  font-size:.85em;
  padding:4px 10px;
  border-radius:999px;
  background:#f3f4f6;
  white-space:nowrap;
}

.hub-badge.cancel{
  background:#ffebee;
  color:#c62828 !important;
}
.hub-badge.stop{
  background:#fff3e0;
  color:var(--hub-warning) !important;
}
.hub-badge.improve{
  background:#e6f4ff;
  color:var(--hub-improve-dark) !important;
}

.hub-action-cancel,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-cancel,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-cancel span{
  color:var(--hub-danger) !important;
  font-weight:900 !important;
}

.hub-action-stop,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-stop,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-stop span{
  color:var(--hub-warning) !important;
  font-weight:900 !important;
}

.hub-action-improve,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-improve,
.wp-block-table.is-style-stripes .hub-table tbody td.hub-action-improve span{
  color:var(--hub-improve) !important;
  font-weight:900 !important;
}

.hub-table td:nth-child(4) .hub-action-cancel{
  color:var(--hub-danger) !important;
  font-weight:bold;
}
.hub-table td:nth-child(4) .hub-action-stop{
  color:var(--hub-warning) !important;
  font-weight:bold;
}
.hub-table td:nth-child(4) .hub-action-improve{
  color:var(--hub-improve) !important;
  font-weight:bold;
}

/* ==========================================
   10. Hub Filters
   ========================================== */
.hub-block .hub-filter-btn{
  background:#fff;
  border:1px solid #ccc;
  padding:10px 14px;
  border-radius:999px;
  cursor:pointer;
  font-size:14px;
  font-weight:bold;
  color:#333;
  line-height:1;
}

.hub-block .hub-filter-btn.active{
  background:#111827;
  color:#fff;
  border:none;
}

.hub-block .hub-search-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:nowrap;
  margin-bottom:12px;
}

.hub-block .hub-filter-label{
  font-size:.85em;
  color:#555;
  font-weight:700;
  white-space:nowrap;
}

.hub-block .hub-search-input{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  font-size:.95em;
}

.hub-block .hub-clear-btn{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid #d1d5db;
  background:#fff;
  font-weight:800;
  cursor:pointer;
}

.hub-block .hub-advanced{
  border:1px solid var(--hub-border);
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}

.hub-block .hub-advanced-summary{
  list-style:none;
  cursor:pointer;
  padding:12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:900;
  color:#111;
}

.hub-block .hub-advanced-summary::-webkit-details-marker{
  display:none;
}

.hub-block .hub-advanced-body{
  padding:12px 12px 14px;
  border-top:1px solid #eef2f7;
}

.hub-block .hub-filter-group{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:10px;
}

@media (max-width:767px){
  .hub-block .hub-filter-group.action-filter-nav,
  .hub-block .hub-filter-group.fraud-filter-nav{
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:6px;
  }

  .hub-block .hub-filter-group.action-filter-nav .hub-filter-btn,
  .hub-block .hub-filter-group.fraud-filter-nav .hub-filter-btn{
    flex:0 0 auto;
  }
}

/* ==========================================
   11. More Button
   ========================================== */
.hub-block .view-more-btn,
.hub-block [data-role="more"]{
  display:block;
  text-align:center;
  background:#111827;
  color:#fff;
  border:1px solid #111827;
  padding:10px 18px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
  margin-top:12px;
}

.hub-block .view-more-btn[data-mode="sp"]{
  margin-top:14px;
}

/* ==========================================
   12. Minor Utilities
   ========================================== */
@keyframes blink{
  0%,100%{ opacity:.2; }
  50%{ opacity:1; }
}

.hub-loading-dot{
  display:inline-block;
  animation:blink 1.5s infinite;
}

/* ==========================================
   13. Hub common blocks
   ========================================== */
.visitor-guide{
  background:#fdfaf5;
  border:1px solid #e6dbb9;
  padding:20px;
  border-radius:8px;
  margin-bottom:20px;
  font-family:sans-serif;
}

.visitor-guide-title{
  font-weight:700;
  margin-top:0;
  font-size:1.1em;
  color:#856404;
}

.visitor-guide-alert{
  font-size:0.95em;
  color:#d32f2f;
  font-weight:700;
  margin-bottom:10px;
}

.visitor-guide-text{
  font-size:0.9em;
  line-height:1.6;
  margin-bottom:15px;
  color:#444;
}

.visitor-guide-details{
  background:#fff;
  padding:15px;
  border:1px solid #ddd;
  border-radius:5px;
}

.visitor-guide-summary{
  cursor:pointer;
  font-weight:bold;
  color:#0073aa;
  list-style:none;
}

.visitor-guide-body{
  margin-top:15px;
  font-size:0.9em;
  line-height:1.8;
}

.visitor-guide-list{
  margin:0;
  padding-left:20px;
}

.area-filter-nav{
  margin-bottom:25px;
  padding:15px;
  background:#f0f4f8;
  border-radius:8px;
  font-family:sans-serif;
}

.hub-filter-bar{
  margin-bottom:18px;
  padding:15px;
  background:#f6f7fb;
  border-radius:8px;
  font-family:sans-serif;
  border:1px solid #e5e7eb;
}

.hub-section-label{
  font-weight:bold;
  margin-bottom:10px;
  font-size:0.9em;
  color:#333;
}

.hub-section-label-tight{
  margin:0 0 10px;
}

.hub-btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.hub-filter-result{
  margin-top:10px;
  font-size:.85em;
  color:#444;
}

.hub-alert{
  background:#fff5f5;
  border:2px solid #ff4d4d;
  padding:20px;
  border-radius:10px;
  margin-bottom:30px;
  font-family:sans-serif;
}

.hub-alert-title{
  color:#d32f2f;
  margin-top:0;
  font-size:1.25em;
}

.hub-alert-text{
  margin-bottom:0;
  font-size:0.95em;
  line-height:1.6;
}

.hub-list-guide{
  margin-bottom:15px;
  font-weight:bold;
  font-size:0.95em;
  color:#444;
  line-height:1.5;
}

.hub-list-guide-note{
  font-size:0.85em;
  color:#666;
  font-weight:normal;
}

.hub-loading-box{
  padding:30px;
  text-align:center;
  color:#666;
  font-size:0.9em;
  background:#f9f9f9;
  border-radius:8px;
}

.hub-portal-note{
  margin-top:40px;
  padding:25px;
  background:#f8f9fa;
  border-radius:12px;
  border:1px solid #ddd;
  text-align:center;
  font-family:sans-serif;
}

.hub-portal-note-text{
  margin-top:0;
  font-weight:bold;
  color:#333;
  font-size:1.05em;
}

.hub-portal-link{
  display:inline-block;
  margin-top:15px;
  padding:15px 30px;
  background:#0073aa;
  color:#fff;
  text-decoration:none;
  border-radius:8px;
  font-weight:bold;
  font-size:1.1em;
}
.hub-portal-link:hover{
  opacity:0.9;
}

/* ===== Area buttons ===== */
.area-filter-nav .filter-btn{
  background:#fff;
  border:1px solid #ccc;
  padding:8px 16px;
  border-radius:4px;
  cursor:pointer;
  font-size:0.85em;
  font-weight:bold;
  color:#333;
}

.area-filter-nav .filter-btn.active{
  background:#111827;
  color:#fff;
  border:none;
}

/* ===== Hub table common ===== */
.hub-table{
  width:100%;
  border-collapse:collapse;
  font-size:0.85em;
  border:1px solid #ccc;
}

.hub-table thead tr{
  background:#f2f2f2;
}

.hub-table th,
.hub-table td{
  border:1px solid #ccc;
  padding:12px;
}

.hub-table th:nth-child(1){ width:12%; }
.hub-table th:nth-child(2){ width:33%; }
.hub-table th:nth-child(3){ width:25%; }
.hub-table th:nth-child(4){ width:15%; }
.hub-table th:nth-child(5){ width:15%; }

.hub-table th:nth-child(1),
.hub-table td:nth-child(1),
.hub-table th:nth-child(4),
.hub-table td:nth-child(4),
.hub-table th:nth-child(5),
.hub-table td:nth-child(5){
  text-align:center;
}

/* ===== Hub tbody cleanup ===== */
.hub-desc{
  font-size:0.9em;
  color:#666;
}

/* ===== Table Center Fix ===== */
.hub-block .hub-table thead th:nth-child(4),
.hub-block .hub-table tbody td:nth-child(4){
  text-align:center !important;
}