/*
  ============================================================
  GRFTSH — GLOBAL MENU
  ============================================================
*/

.global-menu-overlay[hidden],
.global-menu-item[hidden] {
  display: none !important;
}


.global-menu-overlay {
  position: fixed;
  inset: 0;

  z-index: 2500;

  background:
    rgba(0, 0, 0, .62);

  overscroll-behavior: contain;
}


.global-menu-panel {
  position: absolute;

  top: 0;
  right: 0;

  width: min(92vw, 390px);
  height: 100dvh;

  overflow-y: auto;

  padding:
    max(16px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    calc(24px + env(safe-area-inset-bottom))
    18px;

  border-left:
    1px solid var(--border);

  background: #0b0b0b;
  color: var(--text);

  box-shadow:
    -18px 0 60px rgba(0, 0, 0, .5);
}


.global-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 46px;

  margin-bottom: 18px;
}


.global-menu-header h2 {
  margin: 0;

  font-size: 18px;
  line-height: 1.2;
}


.global-menu-close {
  width: 40px;
  height: 40px;

  display: grid;
  place-items: center;

  padding: 0;

  border: 0;
  border-radius: 50%;

  background: transparent;
  color: var(--text);

  cursor: pointer;
}


.global-menu-close:hover,
.global-menu-close:focus-visible {
  background: var(--surface-2);
}


.global-menu-nav {
  display: grid;
  gap: 5px;
}


.global-menu-item {
  width: 100%;
  min-height: 52px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 0 14px;

  border: 0;
  border-radius: 12px;

  background: transparent;
  color: var(--text);

  font: inherit;
  font-size: 14px;
  text-align: left;

  cursor: pointer;
}


.global-menu-item:not(:disabled):hover,
.global-menu-item:not(:disabled):focus-visible {
  background: var(--surface-2);
}


.global-menu-placeholder {
  cursor: default;
}


.global-menu-placeholder:disabled {
  opacity: .72;
}


.global-menu-soon {
  flex: 0 0 auto;

  padding: 4px 7px;

  border: 1px solid #303030;
  border-radius: 999px;

  color: var(--muted);

  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}


.global-menu-separator {
  height: 1px;

  margin: 12px 4px;

  background: var(--border);
}


.global-menu-dashboard {
  font-weight: 700;
}


body.global-menu-open {
  overflow: hidden;
}


@media (min-width: 700px) {
  .global-menu-panel {
    width: 360px;
  }
}
