/* Citizen-o7 compact workspace shell
   Loaded after the theme stack so the shell can collapse without changing iframe state. */

.top-menu {
  overflow: visible !important;
}

.top-menu > .rsx-nav-links {
  flex: 1 1 auto;
  min-width: 0;
}

.rsx-more-menu {
  z-index: 1800;
}

.rsx-more-menu[hidden] {
  display: none !important;
}

.rsx-more-menu.is-open .rsx-more-menu__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-menu .rsx-shell-compact-toggle.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 44px;
  flex: 0 0 auto;
}

.rsx-shell-compact-toggle__icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.rsx-shell-compact-toggle__label {
  white-space: nowrap;
}

.rsx-shell-compact-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--rsx-theme-accent, #72d6ff) 78%, white);
  outline-offset: 2px;
}

html.rsx-shell-compact #rsx-system-banner.rsx-system-banner {
  position: relative !important;
  z-index: 1700 !important;
  flex: 0 0 52px !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 5px 10px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

html.rsx-shell-compact .rsx-system-banner__inner.rsx-top-header {
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
  grid-template-rows: 42px !important;
  grid-template-areas: "brand page nav actions" !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
}

html.rsx-shell-compact .rsx-brand-block {
  grid-area: brand !important;
  min-width: 0 !important;
  width: auto !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 7px !important;
}

html.rsx-shell-compact .rsx-brand-title {
  gap: 7px !important;
  font-size: 12px !important;
  letter-spacing: 1.7px !important;
  white-space: nowrap !important;
}

html.rsx-shell-compact .rsx-brand-subtitle {
  display: none !important;
}

