/* PRAISe modern header */

html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

header-component {
    display: none !important;
}

.modern-header,
.modern-header * {
    box-sizing: border-box;
}

.modern-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    margin: 0 !important;
    background: rgba(5, 6, 0, 0.94);
    border-bottom: 1px solid rgba(207, 185, 125, 0.16);
    font-family: "Nunito Sans", "Nunito", sans-serif;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.025);
}

.modern-header span {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.modern-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1160px, calc(100% - 56px));
    min-height: 74px;
    margin: 0 auto;
    padding: 0;
}

/* Brand */

.modern-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #cfb97d !important;
    text-decoration: none !important;
}

.modern-header__logo {
    display: block;
    width: 47px;
    height: 47px;
    object-fit: contain;
}

.modern-header__name {
    color: #cfb97d !important;
    font-size: 34px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    line-height: 1 !important;
    white-space: nowrap;
}

.modern-header__brand:hover .modern-header__name,
.modern-header__brand:focus .modern-header__name {
    color: #ffffff !important;
}

/* Primary navigation */

.modern-header__navigation {
    display: flex;
    align-items: center;
    gap: 7px;
}

.modern-header__link {
    display: inline-flex;
    position: relative;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: rgba(255, 255, 255, 0.9) !important;
    font-family: inherit;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.modern-header__link:hover,
.modern-header__link:focus-visible,
.modern-header__dropdown:hover .modern-header__dropdown-button,
.modern-header__dropdown:focus-within .modern-header__dropdown-button,
.modern-header__dropdown.is-open .modern-header__dropdown-button {
    background: rgba(207, 185, 125, 0.1);
    color: #cfb97d !important;
    outline: none;
    transform: translateY(-1px);
}

/* Current-page state */

.modern-header__link.is-active {
    background: transparent;
    color: #cfb97d !important;
    font-weight: 500;
}

.modern-header__link.is-active::after {
    position: absolute;
    bottom: 1px;
    left: 50%;
    width: 42px;
    height: 3px;
    background: #cfb97d;
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(207, 185, 125, 0.35);
    content: "";
    transform: translateX(-50%);
}

.modern-header__link.is-active:hover,
.modern-header__link.is-active:focus-visible {
    background: rgba(207, 185, 125, 0.1);
    color: #cfb97d !important;
}

/* Research dropdown */

.modern-header__dropdown {
    position: relative;
}

.modern-header__dropdown-button i {
    font-size: 13px;
    transition: transform 150ms ease;
}

.modern-header__dropdown.is-open .modern-header__dropdown-button i {
    transform: rotate(180deg);
}

.modern-header__dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    display: none;
    width: 235px;
    padding: 8px;
    background: rgba(14, 15, 10, 0.97);
    border: 1px solid rgba(207, 185, 125, 0.22);
    border-radius: 13px;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.28),
    0 3px 12px rgba(0, 0, 0, 0.12);
}

.modern-header__dropdown.is-open .modern-header__dropdown-menu {
    display: block;
}

.modern-header__dropdown-menu a {
    display: block;
    padding: 11px 13px;
    border-radius: 8px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.35;
    text-decoration: none !important;
}

.modern-header__dropdown-menu a:hover,
.modern-header__dropdown-menu a:focus {
    background: rgba(207, 185, 125, 0.1);
    color: #cfb97d !important;
    outline: none;
}

/* Mobile-menu button */

.modern-header__menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 43px;
    height: 43px;
    padding: 0;
    border: 1px solid rgba(207, 185, 125, 0.45);
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}

.modern-header__menu-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #cfb97d;
    border-radius: 2px;
    transition: transform 160ms ease,
    opacity 160ms ease;
}

.modern-header__menu-button[aria-expanded="true"]
.modern-header__menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.modern-header__menu-button[aria-expanded="true"]
.modern-header__menu-line:nth-child(2) {
    opacity: 0;
}

.modern-header__menu-button[aria-expanded="true"]
.modern-header__menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Desktop dropdown interaction */

