/*
 * Modern Purple Journal Menu + Submission Block — OJS 3.4
 * Upload via: Dashboard > Settings > Website > Appearance > Advanced
 * Paste/upload as Journal Style Sheet.
 *
 * Styles existing sidebar blocks and links only.
 * Does not change URLs, labels, or menu functionality.
 */

:root {
  --journal-menu-purple: #5B21B6;
  --journal-menu-purple-hover: #6D28D9;
  --journal-menu-lavender: #F5F3FF;
  --journal-menu-border: #E9D5FF;
  --journal-menu-text: #302744;
}

/* General sidebar cards */
.pkp_structure_sidebar .pkp_block {
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: #FFFFFF;
  border: 1px solid #EEE8F8;
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(55, 25, 95, 0.06);
}

/* Sidebar block headings */
.pkp_structure_sidebar .pkp_block .title,
.pkp_structure_sidebar .pkp_block h2,
.pkp_structure_sidebar .pkp_block h3 {
  margin-top: 0;
  margin-bottom: 0.85rem;
  color: var(--journal-menu-purple);
  font-weight: 700;
  line-height: 1.35;
}

/* Sidebar menu links */
.pkp_structure_sidebar .pkp_block .content a {
  display: block;
  margin: 0.4rem 0;
  padding: 0.7rem 0.85rem;
  color: var(--journal-menu-text);
  background: #FFFFFF;
  border: 1px solid #F0ECF7;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color 180ms ease, background-color 180ms ease,
              border-color 180ms ease, box-shadow 180ms ease,
              transform 180ms ease;
}

/* Sidebar buttons, if used by a custom block */
.pkp_structure_sidebar .pkp_block .content button,
.pkp_structure_sidebar .pkp_block .content input[type="button"],
.pkp_structure_sidebar .pkp_block .content input[type="submit"] {
  display: block;
  width: 100%;
  margin: 0.4rem 0;
  padding: 0.7rem 0.85rem;
  color: var(--journal-menu-text);
  background: #FFFFFF;
  border: 1px solid #F0ECF7;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease,
              border-color 180ms ease, box-shadow 180ms ease,
              transform 180ms ease;
}

/* Hover and keyboard focus for menu links */
.pkp_structure_sidebar .pkp_block .content a:hover,
.pkp_structure_sidebar .pkp_block .content a:focus-visible,
.pkp_structure_sidebar .pkp_block .content button:hover,
.pkp_structure_sidebar .pkp_block .content button:focus-visible,
.pkp_structure_sidebar .pkp_block .content input[type="button"]:hover,
.pkp_structure_sidebar .pkp_block .content input[type="submit"]:hover {
  color: var(--journal-menu-purple);
  background: var(--journal-menu-lavender);
  border-color: #C4B5FD;
  box-shadow: 0 4px 12px rgba(91, 33, 182, 0.10);
  transform: translateX(3px);
  outline: none;
}

