/*
 * Freemius Checkout — appearance overrides for SurveyX.
 *
 * HOW THIS IS USED (it is not loaded by this site):
 * The checkout runs inside a cross-origin iframe on checkout.freemius.com, so
 * nothing in the site's own stylesheet can reach it. Freemius loads this file
 * itself: paste the public URL below into the Freemius dashboard under
 * Checkout -> Appearance -> Custom CSS.
 *
 *     https://surveyx.co/checkout-appearance.css
 *
 * Until that URL is registered there, this file ships but changes nothing.
 *
 * The selectors are Freemius' own (fs-*, #order_summary, #billing). They are
 * their markup, not ours, so treat this file as a skin that may need a look
 * after a Freemius checkout release.
 *
 * Values mirror src/styles/_variables.scss: brand #0b56ff, ink #0B1430, body
 * #465886, hairline #E6E7EB, grey surface #F4F6FB, and the 8px radius the site
 * uses on .btn — so the overlay reads as the same product as the page behind it.
 */

:root {
  /* Freemius design-system hooks. */
  --fs-ds-theme-primary-accent-color: #0b56ff;
  --fs-ds-theme-primary-accent-color-hover: #0847d6;

  --fs-ds-theme-control-border-color: #e6e7eb;
  --fs-ds-theme-control-border-hover-color: var(--fs-ds-theme-primary-accent-color);

  --fs-ds-appearance-border-radius: 8px;
  --fs-ds-box-shadow-control: none;

  /* Ours, used below. */
  --sx-ink: #0b1430;
  --sx-body: #465886;
  --sx-surface: #f4f6fb;
  --sx-focus-ring: rgba(11, 86, 255, 0.16);
}

/* --- Summary panel (left) -------------------------------------------------
   Given the site's grey surface so the two columns read as separate jobs:
   what you are buying on one side, what you are typing on the other. Only at
   the width where Freemius actually goes two-column. */
@media screen and (min-width: 1141px) {
  .fs-checkout-form.fs-checkout-form--is-two-column .fs-checkout-form__details {
    background-color: var(--sx-surface);
    border-radius: var(--fs-ds-appearance-border-radius-lg) 0 0
      var(--fs-ds-appearance-border-radius-lg) !important;
  }
}

#website-checkout {
  --fs-ds-theme-background-overlay: transparent;
}

#order_summary {
  color: var(--sx-ink);
}

#order_summary .fs-line-items .fs-line-item {
  margin-inline: 0;
}

.fs-checkout-form__details {
  padding: 20px 8px 8px;
  color: var(--sx-body);
}

/* --- Form (right) --------------------------------------------------------- */
.fs-checkout-form__form {
  padding-top: 12px;
}

.fs-checkout-form__form .row {
  grid-gap: 16px;
}

#account_details {
  padding-top: 30px;
  padding-bottom: 10px;
}

.billing-details__header {
  padding-top: 30px;
}

#billing {
  padding-top: 30px;
  padding-bottom: 30px;
}

.fs-input-container {
  padding-bottom: 22px;
}

.fs-input-container__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--sx-body);
  letter-spacing: 0.01em;
}

.fs-input-container input,
.fs-input-container select,
.fs-input-container textarea {
  border-radius: var(--fs-ds-appearance-border-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* A visible focus ring rather than the browser default, which the checkout's
   own border colours otherwise swallow. */
.fs-input-container input:focus,
.fs-input-container select:focus,
.fs-input-container textarea:focus,
.fs-input:focus {
  border-color: var(--fs-ds-theme-primary-accent-color);
  box-shadow: 0 0 0 3px var(--sx-focus-ring);
  outline: none;
}

.fs-card-icon,
.fs-input-container__custom-icon {
  color: #8791b2;
}

/* --- Selected states ------------------------------------------------------
   Selection is shown by the brand border, matching the site's rule that things
   are told apart by a 1px border rather than a fill or a drop shadow. */
.fs-billing-cycle-outer .fs-billing-cycle__list-item--selected,
.fs-payment-method-chooser__radio:checked + .fs-payment-method-chooser__container {
  border-color: var(--fs-ds-theme-control-border-hover-color);
}

.fs-payment-method-chooser__radio:checked + .fs-payment-method-chooser__container {
  color: var(--fs-ds-theme-primary-accent-color);
}

.fs-payment-method-chooser__container {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.fs-payment-method-chooser__container .fs-svg {
  width: 1.5em;
  height: 1.5em;
}

.fs-payment-method-chooser__container .fs-payment-method-chooser__label {
  margin: 2px 0 0;
}

/* --- Signal bar ----------------------------------------------------------- */
fs-signal-bar {
  position: absolute;
  z-index: 1;
  width: 100%;
}

.fs-signal-bar {
  height: 40px;
  padding: 0 14px;
  background-color: transparent;
}

.fs-signal-bar__button--dummy,
.fs-signal-bar__button--toggle-size {
  display: none;
}

.fs-signal-bar__button--close {
  width: initial;
  height: initial;
  background-color: transparent !important;
}

.fs-signal-bar__button--close .fs-svg {
  width: 14px;
  height: 14px;
  color: #8791b2;
  transition: color 0.15s ease;
}

.fs-signal-bar__button--close:hover .fs-svg {
  color: var(--sx-ink);
}

/* --- Call to action ------------------------------------------------------- */
.fs-checkout-cta-group {
  margin-top: 30px;
}

.fs-checkout-cta-group .fs-cta--is-icon-right .fs-icon {
  display: none;
}

.fs-checkout-cta-group .fs-cta {
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.fs-checkout-cta-group .fs-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(11, 86, 255, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .fs-checkout-cta-group .fs-cta,
  .fs-checkout-cta-group .fs-cta:hover {
    transform: none;
    transition: none;
  }
}

.fs-upsell {
  margin-top: 10px;
}

.fs-switch__background {
  width: 40px;
}

.fs-switch__indicator {
  --fs-ds-appearance-control-height-xs: 20px;
  top: 4px;
  left: 4px;
  box-shadow: none;
}

.fs-switch__button--is-active .fs-switch__indicator {
  left: calc(100% - var(--fs-ds-appearance-control-height-xs));
}

/* Invented counts next to a real payment form are worse than none, and the
   badge repeats what the refund line already says. */
.fs-checkout-form__form .fs-social-proofing {
  display: none;
}

.fs-fulfillment-badge {
  display: none !important;
}
