/*
====================================================
DoseClock Navigation Refinement
Purpose: accessible clinical navigation pills.
====================================================
*/

.nav-toggle {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

.nav-toggle__button {
  display: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
  color: #ffffff;
}

.site-nav__link,
.site-nav__logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.58rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff !important;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__logout:hover,
.site-nav__logout:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.48);
  color: #ffffff !important;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.site-nav__user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff !important;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(8px);
}

.site-nav__logout-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.site-nav__logout {
  appearance: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.94);
  color: #0a2d6f !important;
  border-color: rgba(255, 255, 255, 0.78);
}

.site-nav__logout:hover,
.site-nav__logout:focus-visible {
  background: #ffffff;
  color: #061f4f !important;
}

@media (max-width: 900px) {
  .header-actions {
    position: relative;
  }

  .nav-toggle__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
  }

  .nav-toggle__icon,
  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    display: block;
    width: 1.25rem;
    height: 0.14rem;
    border-radius: 999px;
    background: #ffffff;
    content: "";
  }

  .nav-toggle__icon {
    position: relative;
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    position: absolute;
    left: 0;
  }

  .nav-toggle__icon::before {
    top: -0.42rem;
  }

  .nav-toggle__icon::after {
    top: 0.42rem;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 1000;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;

    min-width: min(18rem, calc(100vw - 2rem));
    padding: 0.75rem;

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 1rem;
    background: #0a2d6f;
    box-shadow: 0 18px 42px rgba(6, 31, 79, 0.35);
  }

  .nav-toggle:checked~.site-nav {
    display: flex;
  }

  .site-nav__link,
  .site-nav__logout,
  .site-nav__user {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;
  }
}