/* Special highlight for the Make a Submission block */
.pkp_structure_sidebar .pkp_block.block_make_submission {
  padding: 1.25rem !important;
  background: linear-gradient(135deg, #5B21B6, #7C3AED) !important;
  border: 1px solid #6D28D9 !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 18px rgba(91, 33, 182, 0.22) !important;
}

/* Submission button: blue background, white bold centered text before click */
.pkp_structure_sidebar .pkp_block.block_make_submission a,
.pkp_structure_sidebar .block_make_submission a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  margin: 0.15rem 0;
  padding: 0.8rem 0.85rem;
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #0369A1, #2563EB) !important;
  border: 1px solid #1D4ED8 !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  text-align: center !important;
  text-decoration: none !important;
  box-shadow: 0 3px 8px rgba(30, 64, 175, 0.20);
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* Hover/focus state: keep text centered and white, with a brighter blue */
.pkp_structure_sidebar .pkp_block.block_make_submission a:hover,
.pkp_structure_sidebar .pkp_block.block_make_submission a:focus-visible,
.pkp_structure_sidebar .block_make_submission a:hover,
.pkp_structure_sidebar .block_make_submission a:focus-visible {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #1D4ED8, #4F46E5) !important;
  border-color: #4338CA !important;
  text-align: center !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(37, 99, 235, 0.28);
  outline: none;
}

/* Responsive spacing for smaller screens */
@media (max-width: 767px) {
  .pkp_structure_sidebar .pkp_block {
    padding: 0.85rem;
    border-radius: 13px;
  }

  .pkp_structure_sidebar .pkp_block .content a,
  .pkp_structure_sidebar .pkp_block .content button {
    padding: 0.65rem 0.75rem;
  }

  .pkp_structure_sidebar .pkp_block.block_make_submission {
    padding: 1rem !important;
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .pkp_structure_sidebar .pkp_block .content a,
  .pkp_structure_sidebar .pkp_block .content button,
  .pkp_structure_sidebar .block_make_submission a {
    transition: none;
  }
}


/* Journal Template block: center the Download link and tint the template image/icon purple */
.pkp_structure_sidebar .pkp_block a[href*="journal-template"],
.pkp_structure_sidebar .pkp_block a[href*="template"] {
  text-align: center !important;
}

/* Center Download text/button within the Journal Template block */
.pkp_structure_sidebar .pkp_block .content a[href*="download"],
.pkp_structure_sidebar .pkp_block .content a[download] {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/*
 * If the template icon is a monochrome image with transparency, this filter
 * gives it a purple tint. If the asset is a multicolour/white logo, provide
 * the original image file to tune this selector without affecting other images.
 */
.pkp_structure_sidebar .pkp_block img[alt*="Journal Template"],
.pkp_structure_sidebar .pkp_block img[title*="Journal Template"],
.pkp_structure_sidebar .pkp_block a[title*="Template"] img {
  filter: hue-rotate(235deg) saturate(1.25);
}

/* Make the template image area look coordinated with the purple sidebar palette */
.pkp_structure_sidebar .pkp_block a[title*="Template"] {
  border-radius: 12px;
}


/* Override: remove purple outer background around Make a Submission */
.pkp_structure_sidebar .pkp_block.block_make_submission {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  padding: 1rem !important;
}

/* Keep the Make a Submission button blue with centered bold white text */
.pkp_structure_sidebar .pkp_block.block_make_submission a,
.pkp_structure_sidebar .block_make_submission a {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #0369A1, #2563EB) !important;
  border: 1px solid #1D4ED8 !important;
  font-weight: 700 !important;
  text-align: center !important;
  justify-content: center !important;
}

/* Hover state stays blue; no purple */
.pkp_structure_sidebar .pkp_block.block_make_submission a:hover,
.pkp_structure_sidebar .pkp_block.block_make_submission a:focus-visible,
.pkp_structure_sidebar .block_make_submission a:hover,
.pkp_structure_sidebar .block_make_submission a:focus-visible {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #0284C7, #1D4ED8) !important;
  border-color: #1D4ED8 !important;
}


/* Highlight the currently active/open sidebar menu page in purple */
.pkp_structure_sidebar .pkp_block .content a[aria-current="page"],
.pkp_structure_sidebar .pkp_block .content a.current,
.pkp_structure_sidebar .pkp_block .content li.current > a,
.pkp_structure_sidebar .pkp_block .content li.active > a,
.pkp_structure_sidebar .pkp_block .content a.active {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #6D28D9, #7C3AED) !important;
  border-color: #6D28D9 !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.22) !important;
}

/* Keep the active item clearly highlighted on hover/focus too */
.pkp_structure_sidebar .pkp_block .content a[aria-current="page"]:hover,
.pkp_structure_sidebar .pkp_block .content a.current:hover,
.pkp_structure_sidebar .pkp_block .content li.current > a:hover,
.pkp_structure_sidebar .pkp_block .content li.active > a:hover,
.pkp_structure_sidebar .pkp_block .content a.active:hover {
  color: #FFFFFF !important;
  background: linear-gradient(135deg, #5B21B6, #6D28D9) !important;
  border-color: #5B21B6 !important;
}


/*
 * MANUAL HIGHLIGHT (CSS-only):
 * Open Access Policy will always appear purple wherever this sidebar is shown.
 * This does not auto-detect the current page.
 */
.pkp_structure_sidebar form[action*="/openaccess"] input.tombol2,
.pkp_structure_sidebar form[action*="/openaccess"] input[type="submit"] {
  background: linear-gradient(135deg, #6D28D9, #7C3AED) !important;
  color: #FFFFFF !important;
  border: 1px solid #6D28D9 !important;
  font-weight: 700 !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.22) !important;
}


/* Make the Journal Template Download button text bold and centered */
.pkp_structure_sidebar .pkp_block a[href*="template"] ,
.pkp_structure_sidebar .pkp_block .content a[href*="download"],
.pkp_structure_sidebar .pkp_block .content a[download] {
  font-weight: 700 !important;
  text-align: center !important;
}


/* =========================================================
   FOOTER JPHI — coordinated with STIKES HI visual identity
   Main navy + health green + innovation purple
   ========================================================= */

/* Footer background and spacing */
.pkp_structure_footer {
  position: relative;
  background: linear-gradient(135deg, #062F3B 0%, #073B4A 60%, #123B4D 100%) !important;
  color: #F8FAFC !important;
  border-top: 4px solid #16A34A !important;
  padding: 2rem 1.5rem !important;
}

/* Footer text */
.pkp_structure_footer,
.pkp_structure_footer p,
.pkp_structure_footer span,
.pkp_structure_footer div,
.pkp_structure_footer strong,
.pkp_structure_footer b {
  color: #F8FAFC;
}

/* Publisher label and important details */
.pkp_structure_footer strong,
.pkp_structure_footer b {
  color: #FFFFFF !important;
  font-weight: 700;
}

/* Links inside the footer */
.pkp_structure_footer a {
  color: #86EFAC !important;
  text-decoration: none;
  transition: color 180ms ease, opacity 180ms ease;
}

.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus-visible {
  color: #D8B4FE !important;
  text-decoration: underline;
}

/* Purple accent line and refined footer layout */
.pkp_structure_footer::before {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  margin: 0 0 1.25rem;
  border-radius: 99px;
  background: #7B2FBE;
}

/* OJS/PKP brand area: blend with the footer background */
.pkp_brand_footer {
  background: #062F3B !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  padding: 1rem 1.5rem !important;
}

/* Make the OJS/PKP mark visible on dark background */
.pkp_brand_footer img {
  opacity: 0.94;
  filter: brightness(0) invert(1);
  max-width: 180px;
  height: auto;
}

/* Avoid overly large footer elements on mobile */
@media (max-width: 767px) {
  .pkp_structure_footer {
    padding: 1.5rem 1rem !important;
  }

  .pkp_brand_footer {
    padding: 0.85rem 1rem !important;
    text-align: center;
  }

  .pkp_brand_footer img {
    max-width: 145px;
  }
}

/* =========================================================
   FINAL REFINEMENTS requested:
   - Light-blue footer (#51BEF8)
   - Publisher details and OJS/PKP branding on one row
   - Remove the manual purple highlight from Open Access Policy
   - Bold the Journal Template download text
   ========================================================= */

/* Keep the footer content and OJS/PKP mark aligned horizontally */
.pkp_structure_footer_wrapper {
  display: flex !important;
  align-items: stretch !important;
  justify-content: space-between !important;
  gap: 1.5rem !important;
  width: 100% !important;
  max-width: 1045px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  background: #51BEF8 !important;
  box-sizing: border-box !important;
}

.pkp_structure_footer {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  background: #51BEF8 !important;
  color: #073B4A !important;
  border-top: 4px solid #16A34A !important;
}

.pkp_structure_footer,
.pkp_structure_footer p,
.pkp_structure_footer span,
.pkp_structure_footer div,
.pkp_structure_footer strong,
.pkp_structure_footer b {
  color: #073B4A !important;
}

.pkp_structure_footer a {
  color: #073B4A !important;
}

.pkp_structure_footer a:hover,
.pkp_structure_footer a:focus-visible {
  color: #5B21B6 !important;
}

.pkp_structure_footer::before {
  background: #7B2FBE !important;
}

.pkp_brand_footer {
  display: flex !important;
  flex: 0 0 240px !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  width: 240px !important;
  margin: 0 !important;
  padding: 1rem !important;
  background: #51BEF8 !important;
  border-top: 4px solid #16A34A !important;
  text-align: center !important;
}

.pkp_brand_footer img {
  display: block !important;
  max-width: 180px !important;
  height: auto !important;
  filter: brightness(0) invert(1) !important;
}

/* Remove the manually applied purple styling on Open Access Policy */
.pkp_structure_sidebar form[action*="/openaccess"] input.tombol2,
.pkp_structure_sidebar form[action*="/openaccess"] input[type="submit"] {
  color: var(--journal-menu-text, #302744) !important;
  background: #FFFFFF !important;
  border: 1px solid #F0ECF7 !important;
  box-shadow: none !important;
  font-weight: 500 !important;
}

.pkp_structure_sidebar form[action*="/openaccess"] input.tombol2:hover,
.pkp_structure_sidebar form[action*="/openaccess"] input[type="submit"]:hover {
  color: var(--journal-menu-purple, #5B21B6) !important;
  background: var(--journal-menu-lavender, #F5F3FF) !important;
  border-color: #C4B5FD !important;
}

/* Journal Template: make Download text bold, including custom form buttons */
.pkp_structure_sidebar .pkp_block a[href*="template" i],
.pkp_structure_sidebar .pkp_block a[href*="download" i],
.pkp_structure_sidebar .pkp_block a[download],
.pkp_structure_sidebar .pkp_block form[action*="template" i] input[type="submit"],
.pkp_structure_sidebar .pkp_block form[action*="download" i] input[type="submit"] {
  font-weight: 700 !important;
}

@media (max-width: 767px) {
  .pkp_structure_footer_wrapper {
    flex-direction: column !important;
    gap: 0 !important;
  }

  .pkp_structure_footer {
    padding: 1.5rem 1rem !important;
  }

  .pkp_brand_footer {
    flex: 1 1 auto !important;
    width: 100% !important;
    padding: 0.85rem 1rem !important;
    border-top: 1px solid rgba(7, 59, 74, 0.2) !important;
  }

  .pkp_brand_footer img {
    max-width: 145px !important;
  }
}

/* =========================================================
   FIX 2: Desktop footer places publisher info on the left and
   OJS/PKP branding on the right; mobile stacks them vertically.
   The two OJS footer areas are commonly separate sibling blocks.
   ========================================================= */
@media (min-width: 768px) {
  .pkp_structure_footer_wrapper {
    display: inline-block !important;
    vertical-align: top !important;
    width: calc(100% - 240px) !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .pkp_structure_footer {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .pkp_brand_footer {
    display: inline-flex !important;
    vertical-align: top !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: 240px !important;
    max-width: 240px !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 1rem 1.5rem !important;
    box-sizing: border-box !important;
    text-align: right !important;
    background: #51BEF8 !important;
    border-top: 4px solid #16A34A !important;
  }

  .pkp_brand_footer img {
    margin-left: auto !important;
    margin-right: 0 !important;
  }
}

/* On phones, show publisher details first and the OJS/PKP mark below. */
@media (max-width: 767px) {
  .pkp_structure_footer_wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .pkp_brand_footer {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

/* Open Access Policy: match the left-aligned labels of other sidebar items. */
.pkp_structure_sidebar form[action*="/openaccess"] input.tombol2,
.pkp_structure_sidebar form[action*="/openaccess"] input[type="submit"] {
  text-align: left !important;
  padding-left: 16px !important;
  justify-content: flex-start !important;
}

/* =========================================================
   FINAL FOOTER LAYOUT OVERRIDE
   Full-bleed #51BEF8 background; publisher details aligned
   with the main site container; OJS/PKP mark at far right.
   ========================================================= */
.pkp_structure_footer_wrapper {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #51BEF8 !important;
  box-sizing: border-box !important;
  isolation: isolate !important;
}

/* Paint the entire viewport width blue, even if OJS constrains a parent. */
.pkp_structure_footer_wrapper::after {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  transform: translateX(-50%) !important;
  background: #51BEF8 !important;
  pointer-events: none !important;
}

.pkp_structure_footer {
  position: relative !important;
  width: 100% !important;
  max-width: 1045px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 2.5rem 0 1.5rem !important;
  background: transparent !important;
  box-sizing: border-box !important;
  border-top: 4px solid #16A34A !important;
}

.pkp_brand_footer {
  position: relative !important;
  display: flex !important;
  width: 100% !important;
  max-width: 1045px !important;
  min-height: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 1rem 0 1.5rem !important;
  justify-content: flex-end !important;
  align-items: center !important;
  text-align: right !important;
  background: transparent !important;
  box-sizing: border-box !important;
  border-top: 1px solid rgba(7, 59, 74, 0.2) !important;
}

/* The branding section also paints blue across the full viewport. */
.pkp_brand_footer::after {
  content: "" !important;
  position: absolute !important;
  z-index: -1 !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 100vw !important;
  transform: translateX(-50%) !important;
  background: #51BEF8 !important;
  pointer-events: none !important;
}

.pkp_brand_footer img {
  display: block !important;
  max-width: 180px !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: 0 !important;
  filter: brightness(0) invert(1) !important;
}

@media (max-width: 767px) {
  .pkp_structure_footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1rem 1rem !important;
  }

  .pkp_brand_footer {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1rem !important;
    justify-content: center !important;
    text-align: center !important;
  }

  .pkp_brand_footer img {
    max-width: 145px !important;
    margin: 0 auto !important;
  }
}

/* =========================================================
   FOOTER PUBLISHER DETAILS — larger, readable contact links
   Works with the HTML content added to the OJS footer area.
   ========================================================= */
.pkp_structure_footer,
.pkp_structure_footer p,
.pkp_structure_footer li {
  font-size: 15px !important;
  line-height: 1.65 !important;
}

.pkp_structure_footer .publisher-title,
.pkp_structure_footer strong,
.pkp_structure_footer b {
  font-size: 16px !important;
  font-weight: 700 !important;
}

.pkp_structure_footer .publisher-contact,
.pkp_structure_footer .publisher-social {
  margin-top: 0.45rem !important;
  overflow-wrap: anywhere;
}

.pkp_structure_footer .publisher-contact a,
.pkp_structure_footer .publisher-social a {
  color: #073B4A !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

.pkp_structure_footer .publisher-contact a:hover,
.pkp_structure_footer .publisher-social a:hover {
  color: #7B2FBE !important;
}

@media (max-width: 767px) {
  .pkp_structure_footer,
  .pkp_structure_footer p,
  .pkp_structure_footer li {
    font-size: 14px !important;
  }

  .pkp_structure_footer .publisher-title,
  .pkp_structure_footer strong,
  .pkp_structure_footer b {
    font-size: 15px !important;
  }
}