@media (min-width: 901px) {

    .modern-header__dropdown::after {
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      height: 12px;
      content: "";
  }

    .modern-header__dropdown:hover .modern-header__dropdown-menu,
  .modern-header__dropdown:focus-within .modern-header__dropdown-menu {
      display: block;
  }

    .modern-header__dropdown:hover .modern-header__dropdown-button i,
  .modern-header__dropdown:focus-within .modern-header__dropdown-button i {
      transform: rotate(180deg);
  }
}

/* Tablet and mobile */

@media (max-width: 900px) {

    .modern-header__inner {
      width: 100%;
      min-height: 68px;
      padding: 0 20px;
  }

    .modern-header__logo {
      width: 41px;
      height: 41px;
  }

    .modern-header__name {
      font-size: 28px !important;
  }

    .modern-header__menu-button {
      display: inline-flex;
  }

    .modern-header__navigation {
      position: absolute;
      top: 100%;
      right: 12px;
      left: 12px;
      display: none;
      align-items: stretch;
      flex-direction: column;
      gap: 3px;
      padding: 12px;
      background: #080904;
      border: 1px solid rgba(207, 185, 125, 0.3);
      border-radius: 0 0 13px 13px;
      box-shadow: 0 20px 38px rgba(0, 0, 0, 0.28);
  }

    .modern-header__navigation.is-open {
      display: flex;
  }

    .modern-header__link {
      justify-content: space-between;
      width: 100%;
      min-height: 44px;
      padding: 11px 13px;
      border-radius: 7px;
      font-size: 17px;
      font-weight: 500;
      transform: none;
  }

    .modern-header__navigation .modern-header__link.is-active {
      padding-left: 14px;
      background: rgba(207, 185, 125, 0.1);
      border-left: 3px solid #cfb97d;
      border-radius: 7px;
      color: #cfb97d !important;
      font-weight: 500;
  }

    .modern-header__navigation .modern-header__link.is-active::after {
      display: none !important;
      content: none !important;
  }

    .modern-header__navigation .modern-header__link.is-active:hover,
  .modern-header__navigation .modern-header__link.is-active:focus-visible {
      background: rgba(207, 185, 125, 0.16);
      color: #cfb97d !important;
  }

    .modern-header__dropdown {
      width: 100%;
  }

    .modern-header__dropdown-menu {
      position: static;
      width: 100%;
      margin-top: 4px;
      padding: 5px 8px;
      background: rgba(255, 255, 255, 0.025);
      border: 0;
      border-left: 2px solid rgba(207, 185, 125, 0.5);
      border-radius: 3px;
      box-shadow: none;
  }

    .modern-header__dropdown-menu a {
      font-size: 16px;
      font-weight: 500;
  }
}

@media (max-width: 480px) {

    .modern-header__inner {
      min-height: 64px;
      padding: 0 14px;
  }

    .modern-header__brand {
      gap: 11px;
  }

    .modern-header__logo {
      width: 36px;
      height: 36px;
  }

    .modern-header__name {
      font-size: 24px !important;
  }
}

/* =========================================================
   Mobile bottom navigation
   ========================================================= */

.mobile-bottom-nav,
.mobile-more-menu {
    display: none;
}

