/* Script Payments application navigation */
.app-sidebar {
  flex-basis: 280px;
}

.sp-staff-sidebar {
  width: 260px;
  min-width: 260px;
  flex-basis: 260px;
  max-height: 100vh;
  overflow: visible;
}

/* The rail menu scrolls when it is taller than the viewport. Flyouts are portaled to the
   document and positioned fixed by staff-nav.js, so they are not clipped by this scroller. */
.sp-staff-sidebar .app-sidebar-menu {
  overflow-x: hidden;
  overflow-y: auto;
  padding: .05rem .45rem .35rem;
}

.sp-staff-sidebar .menu {
  overflow: visible !important;
}

.sp-staff-sidebar .app-sidebar-logo {
  min-height: 0;
  padding: .5rem .75rem .25rem;
}

.sp-staff-sidebar .app-logo--sidebar {
  width: 148px;
  height: 32px;
}

.sp-staff-sidebar .app-sidebar-workspace {
  padding: 0 .65rem .3rem;
}

.sp-staff-sidebar .sp-workspace-card,
.sp-staff-drawer .sp-workspace-card {
  min-height: 40px;
  padding: .35rem .5rem;
  gap: .4rem;
  border-radius: 10px;
}

.sp-staff-sidebar .sp-workspace-label,
.sp-staff-sidebar .sp-workspace-copy small,
.sp-staff-drawer .sp-workspace-label,
.sp-staff-drawer .sp-workspace-copy small {
  display: none;
}

.sp-staff-sidebar .sp-workspace-icon,
.sp-staff-drawer .sp-workspace-icon {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.sp-staff-sidebar .app-sidebar-chrome,
.sp-staff-drawer__chrome {
  gap: .4rem;
  padding: 0 .65rem .35rem;
}

.sp-staff-sidebar .menu .menu-item {
  margin-bottom: 0;
}

.sp-staff-sidebar .app-sidebar-bottom {
  padding: .3rem .55rem .45rem;
}

.sp-staff-sidebar .app-sidebar-bottom .menu {
  margin-bottom: .3rem;
}

.sp-staff-sidebar .menu .menu-link,
.sp-staff-drawer .menu .menu-link {
  min-height: 34px;
  padding: .28rem .5rem;
}

.sp-nav-group {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.sp-nav-group[aria-expanded="true"] {
  background: var(--sp-nav-hover);
  color: var(--sp-text-primary);
}

.sp-staff-sidebar .menu .menu-link.sp-nav-group[aria-expanded="true"],
.sp-staff-drawer .menu .menu-link.sp-nav-group[aria-expanded="true"] {
  background: var(--sp-nav-active-bg);
  color: var(--sp-nav-active-text);
  box-shadow: none;
}

.sp-staff-sidebar .menu .menu-link.sp-nav-group[aria-expanded="true"] .menu-icon,
.sp-staff-drawer .menu .menu-link.sp-nav-group[aria-expanded="true"] .menu-icon {
  color: var(--sp-nav-active-text);
}

.sp-nav-chevron {
  display: inline-flex;
  color: var(--sp-text-subtle);
  font-size: .7rem;
}

.sp-staff-top-nav {
  margin-top: .1rem;
}

.sp-staff-orders {
  display: flex;
  flex-direction: column;
  gap: .05rem;
}

.sp-staff-orders__heading {
  padding: .4rem .5rem .08rem;
  color: var(--sp-text-subtle);
  font-size: 10.5px;
  font-weight: var(--sp-font-semibold);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sp-staff-sidebar .sp-staff-orders .menu-link,
.sp-staff-drawer .sp-staff-orders .menu-link {
  min-height: 34px;
  padding: .22rem .5rem;
  font-size: 13px;
  font-weight: var(--sp-font-normal);
}

.sp-staff-orders .menu-link.active {
  font-weight: var(--sp-font-semibold);
}

.sp-staff-nav-divider {
  height: 1px;
  margin: .4rem .4rem .35rem;
  background: var(--sp-sidebar-border);
}

.sp-staff-chrome-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.sp-staff-new-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex: 1 1 auto;
  width: auto;
  min-height: 36px;
  border-radius: 10px !important;
  font-weight: var(--sp-font-semibold);
}

.sp-staff-find-trigger {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--sp-sidebar-border);
  border-radius: 10px;
  color: var(--sp-nav-text);
  background: #fff;
}

.sp-staff-find-trigger:hover,
.sp-staff-find-trigger[aria-expanded="true"] {
  border-color: #cdd8e8;
  color: var(--sp-nav-active-text);
  background: var(--sp-nav-active-bg);
}

.sp-nav-flyout[hidden]:not(.is-open):not(.show),
.sp-staff-find[hidden]:not(.is-open) {
  display: none !important;
}

.sp-staff-sidebar .menu-item.dropdown,
.sp-staff-drawer .menu-item.dropdown {
  position: relative;
}

.sp-nav-flyout.dropdown-menu {
  position: absolute;
  top: 0;
  left: 100%;
  z-index: 2000;
  display: none;
  min-width: 220px;
  max-width: min(440px, calc(100vw - 16px));
  margin: 0 0 0 8px;
  padding: .45rem;
  border: 1px solid var(--sp-sidebar-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .16);
  transform: none !important;
}

.sp-nav-flyout.dropdown-menu.show,
.sp-nav-flyout.is-open {
  display: flex !important;
  flex-direction: column;
}

/* When staff-nav.js portals a flyout to <html> it sets fixed left/top inline; drop the
   sidebar-relative margin so the computed gap is not doubled. */
.sp-nav-flyout.is-open {
  margin: 0;
  overflow: hidden;
}

.sp-nav-flyout__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  padding: .05rem .1rem .3rem .45rem;
}

