/* v2 checkout — layout + mobile UX (visual overrides load after checkout.js) */

.section.section_checkout {
  background-color: transparent;
  padding-top: 0;
  padding-bottom: 0;
}

html.checkout-mobile-host {
  --checkout-mobile-bar-h: 6.75rem;
}

/* Mobile checkout UX — is-staging-checkout set after checkout.js boots */
.checkout-staging-only {
  display: none !important;
}

html.is-staging-checkout .checkout-staging-only.checkout-mobile-bar,
html.is-staging-checkout .checkout-staging-only.checkout-mobile-backdrop {
  display: block !important;
}

html.is-staging-checkout .checkout-staging-only.checkout-mobile-dock {
  display: none !important;
}

html.is-staging-checkout.checkout-mobile-bar-live .checkout-staging-only.checkout-mobile-dock {
  display: block !important;
}

html.is-staging-checkout .checkout-staging-only.checkout-mobile-backdrop.is-hidden {
  display: none !important;
}

html.is-staging-checkout .section_checkout .step_2-wrapper .form_message:empty {
  display: none;
}

html.is-staging-checkout .section_checkout .checkout_main .checkout_legal {
  margin: 0.25rem 0 0;
  width: 100%;
}

html.is-staging-checkout .section_checkout #step-checkout:not(.is-hidden) #sidebar-checkout-actions {
  display: flex !important;
  flex-flow: column;
  gap: 10px;
  opacity: 1 !important;
  max-height: none !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

@media screen and (max-width: 991px) {
  html.checkout-mobile-host .checkout-mobile-dock {
    display: none !important;
    visibility: hidden !important;
  }

  html.checkout-mobile-host.checkout-mobile-bar-live .checkout-mobile-dock {
    display: block !important;
    visibility: visible !important;
  }

  html.checkout-mobile-host:not(.is-staging-checkout) .section_checkout .checkout_panel {
    display: none !important;
  }

  .section_checkout .checkout_wrapper {
    flex-direction: column;
  }

  .section_checkout .checkout_main,
  .section_checkout .checkout_panel {
    width: 100% !important;
    max-width: 100% !important;
  }

  .section_checkout .checkout_panel {
    position: static !important;
    margin-top: 1.5rem;
  }

  html.is-staging-checkout {
    --checkout-mobile-bar-h: 6.75rem;
  }

  html.is-staging-checkout .section_checkout {
    padding-bottom: 0;
  }

  html.is-staging-checkout .section_checkout .checkout_main {
    width: 100%;
    padding-bottom: calc(var(--checkout-mobile-bar-h) + 0.5rem);
  }

  html.is-staging-checkout .section_checkout .checkout_wrapper > .checkout_panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--checkout-mobile-bar-h);
    z-index: 2147483003;
    width: 100% !important;
    max-width: none !important;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    transform: translateY(calc(100% + var(--checkout-mobile-bar-h)));
    transition: transform 0.28s ease, visibility 0.28s ease;
    pointer-events: none;
    visibility: hidden;
    border-radius: 0.625rem 0.625rem 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  }

  html.is-staging-checkout .checkout-mobile-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2147483002;
    margin: 0;
    transform: translateY(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
    will-change: transform;
  }

  html.is-staging-checkout.checkout-mobile-bar-live .checkout-mobile-dock {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }

  html.is-staging-checkout.checkout-mobile-chrome-active .checkout-mobile-dock {
    opacity: 1;
  }

  html.is-staging-checkout .section_checkout.checkout-mobile-sheet-open .checkout_wrapper > .checkout_panel {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
  }

  html.is-staging-checkout .section_checkout .checkout_panel .last_info {
    display: none;
  }

  html.is-staging-checkout .checkout-mobile-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    background: rgba(2, 4, 17, 0.72);
    backdrop-filter: blur(2px);
  }

  html.is-staging-checkout .checkout-mobile-bar {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    z-index: 1;
    height: calc(var(--checkout-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    min-height: calc(var(--checkout-mobile-bar-h) + env(safe-area-inset-bottom, 0px));
    padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
    background: #0f0f0f;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
  }

  html.is-staging-checkout.checkout-mobile-chrome-active #scrollTopBtn,
  html.is-staging-checkout.checkout-mobile-chrome-active .weglot-container,
  html.is-staging-checkout.checkout-mobile-chrome-active .intercom-lightweight-app,
  html.is-staging-checkout.checkout-mobile-chrome-active .intercom-lightweight-app-launcher,
  html.is-staging-checkout.checkout-mobile-chrome-active #intercom-container {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(150%) !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  }

  html.is-staging-checkout .checkout-mobile-bar__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
    font: inherit;
  }

  html.is-staging-checkout .checkout-mobile-bar__copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
  }

  html.is-staging-checkout .checkout-mobile-bar__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fafafa;
  }

  html.is-staging-checkout .checkout-mobile-bar__meta {
    font-size: 0.75rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  html.is-staging-checkout .checkout-mobile-bar__price {
    flex-shrink: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    color: var(--_colors---brand--blue, #2069ff);
    letter-spacing: -0.02em;
  }

  html.is-staging-checkout .checkout_coupon-mobile:not(:empty) {
    display: block !important;
    width: 100%;
    margin-top: 0.25rem;
  }

  html.is-staging-checkout .checkout_coupon-mobile:empty {
    display: none !important;
  }

  html.is-staging-checkout .checkout_coupon-mobile .discount_code {
    width: 100%;
  }
}

@media screen and (min-width: 992px) {
  html.is-staging-checkout .checkout_coupon-mobile,
  html.is-staging-checkout .checkout-mobile-dock {
    display: none !important;
  }
}

/* Functional price animation — keep Webflow last_info shell */
.section.section_checkout .price_track,
.section.section_checkout .price_viewport {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 58%;
  display: flex;
  justify-content: flex-end;
  overflow: hidden;
}

.section.section_checkout #summary-price {
  color: #2069ff;
  letter-spacing: -2px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 120%;
}
