.xq-traffic-cycle-item {
  align-items: center !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  gap: 16px;
  justify-content: space-between !important;
  margin-top: 8px;
  padding-top: 16px !important;
}

.xq-traffic-cycle-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.45;
  min-width: 0;
  overflow: visible;
}

.xq-traffic-cycle-heading {
  align-items: center;
  align-self: flex-start;
  display: inline-flex;
  max-width: 100%;
  position: relative;
}

.xq-traffic-cycle-label {
  color: inherit;
  font-size: 14px;
  font-weight: 600;
}

.xq-cycle-help-trigger {
  align-items: center;
  appearance: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #667085;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 44px;
  height: 44px;
  justify-content: center;
  margin: 0 0 0 2px;
  padding: 0;
  touch-action: manipulation;
  transition: background-color 180ms ease, color 180ms ease;
  width: 44px;
}

.xq-cycle-help-trigger:hover,
.xq-cycle-help-trigger[aria-expanded='true'] {
  background: rgba(22, 119, 255, 0.09);
  color: #1677ff;
}

.xq-cycle-help-trigger:focus-visible {
  background: rgba(22, 119, 255, 0.09);
  color: #1677ff;
  outline: 3px solid rgba(22, 119, 255, 0.28);
  outline-offset: -3px;
}

.xq-cycle-help-icon {
  display: block;
  height: 18px;
  pointer-events: none;
  width: 18px;
}

.xq-cycle-tooltip {
  background: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.24);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-weight: 400;
  gap: 6px;
  left: 0;
  line-height: 1.55;
  max-width: calc(100vw - 48px);
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: absolute;
  text-align: left;
  top: calc(100% + 4px);
  transform: translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  visibility: hidden;
  white-space: normal;
  width: 320px;
  z-index: 1000;
}

.xq-cycle-tooltip.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.xq-cycle-tooltip-title {
  color: #fff;
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.xq-cycle-tooltip-body,
.xq-cycle-tooltip-warning {
  display: block;
}

.xq-cycle-tooltip-warning {
  color: #fde68a;
}

.xq-traffic-cycle-help {
  color: #667085;
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  margin-top: 4px;
  max-width: 38em;
}

.xq-traffic-cycle-status {
  color: #1677ff;
  display: block;
  font-size: 12px;
  font-weight: 500;
  min-height: 18px;
  padding-top: 2px;
}

.xq-traffic-cycle-status:empty {
  min-height: 0;
  padding-top: 0;
}

.xq-traffic-cycle-status.is-error {
  color: #d92d20;
}

.xq-cycle-switch-control {
  align-items: center;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 48px;
  height: 44px;
  justify-content: center;
  position: relative;
  touch-action: manipulation;
  width: 48px;
}

.xq-cycle-switch-control input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.xq-cycle-switch-track {
  background: #b8bec8;
  border-radius: 999px;
  height: 24px;
  position: relative;
  transition: background-color 180ms ease;
  width: 44px;
}

.xq-cycle-switch-track::after {
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
  content: '';
  height: 20px;
  left: 2px;
  position: absolute;
  top: 2px;
  transition: transform 180ms ease;
  width: 20px;
}

.xq-cycle-switch-control input:checked + .xq-cycle-switch-track {
  background: #1677ff;
}

.xq-cycle-switch-control input:checked + .xq-cycle-switch-track::after {
  transform: translateX(20px);
}

.xq-cycle-switch-control input:focus-visible + .xq-cycle-switch-track {
  outline: 3px solid rgba(22, 119, 255, 0.28);
  outline-offset: 3px;
}

.xq-cycle-switch-control input:disabled + .xq-cycle-switch-track {
  cursor: not-allowed;
  opacity: 0.48;
}

.xq-cycle-switch-control.is-saving .xq-cycle-switch-track {
  opacity: 0.65;
}

.is-darkmode .xq-traffic-cycle-item {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.is-darkmode .xq-traffic-cycle-help {
  color: #b7c0ce;
}

.is-darkmode .xq-cycle-help-trigger {
  color: #b7c0ce;
}

.is-darkmode .xq-cycle-help-trigger:hover,
.is-darkmode .xq-cycle-help-trigger[aria-expanded='true'],
.is-darkmode .xq-cycle-help-trigger:focus-visible {
  background: rgba(105, 177, 255, 0.14);
  color: #69b1ff;
}

.is-darkmode .xq-cycle-tooltip {
  background: #34373c;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}

@media (max-width: 480px) {
  .xq-traffic-cycle-item {
    align-items: flex-start !important;
    gap: 8px;
  }

  .xq-cycle-tooltip {
    width: calc(100vw - 48px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .xq-cycle-help-trigger,
  .xq-cycle-tooltip,
  .xq-cycle-switch-track,
  .xq-cycle-switch-track::after {
    transition: none;
  }
}
