/* InPlay navigation drawer
   Entirely namespaced to avoid legacy sidebar/base.css collisions. */

#sidebar.ip-drawer-root {
  --ipd-bg: rgba(4, 12, 8, .985);
  --ipd-surface: rgba(255, 255, 255, .025);
  --ipd-surface-pressed: rgba(59, 228, 119, .095);
  --ipd-line: rgba(255, 255, 255, .075);
  --ipd-line-soft: rgba(255, 255, 255, .055);
  --ipd-text: #edf6f0;
  --ipd-muted: rgba(237, 246, 240, .56);
  --ipd-faint: rgba(237, 246, 240, .34);
  --ipd-accent: #3be477;
  --ipd-danger: #ff7878;

  position: fixed !important;
  inset: 0 !important;
  z-index: 12000 !important;
  width: 100% !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
  background: transparent !important;
  overflow: hidden !important;
}

#sidebar.ip-drawer-root .ip-drawer__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
  -webkit-tap-highlight-color: transparent;
}

#sidebar.ip-drawer-root .ip-drawer {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  z-index: 1 !important;
  display: flex !important;
  width: min(420px, 92vw) !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  flex-direction: column;
  color: var(--ipd-text);
  background:
    radial-gradient(circle at 12% -8%, rgba(59, 228, 119, .10), transparent 27%),
    linear-gradient(180deg, rgba(5, 15, 9, .985), rgba(2, 8, 5, .995));
  border: 0 !important;
  border-right: 1px solid rgba(59, 228, 119, .11) !important;
  border-radius: 0 !important;
  box-shadow: 24px 0 72px rgba(0, 0, 0, .52) !important;
  transform: translate3d(-103%, 0, 0);
  transition: transform .28s cubic-bezier(.22, .76, .24, 1);
  will-change: transform;
  -webkit-backdrop-filter: blur(28px) saturate(125%);
  backdrop-filter: blur(28px) saturate(125%);
}

#sidebar.ip-drawer-root.active {
  pointer-events: auto;
}

#sidebar.ip-drawer-root.active .ip-drawer__backdrop {
  opacity: 1;
  pointer-events: auto;
}

#sidebar.ip-drawer-root.active .ip-drawer {
  transform: translate3d(0, 0, 0);
}

#sidebar.ip-drawer-root .ip-drawer__header {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 112px;
  padding:
    calc(16px + env(safe-area-inset-top, 0px))
    18px
    16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, .085);
  background: rgba(4, 13, 8, .78);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  backdrop-filter: blur(24px) saturate(135%);
}

#sidebar.ip-drawer-root .ip-drawer__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 13px;
}

#sidebar.ip-drawer-root .ip-drawer__avatar-link {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border: 0;
  border-radius: 50%;
  background: transparent !important;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

#sidebar.ip-drawer-root .ip-drawer__avatar-link::after {
  content: "";
  position: absolute;
  inset: -2px;
  border: 1px solid rgba(59, 228, 119, .20);
  border-radius: 50%;
  pointer-events: none;
}

#sidebar.ip-drawer-root .ip-drawer__avatar-link:active {
  transform: scale(.96);
}

#sidebar.ip-drawer-root .ip-drawer__avatar {
  display: grid;
  width: 62px;
  height: 62px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  object-fit: cover;
  background: #101712;
  color: var(--ipd-text);
  font-size: 22px;
  font-weight: 760;
}

#sidebar.ip-drawer-root .ip-drawer__identity-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#sidebar.ip-drawer-root .ip-drawer__name-row {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

#sidebar.ip-drawer-root .ip-drawer__name {
  overflow: hidden;
  color: var(--ipd-text);
  font-size: 20px;
  font-weight: 760;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sidebar.ip-drawer-root .ip-drawer__plan {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  align-items: center;
  border: 1px solid rgba(59, 228, 119, .23);
  border-radius: 999px;
  color: #91f5b4;
  background: rgba(59, 228, 119, .075);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

#sidebar.ip-drawer-root .ip-drawer__email {
  overflow: hidden;
  color: var(--ipd-muted);
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sidebar.ip-drawer-root .ip-drawer__close {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  width: 46px;
  height: 46px;
  min-width: 46px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  background: rgba(255, 255, 255, .065) !important;
  color: rgba(237, 246, 240, .86);
  box-shadow: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

#sidebar.ip-drawer-root .ip-drawer__close svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
}

#sidebar.ip-drawer-root .ip-drawer__close:active {
  background: rgba(255, 255, 255, .12) !important;
  transform: scale(.93);
}

#sidebar.ip-drawer-root .ip-drawer__scroll {
  min-height: 0;
  padding: 12px 0 24px;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

#sidebar.ip-drawer-root .ip-drawer__scroll::-webkit-scrollbar {
  display: none;
}

#sidebar.ip-drawer-root .ip-drawer__section {
  margin: 0;
  padding: 0;
}

#sidebar.ip-drawer-root .ip-drawer__section + .ip-drawer__section {
  margin-top: 22px;
}

#sidebar.ip-drawer-root .ip-drawer__section-label {
  padding: 0 20px 8px;
  color: var(--ipd-faint);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: .075em;
  text-transform: uppercase;
}

