/**
 * GenOffer Storefront Base Styles
 * Base styles for all storefront pages
 */

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base body styles */
body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #111827;
  background-color: #ffffff;
}

/* Landing page container */
.landing-page {
  min-height: 100vh;
}

/* Image defaults */
img {
  max-width: 100%;
  height: auto;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Button animations */
button,
a.cta-button {
  transition: transform 0.2s, box-shadow 0.2s;
}

button:hover,
a.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Checkout page layout - constrain width */
.genoffer-checkout-products,
.genoffer-address-form,
.genoffer-order-summary,
.genoffer-payment-form {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/*
 * Shopify-style checkout (ShopifyCheckoutLayout, class .sc-layout) owns a
 * single authoritative horizontal inset for every block in its layout:
 * `hPadding`/`sidebarInset` on desktop, the `stackedInset` prop (applied to
 * .sc-layout-main/.sc-layout-side/.sc-layout-side-footer) once it stacks
 * below the mobile breakpoint. AddressForm/PaymentForm always render with
 * the .genoffer-address-form/.genoffer-payment-form classes above regardless
 * of `fieldStyle`, so without this override two things double up with that
 * owned inset inside .sc-layout: the max-width:680px here re-centers the
 * block (with unwanted margin:auto) once the stacked column - which can be
 * wider than 680px in the fluid range between the mobile and desktop
 * breakpoints - exceeds it, and the mobile margin rule further below adds
 * its own 16px on top. Both push fields/submit button in further than
 * sibling blocks like section headings or NoticeBanner, at different
 * amounts depending on viewport width - the exact left/right-margin
 * inconsistency this rule (and its mobile-scoped twin below) fixes. This is
 * a normal (non-media) rule so its higher specificity - two classes vs. one
 * - wins over both the rule above and the mobile-only rule below regardless
 * of viewport. Scoped to descendants of .sc-layout only, so the default
 * (non-Shopify) checkout variant above - still live on other merchant
 * checkout templates - is completely unaffected.
 */
.sc-layout .genoffer-checkout-products,
.sc-layout .genoffer-address-form,
.sc-layout .genoffer-order-summary,
.sc-layout .genoffer-payment-form {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* Checkout page container */
[data-page-type="CHECKOUT"] .landing-page > div,
body.checkout-page .landing-page > div {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

/* Responsive adjustments for checkout */
@media (max-width: 768px) {
  .genoffer-checkout-products,
  .genoffer-address-form,
  .genoffer-order-summary,
  .genoffer-payment-form {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* Form input focus states */
.genoffer-address-form input:focus,
.genoffer-address-form select:focus,
.genoffer-payment-form input:focus,
.genoffer-payment-form select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Spreedly iframe container styles */
#spreedly-number,
#spreedly-cvv {
  position: relative;
}

#spreedly-number iframe,
#spreedly-cvv iframe {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
  position: absolute;
  top: 0;
  left: 0;
}

/* Draft Preview Banner */
.draft-preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  color: white;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
