/* Atlas responsive overrides. Loaded after the main design system. */
@media (max-width: 960px) {
  .atlas-mobile-menu__panel {
    position: fixed;
    z-index: 100;
    top: calc(72px + .5rem);
    right: 1rem;
    left: 1rem;
    right: max(1rem, env(safe-area-inset-right));
    left: max(1rem, env(safe-area-inset-left));
    width: auto;
    max-width: none;
    max-height: calc(100vh - 90px);
    max-height: calc(100dvh - 90px - env(safe-area-inset-bottom));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-sizing: border-box;
    transform: none;
  }

  .admin-bar .atlas-mobile-menu__panel {
    top: calc(32px + 72px + .5rem);
    max-height: calc(100vh - 122px);
    max-height: calc(100dvh - 122px - env(safe-area-inset-bottom));
  }

  .atlas-mobile-menu__panel a {
    min-height: 44px;
    box-sizing: border-box;
  }
}

@media (max-width: 782px) {
  .admin-bar .atlas-mobile-menu__panel {
    top: calc(46px + 72px + .5rem);
    max-height: calc(100vh - 136px);
    max-height: calc(100dvh - 136px - env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .atlas-mobile-menu__panel {
    top: calc(62px + .5rem);
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px - env(safe-area-inset-bottom));
    padding: .5rem;
    border-radius: 12px;
  }

  .admin-bar .atlas-mobile-menu__panel {
    top: calc(46px + 62px + .5rem);
    max-height: calc(100vh - 126px);
    max-height: calc(100dvh - 126px - env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .atlas-mobile-menu__panel {
    right: .65rem;
    left: .65rem;
    right: max(.65rem, env(safe-area-inset-right));
    left: max(.65rem, env(safe-area-inset-left));
  }
}
