/* The original Webtrace segmented control, shared by pricing and account. */
.billing-toggle {
  display: inline-flex;
  align-items: stretch;
  flex-shrink: 1;
  gap: 4px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1.2px solid #18181b;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 3px 0 #18181b;
}

.billing-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 10px 17px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #52565e;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.billing-toggle button[aria-pressed="true"] {
  background: #18181b;
  color: #ffffff;
  box-shadow: inset 0 1px 0 #ffffff18;
}

.billing-toggle button:not([aria-pressed="true"]):hover:not(:disabled) {
  background: #eef1f3;
  color: #18181b;
}

.billing-toggle button:active:not(:disabled) {
  box-shadow: inset 0 2px 3px #00000020;
}

.billing-toggle button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid #327bda;
  outline-offset: 2px;
}

.billing-toggle button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.billing-saving {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 4px 7px;
  margin-inline: 1px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-shadow: 0 1px 0 #086d27, .4px 0 .5px #086d27, -.4px 0 .5px #086d27, 0 -.4px .5px #086d27;
  white-space: nowrap;
}

.billing-saving::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border: 1px solid #16993c;
  border-radius: 3px;
  background: radial-gradient(84% 180% at 50% 118%, #7ddf8e 0%, #2ecc55 52%, #00b138 100%);
  box-shadow: inset 0 1px 0 #ffffff40, 0 2px 0 #00792a;
  transform: skewX(-11deg);
  pointer-events: none;
}

@media (max-width: 600px) {
  .billing-control { align-items: flex-start; }
  .billing-toggle button { padding-inline: 13px; }
}

@media (max-width: 360px) {
  .billing-toggle { gap: 3px; }
  .billing-toggle button {
    gap: 7px;
    padding-inline: 10px;
    font-size: 12px;
  }
  .billing-saving { padding-inline: 5px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .billing-toggle button { transition: none; }
}

@media (forced-colors: active) {
  .billing-toggle {
    border-color: ButtonText;
    background: Canvas;
    box-shadow: none;
  }
  .billing-toggle button {
    border: 1px solid transparent;
    color: ButtonText;
  }
  .billing-toggle button[aria-pressed="true"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  .billing-toggle button:focus-visible { outline-color: Highlight; }
  .billing-saving { color: CanvasText; text-shadow: none; }
  .billing-saving::before {
    border-color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }
}
