/* JASSH 0.3.14: account menu + distinctive, legible journal masthead.
   Applied last; OJS user links and permissions remain native. */

/* Use ONE disclosure to open all user actions. A native OJS profile heading
   may be a separate link; it must not sit next to the visible My Account label. */
html .jassh-ui .jassh-account-wrapper.jassh-account-native {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:12px !important;
  isolation:isolate;
}
html .jassh-ui .jassh-account-native > .vl-locale {
  display:inline-flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  color:#1e5277 !important;
  font:500 13px/1.3 Arial,'Segoe UI',sans-serif !important;
  white-space:nowrap !important;
}
html .jassh-ui .jassh-account-native .jassh-account-details {
  display:block !important;
  position:relative !important;
  flex:0 0 auto !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 !important;
  color:#073b63;
}
html .jassh-ui .jassh-account-native .jassh-native-account-summary {
  display:inline-flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:15px !important;
  min-height:35px !important;
  min-width:147px !important;
  padding:6px 12px !important;
  margin:0 !important;
  border:1px solid #bcd9e9 !important;
  border-radius:7px !important;
  background:#fff !important;
  box-shadow:0 1px 3px rgba(6,50,90,.07) !important;
  color:#06466f !important;
  font:600 14px/1.25 Arial,'Segoe UI',sans-serif !important;
  cursor:pointer !important;
  list-style:none !important;
  user-select:none;
  text-decoration:none !important;
  box-sizing:border-box !important;
}
html .jassh-ui .jassh-account-native .jassh-native-account-summary::-webkit-details-marker {display:none !important}
html .jassh-ui .jassh-account-native .jassh-native-account-summary::marker {content:''}
html .jassh-ui .jassh-account-native .jassh-native-account-summary:hover,
html .jassh-ui .jassh-account-native .jassh-native-account-summary:focus-visible {
  background:#e9f8fc !important;
  border-color:#1399aa !important;
  outline:2px solid transparent !important;
}
html .jassh-ui .jassh-account-native .jassh-account-chevron {
  display:inline-block !important;
  font-size:19px !important;
  line-height:1 !important;
  transition:transform .15s ease;
}
html .jassh-ui .jassh-account-native details[open] .jassh-account-chevron {transform:rotate(180deg)}
/* Late v0.3.14 selector beats earlier unconditional .jassh-account-panel rules. */
html .jassh-ui .jassh-account-native details:not([open]) > .jassh-native-account-panel {
  display:none !important;
  visibility:hidden !important;
}
html .jassh-ui .jassh-account-native details[open] > .jassh-native-account-panel {
  display:block !important;
  visibility:visible !important;
  position:absolute !important;
  z-index:9999 !important;
  top:calc(100% + 7px) !important;
  right:0 !important;
  left:auto !important;
  width:250px !important;
  min-width:235px !important;
  max-width:min(94vw,300px) !important;
  margin:0 !important;
  padding:8px !important;
  border:1px solid #cbdfea !important;
  border-radius:10px !important;
  background:#fff !important;
  box-shadow:0 14px 30px rgba(6,40,80,.18) !important;
  transform:none !important;
  box-sizing:border-box !important;
}
html .jassh-ui .jassh-account-native #navigationUser.pkp_navigation_user,
html .jassh-ui .jassh-account-native #navigationUser.pkp_navigation_user > li,
html .jassh-ui .jassh-account-native #navigationUser.pkp_navigation_user > li > ul {
  display:block !important;
  position:static !important;
  float:none !important;
  clear:none !important;
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  transform:none !important;
  list-style:none !important;
  grid-template-columns:none !important;
  box-sizing:border-box !important;
}
/* Native OJS profile-parent anchor (username/task count) is a menu trigger,
   not an action; the details summary above replaces it. */
html .jassh-ui .jassh-account-native #navigationUser > li.profile:has(ul) > a,
html .jassh-ui .jassh-account-native #navigationUser > li:has(ul) > a,
html .jassh-ui .jassh-account-native #navigationUser > li.profile > a:first-child:not(:only-child) {
  display:none !important;
  visibility:hidden !important;
}
html .jassh-ui .jassh-account-native #navigationUser li > a:not([hidden]) {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  min-width:0 !important;
  min-height:39px !important;
  width:100% !important;
  margin:0 !important;
  padding:9px 12px !important;
  border:0 !important;
  border-radius:6px !important;
  background:transparent !important;
  color:#104b76 !important;
  font:600 13px/1.3 Arial,'Segoe UI',sans-serif !important;
  text-align:left !important;
  text-decoration:none !important;
  white-space:normal !important;
  box-sizing:border-box !important;
}
html .jassh-ui .jassh-account-native #navigationUser li > a:hover,
html .jassh-ui .jassh-account-native #navigationUser li > a:focus-visible {
  background:#eaf7fb !important;
  color:#00558b !important;
}
/* A last, more specific selector so parent anchors cannot be forced visible
   by the generic link styling above. */