@media (max-width: 900px) {

    body {
      padding-bottom: calc(62px + env(safe-area-inset-bottom)) !important;
  }
    /* Keep the top brand bar, but remove the dropdown menu. */

    .modern-header {
      position: sticky;
  }

    .modern-header__inner {
      min-height: 58px;
  }

    .modern-header__menu-button,
  .modern-header__navigation {
      display: none !important;
  }

    .modern-header__logo {
      width: 34px;
      height: 34px;
  }

    .modern-header__name {
      font-size: 23px !important;
  }
    /* Bottom navigation bar */

    .mobile-bottom-nav {
      position: fixed;
      right: 0;
      bottom: 0;
      left: 0;
      z-index: 1500;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      min-height: 62px;
      padding: 5px 5px
      calc(5px + env(safe-area-inset-bottom));
      background: rgba(8, 9, 4, 0.94);
      border-top: 1px solid rgba(207, 185, 125, 0.24);
      -webkit-backdrop-filter: blur(18px);
      backdrop-filter: blur(18px);
      box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.16),
      0 -1px 0 rgba(255, 255, 255, 0.025);
  }

    .mobile-bottom-nav__item {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
      min-height: 50px;
      padding: 5px 2px;
      background: transparent;
      border: 0;
      border-radius: 10px;
      color: rgba(255, 255, 255, 0.68) !important;
      font-family: "Nunito Sans", "Nunito", sans-serif;
      text-decoration: none !important;
      cursor: pointer;
  }

    .mobile-bottom-nav__item i {
      color: inherit;
      font-size: 17px;
      line-height: 1;
  }

    .mobile-bottom-nav__item span {
      overflow: hidden;
      max-width: 100%;
      color: inherit;
      font-family: inherit;
      font-size: 10px !important;
      font-weight: 600;
      line-height: 1.15;
      text-overflow: ellipsis;
      white-space: nowrap;
  }

    .mobile-bottom-nav__item.is-active {
      background: rgba(207, 185, 125, 0.1);
      color: #cfb97d !important;
  }

    .mobile-bottom-nav__item.is-active::before {
      position: absolute;
      top: 1px;
      left: 50%;
      width: 22px;
      height: 2px;
      background: #cfb97d;
      border-radius: 999px;
      content: "";
      transform: translateX(-50%);
  }

    .mobile-bottom-nav__item:focus-visible {
      outline: 2px solid #cfb97d;
      outline-offset: -2px;
  }
    /* More bottom sheet */

    .mobile-more-menu {
      position: fixed;
      inset: 0;
      z-index: 1600;
      display: block;
      visibility: hidden;
      opacity: 0;
      pointer-events: none;
      transition: opacity 170ms ease,
      visibility 170ms ease;
  }

    .mobile-more-menu.is-open {
      visibility: visible;
      opacity: 1;
      pointer-events: auto;
  }

    .mobile-more-menu__backdrop {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      padding: 0;
      background: rgba(0, 0, 0, 0.48);
      border: 0;
      -webkit-backdrop-filter: blur(2px);
      backdrop-filter: blur(2px);
  }

    .mobile-more-menu__panel {
      position: absolute;
      right: 10px;
      bottom: calc(70px + env(safe-area-inset-bottom));
      left: 10px;
      padding: 9px 14px 17px;
      background: rgba(14, 15, 10, 0.98);
      border: 1px solid rgba(207, 185, 125, 0.26);
      border-radius: 18px;
      box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34),
      0 4px 14px rgba(0, 0, 0, 0.18);
      transform: translateY(20px);
      transition: transform 190ms ease;
  }

    .mobile-more-menu.is-open .mobile-more-menu__panel {
      transform: translateY(0);
  }

    .mobile-more-menu__handle {
      width: 34px;
      height: 4px;
      margin: 0 auto 8px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 999px;
  }

    .mobile-more-menu__heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 2px 2px 10px;
      color: #ffffff;
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-size: 16px;
      font-weight: 700;
  }

    .mobile-more-menu__close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      padding: 0;
      background: rgba(207, 185, 125, 0.08);
      border: 1px solid rgba(207, 185, 125, 0.3);
      border-radius: 9px;
      color: #cfb97d;
  }

    .mobile-more-menu__links {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 9px;
  }

    .mobile-more-menu__links a {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 7px;
      min-height: 78px;
      padding: 10px 5px;
      background: rgba(255, 255, 255, 0.035);
      border: 1px solid rgba(207, 185, 125, 0.14);
      border-radius: 12px;
      color: rgba(255, 255, 255, 0.88) !important;
      font-family: "Nunito Sans", "Nunito", sans-serif;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none !important;
  }

    .mobile-more-menu__links a i {
      color: #cfb97d;
      font-size: 20px;
  }

    .mobile-more-menu__links a:active,
  .mobile-more-menu__links a:focus-visible {
      background: rgba(207, 185, 125, 0.12);
      outline: none;
  }
}

@media (prefers-reduced-motion: reduce) {

    .mobile-more-menu,
  .mobile-more-menu__panel {
      transition: none;
  }
}

/* Hide the legacy back-to-top button on phones. */

