.xw-run-entry {
  position: relative;
}

.xw-run-entry .xw-run-entry-count {
  display: none;
  min-width: 1rem;
  padding-left: .18rem;
  color: #315ee8;
  background: transparent;
  font-size: .625rem;
  font-weight: 800;
  line-height: 1;
}

.xw-run-entry.has-running .xw-run-entry-count {
  display: inline;
}

.xw-run-entry.is-open {
  color: #315ee8 !important;
  background: #f5f7ff !important;
}

.topbar {
  position: relative;
  overflow: visible;
}

.topbar > .topbar-actions {
  flex: 0 0 auto;
  width: max-content;
  max-width: none;
  margin-left: auto;
  flex-wrap: nowrap !important;
  gap: .0625rem;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  white-space: nowrap;
}

.topbar > .topbar-actions > .xw-marketplace-context {
  flex: 0 0 auto;
  height: 2rem;
  margin: 0 .0625rem;
}

.topbar > .topbar-actions > .xw-marketplace-context select {
  width: auto;
  min-width: 3.75rem;
  height: 2rem;
  padding: .375rem .6875rem;
  border: 0;
  border-radius: .625rem;
  background: transparent;
  color: #334155;
  font-size: .8125rem;
  font-weight: 700;
}

.topbar > .topbar-actions > .xw-marketplace-context select:hover,
.topbar > .topbar-actions > .xw-marketplace-context select:focus-visible {
  outline: none;
  color: #2563eb;
  background: #f6f8ff;
}

.topbar > .topbar-actions .top-product-nav {
  flex: 0 0 auto;
  flex-basis: auto;
  flex-wrap: nowrap;
  gap: .0625rem;
  white-space: nowrap;
}

.topbar > .topbar-actions .top-nav-link,
.topbar > .topbar-actions .top-menu-btn {
  flex: 0 0 auto;
  min-width: max-content;
  white-space: nowrap;
}

#xwRunRecordBtn > i,
.top-product-nav .top-nav-link > i,
#topHistoryBtn > i,
#topPoolBtn > i {
  display: none !important;
}

.topbar > .topbar-actions .xw-notice-bell {
  position: relative;
  z-index: 2;
  flex: 0 0 2.35rem;
  width: 2.35rem;
  min-width: 2.35rem;
  padding: 0;
  display: inline-grid;
  place-items: center;
  overflow: visible;
}

.topbar > .topbar-actions .xw-notice-bell > i {
  display: inline-block;
  margin: 0;
}

.topbar > .topbar-actions .xw-notice-bell > b {
  top: -.18rem;
  right: -.06rem;
  z-index: 3;
}

.topbar > .topbar-actions .account-menu {
  flex: 0 0 auto;
  margin-left: .18rem;
}

.topbar:has(.xw-run-dock.is-open) {
  display: grid !important;
  grid-template-columns: max-content minmax(0, 35rem) max-content;
  grid-template-rows: auto;
  align-items: center !important;
  justify-content: space-between;
  column-gap: 1rem;
  flex-wrap: nowrap !important;
}

