/* Values from the iOS design system, Utils/Sources/Utils/SLDesignSystem.swift and Colors.xcassets, light mode. */
body {
  margin: 0 auto;
  max-width: 480px;
  padding: 0 0 40px;
  background: #FFFFFF;
  color: #060605;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

/* The app's paywall keeps 16px side margins. Our own text blocks use the same. */
.top, .caption, #success, #error { padding-left: 16px; padding-right: 16px; }

.top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
  padding-bottom: 16px;
  font-size: 13px;
  color: rgba(59, 59, 59, 0.8);
}

h2 { margin: 16px 0 8px; font-size: 28px; font-weight: 700; line-height: 1.2; }

/* The plan block, in the app's secondary background. Replaces the SDK's own block. */
#summary { background: #F5F5F5; padding: 20px 16px; }
#summary .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
#summary #plan-title, #summary #plan-price { font-size: 17px; font-weight: 600; }
#summary p { margin: 4px 0 0; font-size: 15px; color: rgba(59, 59, 59, 0.8); }
#summary .total { margin-top: 14px; padding-top: 14px; border-top: 1px solid #E0E0E0; font-size: 15px; }
#summary .total strong { font-weight: 600; }
#checkout .rcb-ui-navbar { display: none !important; }
p { margin: 8px 0; }


/* Same style as the line under the paywall button in the app: small, light grey, centered. */
.caption { margin: 12px 0 0; text-align: center; font-size: 14px; color: #9E9E9E; }

/* The app's red capsule button: 56 tall, body font. */
.button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 53px;
  margin: 16px 0;
  border-radius: 27px;
  background: #F40618;
  color: #FFFFFF;
  font-size: 17px;
  text-decoration: none;
}

#success, #error { text-align: center; padding-top: 24px; }

/* The SDK sizes its form to 100% of the host and scrolls inside it. Its wrapper also uses
   container-type: size, which makes its height independent of its content. Undo both so the
   form grows with its content and the page scrolls as one. */
#checkout .rcb-ui-container.inside { height: auto !important; }
#checkout #layout-query-container { height: auto !important; overflow: visible !important; container-type: inline-size !important; }

/* The dashboard logo above the plan name. Hidden on purpose, the address bar carries the brand. */
#checkout .rcb-app-icon,
#checkout .rcb-header:not(.rcb-pricing-table-row) { display: none !important; }

/* The SDK text under the pay button, the terms sentence and "Secure checkout by RevenueCat". Hidden, our own lines follow. */
#checkout .footer-caption-container,
#checkout .rc-checkout-secure-container { display: none !important; }

/* The SDK pads its form on all sides, about 22px on a phone. Match the app's 16px side margins and drop the bottom padding so our caption sits close under the pay button. */
#checkout .layout-content.rcb-main-block { padding: 16px 16px 0 !important; }

/* The SDK pay button, shaped like the app's capsule button: 56 tall, body font, no bold. */
#checkout button.intent-primary { height: 53px !important; border-radius: 27px !important; font-size: 17px !important; font-weight: 400 !important; }

/* The SDK sandbox banner. Hidden on purpose; the page picks sandbox from rc_env, and testers know when they test. */
#checkout div:has(> .rcb-sandbox-banner-spacer) { display: none !important; }