@media (max-width: 700px) {

    #toTop {
      display: none !important;
      visibility: hidden !important;
      pointer-events: none !important;
  }
}

/* Refined mobile More menu */

@media (max-width: 700px) {

    .mobile-more-menu__panel {
      right: 12px;
      bottom: calc(70px + env(safe-area-inset-bottom));
      left: 12px;
      padding: 8px 12px 12px;
      border-radius: 17px;
  }

    .mobile-more-menu__handle {
      width: 30px;
      height: 3px;
      margin-bottom: 5px;
  }

    .mobile-more-menu__heading {
      padding: 0 2px 9px;
      font-size: 18px !important;
      line-height: 1.2;
  }

    .mobile-more-menu__heading span {
      font-size: 18px !important;
      line-height: 1.2 !important;
  }

    .mobile-more-menu__close {
      width: 29px;
      height: 29px;
  }

    .mobile-more-menu__close i {
      font-size: 13px;
  }

    .mobile-more-menu__links {
      display: grid;
      grid-template-columns: 1fr;
      gap: 7px;
  }

    .mobile-more-menu__links a {
      display: grid;
      grid-template-columns: 34px minmax(0, 1fr);
      align-items: center;
      justify-content: initial;
      gap: 10px;
      min-height: 50px;
      padding: 9px 12px;
      border-radius: 11px;
      text-align: left;
  }

    .mobile-more-menu__links a i {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background: rgba(207, 185, 125, 0.09);
      border-radius: 9px;
      font-size: 16px;
  }

    .mobile-more-menu__links a span {
      display: block;
      min-width: 0;
      margin: 0;
      padding: 0;
      color: rgba(255, 255, 255, 0.9) !important;
      font-family: "Nunito Sans", "Nunito", sans-serif !important;
      font-size: 13px !important;
      font-weight: 600 !important;
      line-height: 1.3 !important;
      overflow-wrap: normal;
      white-space: nowrap;
  }
}

/* =========================================================
   PRAISe Lab PWA install card
   ========================================================= */

.pwa-install[hidden] {
    display: none !important;
}

.pwa-install {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1800;
    display: grid;
    grid-template-columns: 46px minmax(180px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    width: min(450px, calc(100% - 40px));
    padding: 12px;
    background: rgba(13, 14, 8, 0.97);
    border: 1px solid rgba(207, 185, 125, 0.32);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.3),
    0 4px 14px rgba(0, 0, 0, 0.16);
    font-family: "Nunito Sans", "Nunito", sans-serif;
}

.pwa-install__icon {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 11px;
}

.pwa-install__content {
    min-width: 0;
}

.pwa-install__title {
    display: block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.pwa-install__message {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.pwa-install__button {
    padding: 8px 13px;
    background: #cfb97d;
    border: 1px solid #cfb97d;
    border-radius: 9px;
    color: #181900;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.pwa-install__button:hover,
.pwa-install__button:focus-visible {
    background: #ffffff;
    border-color: #ffffff;
}

.pwa-install__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(207, 185, 125, 0.27);
    border-radius: 8px;
    color: #cfb97d;
    cursor: pointer;
}

@media (max-width: 700px) {

    .pwa-install {
      right: 10px;
      bottom: calc(70px + env(safe-area-inset-bottom));
      left: 10px;
      grid-template-columns: 40px minmax(0, 1fr) auto;
      gap: 9px;
      width: auto;
      padding: 10px 40px 10px 10px;
      border-radius: 14px;
  }

    .pwa-install__icon {
      width: 40px;
      height: 40px;
      border-radius: 10px;
  }

    .pwa-install__title {
      font-size: 13px;
  }

    .pwa-install__message {
      font-size: 11px;
  }

    .pwa-install__button {
      padding: 7px 10px;
      font-size: 12px;
  }

    .pwa-install__close {
      position: absolute;
      top: 7px;
      right: 7px;
      width: 27px;
      height: 27px;
  }
}

/* Center the PRAISe Lab header brand on mobile */

@media (max-width: 700px) {

    .modern-header__inner {
      justify-content: center !important;
  }

    .modern-header__brand {
      justify-content: center;
      width: max-content;
      margin: 0 auto;
  }
}