.sp-nav-flyout__title {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: var(--sp-text-subtle);
  font-size: 11px;
  font-weight: var(--sp-font-semibold);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sp-nav-flyout__close {
  display: inline-flex;
  flex: 0 0 28px;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--sp-text-subtle);
  background: transparent;
}

.sp-nav-flyout__close:hover,
.sp-nav-flyout__close:focus-visible {
  color: var(--sp-text-primary);
  background: var(--sp-nav-hover);
}

.sp-nav-flyout__grid {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 1fr;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.sp-nav-flyout--cols .sp-nav-flyout__grid {
  grid-template-columns: repeat(2, minmax(200px, 1fr));
}

.sp-nav-flyout .menu-link {
  min-height: 36px;
  padding: .32rem .55rem;
  border-radius: 8px;
}

.sp-staff-find {
  position: fixed;
  z-index: 2001;
  display: none;
  width: min(360px, calc(100vw - 16px));
  padding: .65rem;
  border: 1px solid var(--sp-sidebar-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .16);
}

.sp-staff-find.is-open {
  display: block !important;
}

.sp-staff-find .form-control {
  min-height: 36px;
  border-color: var(--sp-sidebar-border);
  border-radius: 8px;
  font-size: 13px;
}

.sp-staff-find__results {
  max-height: min(18rem, calc(100vh - 8rem));
  overflow: auto;
  margin-top: .4rem;
}

.sp-staff-find__results a,
.sp-staff-find__empty {
  display: block;
  min-height: 36px;
  padding: .45rem .6rem;
  border-radius: 8px;
  color: var(--sp-nav-text);
  font-size: 13px;
  text-decoration: none;
}

.sp-staff-find__empty {
  color: var(--sp-text-muted);
}

.sp-staff-find__results a:hover,
.sp-staff-find__results a:focus-visible,
.sp-staff-find__results a.is-active {
  background: var(--sp-nav-active-bg);
  color: var(--sp-nav-active-text);
}

.sp-staff-drill[hidden] {
  display: none !important;
}

.sp-staff-drill__back {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  margin-bottom: .35rem;
  padding: .3rem .45rem;
  border: 0;
  border-radius: 8px;
  color: var(--sp-nav-text);
  background: transparent;
  font-weight: var(--sp-font-medium);
}

.sp-staff-drill__back:hover,
.sp-staff-drill__back:focus-visible {
  background: var(--sp-nav-hover);
  color: var(--sp-text-primary);
}

.sp-staff-drill__title {
  padding: .15rem .45rem .45rem;
  color: var(--sp-text-primary);
  font-size: 13px;
  font-weight: var(--sp-font-semibold);
}

.sp-staff-drill__list .menu-link,
.sp-staff-drill__list a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: .32rem .55rem;
  border-radius: 8px;
}

