/* Shared visual language for controls that switch views, periods, objects or filters. */
.ui-switch-group {
  display: flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px;
  border: 1px solid #d9def0;
  border-radius: 10px;
  background: #f3f5fb;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: #bcc4df transparent;
}

.ui-switch-item {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 13px !important;
  border: 1px solid #d5dbeb !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #566079 !important;
  box-shadow: 0 1px 2px rgba(19, 31, 83, .04);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
  -webkit-tap-highlight-color: transparent;
}

.ui-switch-item:hover {
  border-color: #8995ca !important;
  background: #e9ecfb !important;
  color: #1a237e !important;
  box-shadow: 0 3px 9px rgba(26, 35, 126, .1);
  transform: translateY(-1px);
}

.ui-switch-item:focus-visible,
.ui-switch-entry:focus-visible {
  outline: 3px solid rgba(74, 94, 198, .28);
  outline-offset: 2px;
}

.ui-switch-item.active,
.ui-switch-item.is-active,
.ui-switch-item.is-current,
.ui-switch-item[aria-selected="true"],
.ui-switch-item[aria-pressed="true"],
.ui-switch-item[aria-current="page"] {
  border-color: #1a237e !important;
  background: #1a237e !important;
  color: #fff !important;
  box-shadow: 0 5px 14px rgba(26, 35, 126, .24);
  transform: none;
}

.ui-switch-item.active :is(i, strong, small, span),
.ui-switch-item.is-active :is(i, strong, small, span),
.ui-switch-item.is-current :is(i, strong, small, span),
.ui-switch-item[aria-selected="true"] :is(i, strong, small, span),
.ui-switch-item[aria-pressed="true"] :is(i, strong, small, span),
.ui-switch-item[aria-current="page"] :is(i, strong, small, span) {
  color: inherit !important;
}

.ui-switch-item.active i,
.ui-switch-item.is-active i,
.ui-switch-item[aria-selected="true"] i,
.ui-switch-item[aria-current="page"] i {
  border-color: rgba(255, 255, 255, .35) !important;
  background: rgba(255, 255, 255, .16) !important;
}

.ui-switch-item:disabled,
.ui-switch-item[aria-disabled="true"] {
  opacity: .48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.ui-switch-group--tabs .ui-switch-item {
  min-height: 38px;
}

.ui-switch-group--compact {
  width: max-content;
  max-width: 100%;
  padding: 4px;
}

.ui-switch-group--compact .ui-switch-item {
  min-height: 32px;
  padding-inline: 11px !important;
  font-size: 15px;
}

.ui-switch-group--objects {
  flex-wrap: wrap;
  overflow-x: visible;
}

.ui-switch-group--objects .ui-switch-item {
  border-radius: 999px !important;
}

.ui-switch-group--stack {
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
}

.ui-switch-group--stack .ui-switch-item {
  width: 100%;
  justify-content: flex-start;
}

.ui-switch-item--card {
  height: auto !important;
  min-height: 58px;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  white-space: normal;
}

.ui-switch-entry {
  position: relative;
  border: 1px solid rgba(255, 255, 255, .35) !important;
  border-radius: 9px !important;
  background: rgba(255, 255, 255, .1) !important;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.ui-switch-entry:hover,
.xz-app-switcher.is-open .ui-switch-entry {
  border-color: rgba(255, 255, 255, .75) !important;
  background: rgba(255, 255, 255, .19) !important;
  box-shadow: 0 3px 12px rgba(3, 8, 50, .2);
}

.xz-app-item.ui-switch-item--card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

@media (max-width: 720px) {
  .ui-switch-group {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
    padding: 4px;
  }

  .ui-switch-item {
    min-height: 38px;
    padding-inline: 11px !important;
  }

  .ui-switch-group--objects {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .ui-switch-group--compact {
    width: 100%;
  }

}