html.rsx-shell-compact .rsx-profile-btn {
  min-height: 30px !important;
  height: 30px !important;
  max-width: 108px !important;
  padding: 4px 8px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html.rsx-shell-compact .rsx-header-page {
  grid-area: page !important;
  min-width: 0 !important;
  max-width: 145px !important;
  padding: 0 4px !important;
  align-items: flex-start !important;
  text-align: left !important;
}

html.rsx-shell-compact .rsx-header-page__title {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 1 !important;
  letter-spacing: .12em !important;
}

html.rsx-shell-compact .rsx-top-header > .top-menu {
  grid-area: nav !important;
  display: flex !important;
  align-items: center !important;
  align-self: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

html.rsx-shell-compact .top-menu .rsx-nav-links {
  min-width: 0 !important;
  height: 40px !important;
  gap: 5px !important;
  padding: 0 1px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent) !important;
  scrollbar-width: none;
}

html.rsx-shell-compact .top-menu .rsx-nav-links::-webkit-scrollbar {
  display: none;
}

html.rsx-shell-compact .top-menu .nav-btn {
  min-height: 38px !important;
  height: 38px !important;
  padding: 5px 10px !important;
  border-radius: 9px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  letter-spacing: .09em !important;
}

html.rsx-shell-compact .top-menu .rsx-shell-compact-toggle.nav-btn {
  width: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
}

html.rsx-shell-compact .rsx-shell-compact-toggle__label {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

html.rsx-shell-compact .rsx-shell-compact-toggle__icon {
  transform: rotate(180deg);
}

html.rsx-shell-compact .rsx-top-header > .top-menu > .rsx-more-menu {
  flex: 0 0 auto !important;
}

html.rsx-shell-compact .rsx-top-header > .top-menu > .rsx-more-menu .rsx-more-menu__panel,
html.rsx-shell-compact .rsx-more-menu.is-open .rsx-more-menu__panel {
  top: calc(100% + 6px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 1900 !important;
}

html.rsx-shell-compact .rsx-more-menu.is-open .rsx-more-menu__panel {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

html.rsx-shell-compact .rsx-nav-dataset-divider {
  height: 24px !important;
  margin-inline: 1px !important;
}

html.rsx-shell-compact .rsx-nav-dataset {
  flex: 0 0 174px !important;
  width: 174px !important;
  max-width: 174px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 3px 6px !important;
  box-sizing: border-box !important;
}

html.rsx-shell-compact #rsx-system-banner .rsx-nav-dataset .rsx-game-version {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  grid-template-rows: 28px !important;
  gap: 5px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.rsx-shell-compact .rsx-nav-dataset .rsx-game-version__label,
html.rsx-shell-compact .rsx-nav-dataset .rsx-game-version__status {
  display: none !important;
}

html.rsx-shell-compact .rsx-nav-dataset .rsx-game-version__value {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  max-width: 100% !important;
  font-size: 9px !important;
}

html.rsx-shell-compact .rsx-nav-dataset .rsx-game-version__btn {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 24px !important;
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  padding: 0 !important;
}

html.rsx-shell-compact .rsx-header-actions {
  grid-area: actions !important;
  grid-column: auto !important;
  grid-row: auto !important;
  justify-self: end !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 5px !important;
  width: auto !important;
}

html.rsx-shell-compact .rsx-retrieve-btn {
  width: auto !important;
  min-width: 172px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 13px !important;
  gap: 8px !important;
  white-space: nowrap !important;
}

html.rsx-shell-compact .rsx-retrieve-btn__label {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: nowrap !important;
  border: 0 !important;
  font-size: 10px !important;
  letter-spacing: .08em !important;
}

html.rsx-shell-compact .rsx-retrieve-btn::after {
  content: "↻";
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 1;
}

html.rsx-shell-compact #load-rsi-data {
  flex: 0 0 auto !important;
  width: max-content !important;
  max-width: none !important;
}

html.rsx-shell-compact #load-rsi-data .rsx-retrieve-btn__label {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

html.rsx-shell-compact .rsx-extension-status {
  min-width: 178px !important;
  max-width: 224px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 5px 7px 5px 9px !important;
  gap: 7px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

html.rsx-shell-compact #rsx-extension-status {
  flex: 0 0 auto !important;
}

html.rsx-shell-compact .rsx-extension-status__text {
  position: static !important;
  width: auto !important;
  height: auto !important;
  max-width: 154px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: auto !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  border: 0 !important;
  font-size: 10px !important;
  letter-spacing: .04em !important;
}

html.rsx-shell-compact .rsx-extension-status .rsx-system-banner__link {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  z-index: 1900 !important;
  padding: 8px 10px !important;
  border: 1px solid var(--rsx-theme-border, rgba(94,190,255,.28)) !important;
  border-radius: 9px !important;
  background: var(--rsx-theme-panel, rgba(4,12,22,.98)) !important;
  box-shadow: var(--rsx-theme-shadow, 0 18px 48px rgba(0,0,0,.35)) !important;
}

html.rsx-shell-compact .rsx-app-loader:not(.rsx-cinematic) {
  top: 58px !important;
}

@media (max-width: 1180px) {
  html.rsx-shell-compact #rsx-system-banner.rsx-system-banner {
    flex-basis: 88px !important;
    height: 88px !important;
    min-height: 88px !important;
    padding: 4px 8px !important;
  }

  html.rsx-shell-compact .rsx-system-banner__inner.rsx-top-header {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: 38px 40px !important;
    grid-template-areas:
      "brand page actions"
      "nav nav nav" !important;
    gap: 2px 8px !important;
    height: 80px !important;
    min-height: 80px !important;
  }

  html.rsx-shell-compact .rsx-app-loader:not(.rsx-cinematic) {
    top: 94px !important;
  }
}

@media (max-width: 680px) {
  html.rsx-shell-compact #rsx-system-banner.rsx-system-banner {
    flex-basis: 84px !important;
    height: 84px !important;
    min-height: 84px !important;
  }

  html.rsx-shell-compact .rsx-system-banner__inner.rsx-top-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 36px 40px !important;
    grid-template-areas:
      "brand actions"
      "nav nav" !important;
    height: 76px !important;
    min-height: 76px !important;
  }

  html.rsx-shell-compact .rsx-header-page {
    display: none !important;
  }

  html.rsx-shell-compact .rsx-brand-title {
    font-size: 11px !important;
    letter-spacing: 1.2px !important;
  }

  html.rsx-shell-compact .rsx-profile-btn {
    max-width: 82px !important;
    padding-inline: 6px !important;
  }

  html.rsx-shell-compact .rsx-retrieve-btn {
    width: auto !important;
    min-width: 154px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding-inline: 10px !important;
  }

  html.rsx-shell-compact .rsx-extension-status {
    min-width: 154px !important;
    max-width: 184px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 3px 5px !important;
  }

  html.rsx-shell-compact .rsx-extension-status__text {
    max-width: 116px !important;
    font-size: 9px !important;
  }

  html.rsx-shell-compact .rsx-nav-dataset {
    flex-basis: 132px !important;
    width: 132px !important;
    max-width: 132px !important;
  }

  html.rsx-shell-compact .top-menu .nav-btn {
    padding-inline: 8px !important;
    font-size: 9px !important;
  }
}

@media (max-width: 560px) {
  html.rsx-shell-compact #rsx-system-banner.rsx-system-banner {
    flex-basis: 124px !important;
    height: 124px !important;
    min-height: 124px !important;
  }

  html.rsx-shell-compact .rsx-system-banner__inner.rsx-top-header {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-rows: 34px 38px 40px !important;
    grid-template-areas:
      "brand brand"
      "actions actions"
      "nav nav" !important;
    height: 116px !important;
    min-height: 116px !important;
  }

  html.rsx-shell-compact .rsx-header-actions {
    justify-self: end !important;
  }

  html.rsx-shell-compact .rsx-app-loader:not(.rsx-cinematic) {
    top: 130px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsx-shell-compact-toggle__icon {
    transition: none !important;
  }
}
