/* JASSH v0.3.20: reserve a safe top-right slot for the temporary E-ISSN badge.
   Goal: the badge must never cover the masthead slogan or the value stack.
   No database or core OJS changes. */

/* Desktop and tablet: badge keeps the right edge, while the slogan/value block
   gets its own reserved space underneath or to the left. */
@media (min-width: 993px) {
  html .jassh-ui .pkp_site_name_wrapper {
    position: relative !important;
    overflow: hidden !important;
  }

  html .jassh-ui .pkp_site_name_wrapper .jassh-eissn-badge {
    top: 20px !important;
    right: 26px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 30 !important;
  }

  /* Pages with the handwritten slogan but without the value stack. */
  html .jassh-ui.vl-family-authors .vl-masthead-slogan,
  html .jassh-ui.vl-family-issue .vl-masthead-slogan {
    right: 215px !important;
    max-width: 285px !important;
  }

  /* Pages where BOTH the handwritten slogan and the vertical values are shown.
     Put the slogan a little more left, and drop the value stack under the badge. */
  html .jassh-ui.vl-family-about .vl-masthead-slogan,
  html .jassh-ui.vl-family-article .vl-masthead-slogan,
  html .jassh-ui.vl-family-reviewers .vl-masthead-slogan {
    right: 170px !important;
    top: 22px !important;
    width: 265px !important;
    max-width: 265px !important;
  }

  html .jassh-ui.vl-family-about .vl-masthead-values,
  html .jassh-ui.vl-family-article .vl-masthead-values,
  html .jassh-ui.vl-family-reviewers .vl-masthead-values {
    right: 28px !important;
    top: 60px !important;
    padding-left: 12px !important;
  }

  /* Slightly narrower spacing for medium desktop widths so the slogan does not clip. */
  @media (min-width: 993px) and (max-width: 1240px) {
    html .jassh-ui.vl-family-about .vl-masthead-slogan,
    html .jassh-ui.vl-family-article .vl-masthead-slogan,
    html .jassh-ui.vl-family-reviewers .vl-masthead-slogan {
      right: 155px !important;
      width: 240px !important;
      max-width: 240px !important;
    }

    html .jassh-ui.vl-family-authors .vl-masthead-slogan,
    html .jassh-ui.vl-family-issue .vl-masthead-slogan {
      right: 195px !important;
      max-width: 250px !important;
    }

    html .jassh-ui.vl-family-about .vl-masthead-values,
    html .jassh-ui.vl-family-article .vl-masthead-values,
    html .jassh-ui.vl-family-reviewers .vl-masthead-values {
      right: 22px !important;
      top: 62px !important;
      font-size: 8px !important;
      letter-spacing: 1.6px !important;
    }
  }
}

/* Mobile: keep the badge at the top-right but move it slightly lower so it avoids
   the browser edge and stays visually separate from the masthead graphic. */
@media (max-width: 992px) {
  html .jassh-ui .pkp_site_name_wrapper .jassh-eissn-badge {
    top: 18px !important;
    right: 12px !important;
    left: auto !important;
    bottom: auto !important;
  }
}
