/* EV Frame: 左サイドバー＋フレームレイアウト（トップ525以外）
   色・寸法はトップ525の .side-nav と同一トーンに合わせる */
.ev-frame-side{display:none;}

@media (min-width:1024px){
  body:not(.page-id-525) #content-in{
    display:flex;
    /* Cocoon標準の .content-in{flex-wrap:wrap;justify-content:space-between} を打ち消す。
       wrap のままだと #main の flex base size（basis:auto＝max-content）が大きい記事で
       サイドバーの下段に回り込み、sticky サイドバーが全幅の本文に重なってしまう（2026-11-11障害） */
    flex-wrap:nowrap;
    justify-content:flex-start;
    align-items:flex-start;
    gap:24px;
  }
  body:not(.page-id-525) #main{
    /* basis を 0% にして base size をコンテンツ幅から切り離す（wrap 耐性） */
    flex:1 1 0%;
    width:auto !important;
    max-width:none !important;
    min-width:0;
    float:none !important;
  }
  .ev-frame-side{
    display:block;
    flex:0 0 240px;
    width:240px;
    position:sticky;
    top:140px;
    z-index:5;
  }
  body.admin-bar .ev-frame-side{top:172px;}

  /* デスクトップでも検索を使えるようにする（2026-11-11）：
     Cocoon のヘッダーには検索ボタンが無く、ev-header-buttons はモバイル幅のみ表示のため、
     検索ボタンと検索バーだけをデスクトップ幅でも有効化する（メニューボタンとドロワーは出さない）。
     ev-header-buttons 側の @media(min-width:1024px){display:none!important} を
     詳細度の高いセレクタ＋!important で上書きし、バーの見た目は同プラグインのモバイル用指定を複製する */
  body:not(.page-id-525) .evhb-btns{
    display:flex !important;
    position:fixed;
    top:42px;
    right:24px;
    z-index:1003;
    gap:8px;
  }
  body.admin-bar:not(.page-id-525) .evhb-btns{top:74px;}
  body:not(.page-id-525) .evhb-btn{
    width:44px;
    height:44px;
    background:#fff;
    border:1px solid #d7e3ee;
    border-radius:0;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    padding:0;
    -webkit-tap-highlight-color:transparent;
  }
  body:not(.page-id-525) .evhb-btn svg{
    width:22px;
    height:22px;
    stroke:#20303c;
    fill:none;
    stroke-width:2.2;
    stroke-linecap:round;
  }
  body:not(.page-id-525) #evhbMenuBtn{display:none !important;}
  body:not(.page-id-525) .evhb-search{
    display:block !important;
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1004;
    background:#fff;
    border-bottom:1px solid #d7e3ee;
    box-shadow:0 6px 14px rgba(20,70,124,.12);
    padding:8px 12px;
    transform:translateY(-110%);
    transition:transform .25s ease;
  }
  body.admin-bar:not(.page-id-525) .evhb-search{top:32px;}
  body:not(.page-id-525) .evhb-search.open{transform:translateY(0);}
  body:not(.page-id-525) .evhb-search form{display:flex;gap:8px;margin:0;align-items:center;}
  body:not(.page-id-525) .evhb-search input[type="search"]{
    flex:1;
    height:44px;
    border:1px solid #b9cbdd;
    border-radius:0;
    padding:0 12px;
    font-size:16px;
    min-width:0;
    background:#fff;
    -webkit-appearance:none;
    appearance:none;
  }
  body:not(.page-id-525) .evhb-search button[type="submit"]{
    height:44px;
    padding:0 16px;
    background:#14467c;
    color:#fff;
    border:0;
    border-radius:0;
    font-weight:700;
    font-size:15px;
    cursor:pointer;
    flex:none;
  }
  body:not(.page-id-525) .evhb-search .evhb-sclose{
    width:44px;
    height:44px;
    background:#fff;
    border:1px solid #d7e3ee;
    border-radius:0;
    font-size:17px;
    color:#20303c;
    cursor:pointer;
    flex:none;
    line-height:1;
  }
}

/* Cocoonの右サイドバーは全ページで非表示（525はテーマ側で非表示済み） */
body:not(.page-id-525) #sidebar{display:none !important;}

.evf-side-nav{
  background:#f3f7ff;
  border:1px solid #e2e9f2;
  padding:18px 16px;
  font-family:"Noto Sans JP","Hiragino Kaku Gothic ProN",sans-serif;
}
.evf-side-group{margin:0 0 18px;}
.evf-side-group:last-child{margin-bottom:0;}
.evf-side-group h3{
  font-size:13px;
  letter-spacing:.06em;
  color:#71808a;
  margin:0 0 6px;
  padding:0 10px;
  font-weight:700;
}
.evf-side-group a{
  display:block;
  padding:8px 10px;
  font-size:14px;
  font-weight:700;
  color:#3d474c;
  text-decoration:none;
  line-height:1.5;
}
.evf-side-group a:hover{background:#fff;color:#004fd6;}
