/* ClearIAS Junior 2.5 – narrowly scoped Classic Editor + Genesis repairs.
   Does not affect article posts or pages without cjcr-classic-page on <body>. */
body.cjcr-classic-page .site-inner,
body.cjcr-classic-page .site-inner > .wrap,
body.cjcr-classic-page .content-sidebar-wrap,
body.cjcr-classic-page .content-sidebar-wrap > .wrap,
body.cjcr-classic-page .content,
body.cjcr-classic-page article.entry,
body.cjcr-classic-page .entry,
body.cjcr-classic-page article.entry .entry-content,
body.cjcr-classic-page .entry-content {
  margin-top:0!important;
  margin-bottom:0!important;
  padding-top:0!important;
  padding-bottom:0!important;
  border-top:0!important;
  min-height:0!important;
  width:100%!important;
  max-width:none!important;
}
body.cjcr-classic-page .site-inner > .wrap,
body.cjcr-classic-page .content-sidebar-wrap {
  margin-left:0!important;
  margin-right:0!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.cjcr-classic-page .content-sidebar-wrap .sidebar {display:none!important}
body.cjcr-classic-page article.entry .entry-header,
body.cjcr-classic-page .entry-header,
body.cjcr-classic-page .breadcrumb,
body.cjcr-classic-page .genesis-breadcrumb {display:none!important}
body.cjcr-classic-page .entry-content > main.cj,
body.cjcr-classic-page main.cj.cj-home,
body.cjcr-classic-page main.cj.cj-inner,
body.cjcr-classic-page main.cj.cj-programme {
  display:block!important;
  width:100%!important;max-width:none!important;
  margin:0!important;padding:0!important;clear:none!important;
}
body.cjcr-classic-page .entry-content > p:empty,
body.cjcr-classic-page .entry-content > p:has(> br:only-child),
body.cjcr-classic-page .entry-content > p:has(> span:empty) {display:none!important}
body.cjcr-classic-page .nav-primary {margin-bottom:0!important}
body.cjcr-classic-page .nav-primary + .site-inner {margin-top:0!important}
/* Make final CTAs readable even when Genesis link state rules override buttons. */
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white,
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white:link,
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white:visited,
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white:hover,
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white:focus-visible,
body.cjcr-classic-page main.cj a.cj-btn.cj-btn-white * {
  color:#991326!important;background-color:#fff!important;opacity:1!important;text-shadow:none!important;
}
body.cjcr-classic-page main.cj .cj-final-cta a.cj-btn.cj-btn-outline-light,
body.cjcr-classic-page main.cj .cj-final-cta a.cj-btn.cj-btn-outline-light:visited,
body.cjcr-classic-page main.cj .cj-final-cta a.cj-btn.cj-btn-outline-light * {
  color:#fff!important;opacity:1!important;
}
/* Controlled Genesis mobile menu: prevents theme/menu JavaScript double-toggling.
   Scope: ONLY the five Junior landing pages. */
@media(min-width:981px){
  body.cjcr-classic-page .nav-primary{display:block!important}
  body.cjcr-classic-page .menu-toggle:not(.sub-menu-toggle),
  body.cjcr-classic-page .cjcr-nav-toggle{display:none!important}
}
@media(max-width:980px){
  body.cjcr-classic-page .nav-primary{display:none!important;margin:0!important;padding:0!important}
  body.cjcr-classic-page.cjcr-menu-open .nav-primary{display:block!important}
  body.cjcr-classic-page .nav-primary .genesis-nav-menu{display:block!important}
  body.cjcr-classic-page .nav-primary .genesis-nav-menu > .menu-item{float:none!important;width:100%!important}
  body.cjcr-classic-page .menu-toggle:not(.sub-menu-toggle),
  body.cjcr-classic-page .cjcr-nav-toggle{
    display:block!important;background:#191a1e!important;color:#fff!important;
    width:100%!important;min-height:47px!important;margin:0!important;
    padding:12px 17px!important;border:0!important;border-radius:0!important;
    cursor:pointer;font-size:15px!important;line-height:1.4!important;
    text-align:center!important;font-weight:750!important;
  }
  body.cjcr-classic-page .nav-primary .genesis-nav-menu > .menu-item > a{color:#fff!important}
  body.cjcr-classic-page .menu-toggle:not(.sub-menu-toggle):focus-visible,
  body.cjcr-classic-page .cjcr-nav-toggle:focus-visible{outline:2px solid #ffc74b!important;outline-offset:-3px}
}
/* New player is independent of old v2.4 dialog rules and Classic Editor HTML. */
body.cjcr-video-open {overflow:hidden!important}
dialog.cjcr-video-modal {
  position:fixed;box-sizing:border-box;z-index:2147483640;
  width:min(1100px,calc(100vw - 36px));max-width:1100px;
  max-height:calc(100dvh - 28px);margin:auto;padding:0;
  border:1px solid #505158;border-radius:13px;
  background:#16171b;color:#fff;box-shadow:0 30px 90px #000b;
  overflow:auto;font:15px/1.5 Arial,Helvetica,sans-serif;
}
dialog.cjcr-video-modal:not([open]){display:none!important}
dialog.cjcr-video-modal::backdrop{background:rgba(6,7,10,.85)}
.cjcr-video-modal *{box-sizing:border-box}
.cjcr-video-modal__head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 18px}
.cjcr-video-modal__title{color:#fff;font-size:clamp(15px,2vw,20px);line-height:1.35;font-weight:800}
.cjcr-video-modal__close{border:1px solid #85858a;background:#34353b;color:#fff!important;padding:8px 15px;border-radius:7px;cursor:pointer;white-space:nowrap;font-weight:800;font-size:15px;min-height:43px}
.cjcr-video-modal__close:hover{background:#c4172b;color:#fff!important}
.cjcr-video-modal__close:focus-visible{outline:3px solid #ffc74b;outline-offset:3px}
.cjcr-video-modal__frame{background:#050505;aspect-ratio:16 / 9;position:relative;width:100%;overflow:hidden}
.cjcr-video-modal__frame iframe{display:block;position:absolute;inset:0;border:0;width:100%;height:100%}
.cjcr-video-modal__foot{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;padding:12px 18px;font-size:12px;color:#dbdce0}
.cjcr-video-modal__foot a,.cjcr-video-modal__foot a:visited{color:#fff!important;text-decoration:underline}
@media(max-width:600px){
  dialog.cjcr-video-modal{width:calc(100vw - 14px);max-height:calc(100dvh - 14px);border-radius:9px}
  .cjcr-video-modal__head{padding:10px}
  .cjcr-video-modal__title{font-size:14px}
  .cjcr-video-modal__close{padding:7px 10px}
  .cjcr-video-modal__foot{padding:10px;font-size:11px}
}

/* v2.6: show one plugin-owned mobile menu toggle; suppress extra Genesis icons. */
body.cjcr-classic-page .cjcr-native-toggle-hidden,
body.cjcr-classic-page .nav-primary .menu-toggle:not(.sub-menu-toggle),
body.cjcr-classic-page .responsive-menu-icon,
body.cjcr-classic-page .responsive-menu-toggle { display:none!important;visibility:hidden!important; }
body.cjcr-classic-page .cjcr-nav-toggle::before,
body.cjcr-classic-page .cjcr-nav-toggle::after{content:none!important;display:none!important}
body.cjcr-classic-page .cjcr-nav-glyph{display:inline-block!important;font:inherit!important;margin-right:6px}
@media(min-width:981px){body.cjcr-classic-page .cjcr-nav-toggle{display:none!important}}
@media(max-width:980px){
 body.cjcr-classic-page button.cjcr-nav-toggle[data-cjcr-owned="1"]{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important}
 body.cjcr-classic-page .nav-primary{display:none!important}
 body.cjcr-classic-page.cjcr-menu-open .nav-primary{display:block!important}
}
@media(max-width:980px){
 body.cjcr-classic-page .menu-toggle:not(.sub-menu-toggle).cjcr-native-toggle-hidden,
 body.cjcr-classic-page .responsive-menu-icon.cjcr-native-toggle-hidden,
 body.cjcr-classic-page button.responsive-menu-toggle.cjcr-native-toggle-hidden{display:none!important;visibility:hidden!important}
}
/* Robust even if Genesis inserts its toggle after DOMContentLoaded. */
body.cjcr-classic-page button.menu-toggle:not(.sub-menu-toggle):not(.cjcr-nav-toggle),
body.cjcr-classic-page .menu-toggle:not(.sub-menu-toggle):not(.cjcr-nav-toggle),
body.cjcr-classic-page .responsive-menu-icon,
body.cjcr-classic-page button.responsive-menu-toggle {
  display:none!important;visibility:hidden!important;
}

/* ClearIAS Junior v2.8: intentionally align the content-bearing panels.
   The slight rotations were decorative, not layout bugs.
   Device mockups on /app/ remain angled deliberately. */
body.cjcr-classic-page main.cj .cj-p-hero-visual,
body.cjcr-classic-page main.cj.cjx-page .cjx-hero-panel,
body.cjcr-classic-page main.cj.cjaccess-page .cjaccess-hero-card,
body.cjcr-classic-page main.cj .cj-method-art,
body.cjcr-classic-page main.cj .cj-thinking-card {
  transform: none !important;
}
