/* JOLU PROPERTY v6 | Compact legal menu and original sidebar proportions.
   Main navigation link spacing is unchanged (nine items at the existing 60px).
   The legal disclosures are a single hover/focus/tap-accessible dropdown. */

/* Match the sidebar to its displayed content rather than forcing a 930px tall
   column to accommodate five constantly-visible legal lines. */
@media only screen and (min-width: 992px) {
  .side-nav {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important; /* allow the legal dropdown to overlay the background */
    padding-bottom: 17px !important;
  }
  .side-nav > .footer.jolu-legal-footer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    margin: 11px 0 0 !important;
    padding: 0 !important;
    bottom: auto !important;
    background: transparent !important;
  }
  .container.footer-container { display: none !important; }
}

/* Button uses JOLU's existing colour and type, at the bottom of the menu.
   Legal content is hidden by default and does not affect sidebar height. */
.jolu-legal {
  position: relative;
  font-family: 'Open Sans', Arial, sans-serif;
  width: 100%;
  isolation: isolate;
}
.jolu-legal-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  padding: 9px 9px 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  line-height: 1.4;
  text-transform: uppercase;
  cursor: pointer;
}
.jolu-legal-toggle:hover,
.jolu-legal-toggle:focus-visible,
.jolu-legal-toggle.is-current {
  color: #f4a16a;
  text-decoration: none;
}
.jolu-legal-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.jolu-legal-chevron {
  display: inline-block;
  width: 7px; height: 7px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform .2s ease;
}
.jolu-legal.is-open .jolu-legal-chevron { transform: translateY(2px) rotate(225deg); }
.jolu-legal-panel {
  display: none;
  position: absolute;
  z-index: 150;
  top: auto;
  bottom: 0;
  left: 100%;
  transform: none;
  width: min(254px, 90vw);
  padding: 14px 17px;
  background: rgba(15, 45, 55, .98);
  color: #fff;
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 12px 28px rgba(0,0,0,.35);
  text-align: left;
}
.jolu-legal.is-open .jolu-legal-panel { display: block; }
/* A fly-out next to the compact footer does not obscure JOLU's main nav. */
.jolu-legal-panel a {
  display: block;
  color: #fff;
  font-size: 12px;
  padding: 7px 2px;
  line-height: 1.35;
  text-transform: none;
  text-decoration: none;
}
.jolu-legal-panel a:hover,
.jolu-legal-panel a:focus-visible,
.jolu-legal-panel a[aria-current="page"] { color: #f4a16a; text-decoration: underline; }
.jolu-legal-panel a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.jolu-legal-details {
  border-top: 1px solid rgba(255,255,255,.22);
  margin-top: 8px;
  padding-top: 11px;
  font-size: 10.5px;
  line-height: 1.55;
  text-transform: none;
  color: #d2dfe3;
}
.jolu-legal-details p { margin: 0 0 7px; }
.jolu-legal-details p:last-child { margin-bottom: 0; }

/* Preserve the original hamburger navigation. The legal menu appears in the
   regular mobile footer and opens in-flow on touch (rather than off-screen). */
@media only screen and (max-width: 991px) {
  body.nav-open .side-nav { height: auto !important; min-height: 940px !important; }
  .side-nav > .footer.jolu-legal-footer { display: none !important; }
  .container.footer-container { display: block !important; }
  .container.footer-container .footer.jolu-legal-footer {
    display: block !important;
    position: static !important;
    width: 100% !important;
    padding: 12px 8px 14px !important;
    margin: 0 !important;
    background: #183c47 !important;
  }
  .container.footer-container .jolu-legal-panel {
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    width: min(320px, 90%);
    margin: 7px auto 0;
  }
  .container.footer-container .jolu-legal-toggle { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .jolu-legal-chevron { transition: none; }
}