html .jassh-ui .jassh-account-native #navigationUser > li.profile:has(ul) > a,
html .jassh-ui .jassh-account-native #navigationUser > li:has(ul) > a {
  display:none !important;
}
html .jassh-ui .jassh-account-native #navigationUser ul ul {
  display:block !important;
  position:static !important;
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  background:transparent !important;
}

/* School-life image and subtle gradients replace empty white mastheads. */
@media(min-width:993px) {
  html .jassh-ui.vl-family-issue .pkp_site_name_wrapper,
  html .jassh-ui.vl-family-authors .pkp_site_name_wrapper {
    display:flex !important;
    align-items:center !important;
    position:relative !important;
    min-height:156px !important;
    height:156px !important;
    overflow:hidden !important;
    padding:16px clamp(24px,3.5vw,60px) !important;
    border-bottom:1px solid #d9ecf4 !important;
    background-image:
      linear-gradient(90deg,rgba(255,255,255,1) 0%,rgba(255,255,255,.99) 29%,rgba(255,255,255,.84) 49%,rgba(242,251,255,.56) 70%,rgba(232,250,252,.3) 100%),
      url('../assets/hero/A01_HERO_BACKGROUND_PRIMARY.png') !important;
    background-size:cover,cover !important;
    background-position:center,right 49% !important;
    background-repeat:no-repeat !important;
  }
  html .jassh-ui.vl-family-issue .pkp_site_name_wrapper .pkp_site_name,
  html .jassh-ui.vl-family-authors .pkp_site_name_wrapper .pkp_site_name {
    position:relative !important;
    z-index:2 !important;
  }
  html .jassh-ui.vl-family-issue .vl-masthead-slogan,
  html .jassh-ui.vl-family-authors .vl-masthead-slogan {
    z-index:3 !important;
    right:clamp(20px,3.5vw,64px) !important;
    top:32px !important;
    width:235px !important;
    padding:10px 8px !important;
    border-radius:12px !important;
    background:radial-gradient(ellipse at center,rgba(255,255,255,.91),rgba(255,255,255,.56) 72%,transparent) !important;
    color:#0a3d77 !important;
    font-size:clamp(21px,2vw,26px) !important;
    line-height:1.2 !important;
    text-shadow:0 2px 10px #fff !important;
  }
  html .jassh-ui.vl-family-authors .vl-masthead-tagline {
    display:block !important;
    position:absolute !important;
    top:76px !important;
    left:clamp(430px,38vw,620px) !important;
    max-width:320px !important;
    margin:0 !important;
    color:#17466d !important;
    font-size:11px !important;
    letter-spacing:.7px !important;
    line-height:1.6 !important;
  }
}
@media(min-width:993px) and (max-width:1350px) {
  html .jassh-ui.vl-family-authors .vl-masthead-tagline {display:none !important}
}
@media(max-width:992px) {
  html .jassh-ui.vl-family-issue .pkp_site_name_wrapper,
  html .jassh-ui.vl-family-authors .pkp_site_name_wrapper {
    background-image:
      linear-gradient(93deg,#fff 0%,rgba(255,255,255,.94) 36%,rgba(255,255,255,.55) 73%,rgba(242,250,255,.5) 100%),
      url('../assets/hero/A01_HERO_BACKGROUND_PRIMARY.png') !important;
    background-size:cover,cover !important;
    background-position:center,76% center !important;
    background-repeat:no-repeat !important;
    border-bottom:1px solid #d8edf5 !important;
  }
  /* The closed mobile menu still stays closed. When opened, account actions
     flow below Search inside navy menu rather than overlaying the masthead. */
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-wrapper.jassh-account-native {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    width:100% !important;
    padding:13px 0 0 !important;
    margin:12px 0 0 !important;
    border-top:1px solid rgba(236,251,255,.23) !important;
    background:transparent !important;
    box-shadow:none !important;
  }
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native > .vl-locale {
    display:block !important;
    align-self:flex-start !important;
    margin-bottom:8px !important;
    color:#e5f7fb !important;
    font-size:13px !important;
  }
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native .jassh-account-details {width:100% !important;}
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native .jassh-native-account-summary {
    display:flex !important;
    width:100% !important;
    min-height:46px !important;
    padding:11px 14px !important;
    border-color:rgba(228,251,255,.4) !important;
    background:#0d6696 !important;
    color:#fff !important;
    font-size:15px !important;
  }
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native details[open] > .jassh-native-account-panel {
    display:block !important;
    position:static !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    margin:9px 0 0 !important;
    padding:8px !important;
    border-color:rgba(210,243,251,.25) !important;
    background:#0c507f !important;
    box-shadow:none !important;
  }
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native #navigationUser li > a:not([hidden]) {
    min-height:45px !important;
    padding:11px 12px !important;
    background:#11658f !important;
    color:#fff !important;
    border:1px solid rgba(233,252,255,.11) !important;
    border-radius:6px !important;
  }
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native #navigationUser li + li,
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native #navigationUser ul li + li {margin-top:5px !important;}
  html.jassh-mobile-nav-open .jassh-ui .jassh-account-native #navigationUser > li:has(ul) > a {display:none !important;}
}