#sidebar.ip-drawer-root .ip-drawer__group {
  border-top: 1px solid var(--ipd-line-soft);
  border-bottom: 1px solid var(--ipd-line-soft);
  background: rgba(255, 255, 255, .012);
}

#sidebar.ip-drawer-root .ip-drawer__row {
  position: relative;
  box-sizing: border-box;
  display: grid !important;
  width: 100% !important;
  min-height: 58px;
  margin: 0 !important;
  padding: 0 18px !important;
  grid-template-columns: 28px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  border: 0 !important;
  border-radius: 0 !important;
  color: rgba(237, 246, 240, .80) !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 17px;
  font-weight: 520;
  line-height: 1.2;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .08s ease, color .08s ease;
}

#sidebar.ip-drawer-root .ip-drawer__row + .ip-drawer__row::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 58px;
  height: 1px;
  background: var(--ipd-line-soft);
  pointer-events: none;
}

#sidebar.ip-drawer-root .ip-drawer__row-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: rgba(237, 246, 240, .62);
}

#sidebar.ip-drawer-root .ip-drawer__row-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sidebar.ip-drawer-root .ip-drawer__row-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#sidebar.ip-drawer-root .ip-drawer__chevron {
  position: relative;
  display: block;
  width: 8px;
  height: 13px;
  justify-self: end;
  opacity: .46;
}

#sidebar.ip-drawer-root .ip-drawer__chevron::before,
#sidebar.ip-drawer-root .ip-drawer__chevron::after {
  content: "";
  position: absolute;
  right: 1px;
  width: 7px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
}

#sidebar.ip-drawer-root .ip-drawer__chevron::before {
  top: 4px;
  transform: rotate(45deg);
}

#sidebar.ip-drawer-root .ip-drawer__chevron::after {
  bottom: 4px;
  transform: rotate(-45deg);
}

#sidebar.ip-drawer-root .ip-drawer__row:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, .025) !important;
}

#sidebar.ip-drawer-root .ip-drawer__row:active {
  color: #fff !important;
  background: var(--ipd-surface-pressed) !important;
  border-radius: 0 !important;
}

#sidebar.ip-drawer-root .ip-drawer__row.is-current,
#sidebar.ip-drawer-root .ip-drawer__row[aria-current="page"] {
  color: var(--ipd-accent) !important;
  background:
    linear-gradient(90deg, rgba(59, 228, 119, .105), rgba(59, 228, 119, .035) 72%, transparent) !important;
  border-radius: 0 !important;
}

#sidebar.ip-drawer-root .ip-drawer__row.is-current::after,
#sidebar.ip-drawer-root .ip-drawer__row[aria-current="page"]::after {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--ipd-accent);
  box-shadow: 0 0 18px rgba(59, 228, 119, .34);
}

#sidebar.ip-drawer-root .ip-drawer__row.is-current .ip-drawer__row-icon,
#sidebar.ip-drawer-root .ip-drawer__row[aria-current="page"] .ip-drawer__row-icon,
#sidebar.ip-drawer-root .ip-drawer__row.is-current .ip-drawer__chevron,
#sidebar.ip-drawer-root .ip-drawer__row[aria-current="page"] .ip-drawer__chevron {
  color: var(--ipd-accent);
}

#sidebar.ip-drawer-root .ip-drawer__footer {
  position: relative;
  z-index: 3;
  padding:
    12px
    18px
    calc(14px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .075);
  background: rgba(3, 10, 6, .92);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}

#sidebar.ip-drawer-root .ip-drawer__signout {
  display: flex !important;
  min-height: 48px;
  padding: 0 12px !important;
  align-items: center;
  gap: 11px;
  border: 0 !important;
  border-radius: 11px !important;
  color: var(--ipd-danger) !important;
  background: rgba(255, 120, 120, .055) !important;
  font-size: 15px;
  font-weight: 680;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
}

#sidebar.ip-drawer-root .ip-drawer__signout-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
}

#sidebar.ip-drawer-root .ip-drawer__signout-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sidebar.ip-drawer-root .ip-drawer__signout:active {
  background: rgba(255, 120, 120, .11) !important;
}

@media (max-width: 768px) {
  #sidebar.ip-drawer-root .ip-drawer {
    inset: 0 !important;
    width: 100vw !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  #sidebar.ip-drawer-root .ip-drawer__header {
    min-height: 116px;
    padding-left: 20px;
    padding-right: 18px;
  }

  #sidebar.ip-drawer-root .ip-drawer__scroll {
    padding-top: 8px;
  }

  #sidebar.ip-drawer-root .ip-drawer__section-label {
    padding-left: 20px;
  }

  #sidebar.ip-drawer-root .ip-drawer__row {
    min-height: 61px;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #sidebar.ip-drawer-root .ip-drawer__row + .ip-drawer__row::before {
    right: 20px;
    left: 60px;
  }
}

@media (min-width: 769px) {
  #sidebar.ip-drawer-root .ip-drawer__header {
    padding-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #sidebar.ip-drawer-root .ip-drawer,
  #sidebar.ip-drawer-root .ip-drawer__backdrop {
    transition: none !important;
  }
}