body.sp-staff-nav--overlay .sp-staff-sidebar {
  display: none !important;
}

body.sp-staff-nav--overlay .sp-staff-menu-toggle,
body.sp-staff-nav--overlay .sp-header-new-order {
  display: inline-flex !important;
}

body.sp-staff-nav--overlay .sp-staff-header-account {
  display: block !important;
}

.sp-staff-user {
  width: 100%;
}

.sp-staff-user__button {
  display: flex;
  align-items: center;
  gap: .5rem;
  width: 100%;
  min-height: 40px;
  padding: .3rem .4rem;
  border: 1px solid var(--sp-sidebar-border);
  border-radius: 10px;
  color: inherit;
  background: #fff;
  text-align: left;
}

.sp-staff-user__copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  line-height: 1.2;
}

.sp-staff-user__copy strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: var(--sp-font-semibold);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-staff-user__copy span {
  overflow: hidden;
  color: var(--sp-text-subtle);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-staff-drawer__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sp-staff-drawer__menu {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.sp-header-new-order {
  white-space: nowrap;
}

.sp-settings {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sp-settings__heading {
  margin-bottom: .75rem;
  color: var(--sp-text-primary);
  font-size: 1rem;
  font-weight: var(--sp-font-semibold);
}

.sp-settings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
}

.sp-settings__card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-height: 88px;
  padding: 1rem;
  border: 1px solid var(--sp-border);
  border-radius: 12px;
  color: inherit;
  background: #fff;
  text-decoration: none;
}

.sp-settings__card:hover,
.sp-settings__card:focus-visible {
  border-color: #cdd8e8;
  background: #fbfdff;
  color: inherit;
}

.sp-settings__icon {
  display: inline-flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--sp-blue-600);
  background: var(--sp-nav-active-bg);
}

.sp-settings__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: .2rem;
}

.sp-settings__copy strong {
  font-size: 14px;
  font-weight: var(--sp-font-semibold);
}

.sp-settings__copy span {
  color: var(--sp-text-muted);
  font-size: 12px;
}

.sp-settings__empty {
  margin: 0;
  color: var(--sp-text-muted);
  font-size: 13px;
}

.app-sidebar-menu {
  scrollbar-width: thin;
  scrollbar-color: var(--sp-slate-300) transparent;
}

.menu .menu-heading {
  text-transform: uppercase;
}

.menu .menu-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sp-mobile-nav {
  position: fixed;
  z-index: 1040;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  min-height: 68px;
  padding: 5px max(6px, env(safe-area-inset-right)) max(5px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
  border-top: 1px solid var(--sp-border);
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -4px 18px rgba(15, 23, 42, .07);
  backdrop-filter: blur(14px);
}

.sp-mobile-nav__item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  border: 0;
  border-radius: var(--sp-radius-md);
  color: var(--sp-slate-600);
  background: transparent;
  font: inherit;
  font-size: 10px;
  font-weight: var(--sp-font-medium);
  line-height: 1.2;
  text-decoration: none;
}

.sp-mobile-nav__item > i {
  font-size: 19px;
  line-height: 1;
}

.sp-mobile-nav__item:hover,
.sp-mobile-nav__item:focus-visible,
.sp-mobile-nav__item.active {
  color: var(--sp-blue-600);
  background: var(--sp-nav-active-bg);
}

.sp-mobile-nav__item--new {
  margin-top: -15px;
  background: transparent !important;
}

.sp-mobile-nav__new-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 4px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--sp-gradient);
  box-shadow: 0 5px 12px rgba(37, 99, 235, .24);
  font-size: 20px;
}

@media (max-width: 991.98px) {
  .sp-app .app-main {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .sp-app .app-header {
    position: sticky;
    z-index: 1025;
    top: 0;
  }
}

@media (min-width: 992px) {
  .sp-mobile-nav {
    display: none;
  }
}

@media print {
  .sp-mobile-nav {
    display: none !important;
  }
}