.topbar:has(.xw-run-dock.is-open) > .xw-marketplace-context {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.topbar:has(.xw-run-dock.is-open) > .xw-run-dock {
  grid-column: 2;
  grid-row: 1;
  justify-self: stretch;
}

.topbar:has(.xw-run-dock.is-open) > .topbar-actions {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.xw-run-dock {
  position: relative;
  z-index: 520;
  min-width: 0;
  width: 100%;
  max-width: 35rem;
  display: none;
}

.xw-run-dock.is-open {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 35rem;
  margin: 0;
}

.xw-run-capsule {
  box-sizing: border-box;
  width: 100%;
  height: 2.125rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
  border: .0625rem solid #e1e5eb;
  border-radius: .5rem;
  background: #f4f5f7;
  box-shadow: none;
}

.xw-run-capsule-grid {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
}

.xw-run-capsule-item {
  min-width: 0;
  height: 100%;
  display: block;
  padding: 0 .8rem;
  overflow: hidden;
  border: 0;
  border-left: .0625rem solid #e0e4ea;
  background: transparent;
  color: #1c2940;
  text-align: left;
  cursor: pointer;
}

.xw-run-capsule-item:first-child {
  border-left: 0;
}

.xw-run-capsule-item:hover {
  background: #eaedf2;
}

.xw-run-capsule-copy,
.xw-run-capsule-copy strong {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-run-capsule-copy strong {
  color: #17243a;
  font-size: .66rem;
  line-height: 2rem;
  font-weight: 760;
}

.xw-run-capsule-copy strong b {
  margin-left: .55rem;
  color: #566176;
  font-size: .6rem;
  font-weight: 650;
}

.xw-run-capsule-item.is-success .xw-run-capsule-copy strong b {
  color: #17855f;
}

.xw-run-capsule-item.is-failed .xw-run-capsule-copy strong b {
  color: #d94b4b;
}

.xw-run-dock-expand {
  height: 1.8rem;
  margin: 0 .26rem 0 .12rem;
  padding: 0 .65rem;
  border: 0;
  border-radius: .38rem;
  background: transparent;
  color: #344157;
  font-size: .64rem;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
}

.xw-run-dock-expand:hover {
  color: #315ee8;
  background: #e8ebf1;
}

.xw-run-expanded {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  right: 0;
  z-index: 560;
  box-sizing: border-box;
  width: auto;
  display: none;
  overflow: hidden;
  border: .0625rem solid #e1e5eb;
  border-radius: .5rem;
  background: #fff;
  box-shadow: 0 .75rem 2rem rgba(27, 48, 79, .14);
}

.xw-run-dock.is-expanded .xw-run-expanded {
  display: block;
}

.xw-run-dock-grid {
  display: grid;
  grid-template-columns: 1fr;
  padding: .35rem .75rem 0;
}

.xw-run-card {
  min-width: 0;
  border-top: .0625rem solid #e8edf4;
}

.xw-run-card:first-child {
  border-top: 0;
}

.xw-run-card-main {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: .3rem;
  padding: .7rem .15rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.xw-run-card-main:hover {
  background: #fafbfc;
}

.xw-run-card-head {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .45rem;
  white-space: nowrap;
}

.xw-run-card-head strong {
  color: #17243a;
  font-size: .68rem;
  font-weight: 780;
}

.xw-run-card-head > span:not(.xw-run-card-status) {
  min-width: 0;
  overflow: hidden;
  color: #667287;
  font-size: .6rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-run-card-status {
  color: #4169e1;
  font-size: .58rem;
  font-weight: 740;
}

.xw-run-card.is-success .xw-run-card-status {
  color: #17855f;
}

.xw-run-card.is-failed .xw-run-card-status {
  color: #d94b4b;
}

.xw-run-card-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  color: #68758a;
  font-size: .59rem;
}

.xw-run-card-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-run-card-copy time {
  color: #99a3b2;
  white-space: nowrap;
}

.xw-run-card-empty {
  min-height: 3.5rem;
  display: grid;
  place-items: center;
  color: #8b96a7;
  font-size: .66rem;
}

.xw-run-expanded-footer {
  display: flex;
  justify-content: center;
  padding: .35rem .75rem .5rem;
  border-top: .0625rem solid #edf0f4;
}

.xw-run-expanded-action {
  min-height: 1.65rem;
  padding: 0 .6rem;
  border: 0;
  border-radius: .35rem;
  color: #315ee8;
  background: transparent;
  font-size: .62rem;
  font-weight: 740;
  cursor: pointer;
}

.xw-run-expanded-action:hover {
  background: #f2f5ff;
}

.xw-run-history {
  display: none;
  max-height: 13rem;
  overflow: auto;
  padding: .35rem .7rem .55rem;
  border-top: .0625rem solid #e8edf4;
  background: #f8fafc;
}

.xw-run-dock.show-history .xw-run-history {
  display: grid;
}

.xw-run-history-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .65rem;
  min-height: 2.2rem;
  padding: .35rem .15rem;
  border-bottom: .0625rem solid #e7ebf1;
}

.xw-run-history-row:last-child {
  border-bottom: 0;
}

.xw-run-history-row > div {
  min-width: 0;
}

.xw-run-history-row strong,
.xw-run-history-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.xw-run-history-row strong {
  color: #253249;
  font-size: .63rem;
}

.xw-run-history-row span,
.xw-run-history-row time {
  color: #7d899b;
  font-size: .57rem;
}

.xw-run-history-status {
  color: #315ee8 !important;
  font-weight: 760;
}

.xw-run-history-status.is-success {
  color: #16845f !important;
}

.xw-run-history-status.is-failed,
.xw-run-history-status.is-interrupted {
  color: #d94b4b !important;
}

.xw-run-history-empty {
  padding: .9rem;
  color: #8b96a7;
  font-size: .64rem;
  text-align: center;
}

body.theme-dark .xw-run-capsule,
body.theme-dark .xw-run-expanded {
  border-color: #334155;
  background: #111827;
}

body.theme-dark .xw-run-capsule-copy strong,
body.theme-dark .xw-run-card-head strong {
  color: #e5edf7;
}

body.theme-dark .xw-run-capsule-item,
body.theme-dark .xw-run-card {
  border-color: #334155;
}

body.theme-dark .xw-run-history {
  border-color: #334155;
  background: #0f172a;
}

@media (max-width: 1280px) {
  .topbar:has(.xw-run-dock.is-open) {
    grid-template-columns: max-content minmax(0, 25rem) max-content;
    column-gap: .65rem;
  }

  .xw-run-capsule-item:nth-child(2) {
    display: none;
  }

  .xw-run-capsule-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .topbar:has(.xw-run-dock.is-open) {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    column-gap: .4rem;
  }

  .topbar > .topbar-actions .top-nav-link,
  .topbar > .topbar-actions .top-menu-btn {
    padding-inline: .42rem;
  }
}

@media (max-width: 760px) {
  .topbar:has(.xw-run-dock.is-open) {
    display: flex !important;
    flex-wrap: wrap !important;
  }

  .xw-run-dock.is-open {
    order: 10;
    flex: 0 0 100%;
    max-width: none;
    margin-top: .4rem;
  }
}
