/*
 * WP Payment Plugin — Checkout Page
 * Styled to match the xMonthly Cloud Tour Builder design system.
 *
 * Design tokens extracted from tour-builder.css and tour-page.php:
 *   bg          #f4f5f8
 *   surface     #ffffff
 *   panel       #E6E7EC
 *   border      #D1D7E0
 *   text        #2F3B52
 *   accent      #0F5FC0
 *   accent-hover #2563EB
 *   muted       #6B7C93
 *   focus       rgba(124,196,255,.45)
 *   font        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif
 */

/* ============================================================
   Base & reset
   ============================================================ */
.wpp-checkout-page,
.wpp-checkout-page * {
    box-sizing: border-box;
}

.wpp-checkout-page {
    background: #f4f5f8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #2F3B52;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* ============================================================
   Hero banner — matches .xmct-tp-hero
   ============================================================ */
.wpp-co-hero {
    background: linear-gradient(140deg, #1e2d45 0%, #0e4fa8 60%, #1a6fd4 100%);
    padding: 48px 32px 44px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Subtle radial glow matching xmct-preview-hero */
.wpp-co-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124,196,255,0.12) 0%, transparent 70%);
    pointer-events: none;
}

.wpp-co-hero-inner {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.wpp-co-hero-title {
    font-size: clamp(24px, 3vw, 38px);
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.2;
    color: #fff;
}

.wpp-co-hero-sub {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

/* ============================================================
   Content area — two-column grid
   Form left (wider), summary right (sticky)
   ============================================================ */
.wpp-co-content {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 32px 64px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    grid-template-areas: "form summary";
    gap: 28px;
    align-items: start;
}

/* ============================================================
   LEFT COLUMN — Form card
   ============================================================ */
.wpp-co-form-col {
    grid-area: form;
    background: #fff;
    border: 1px solid #D1D7E0;
    border-radius: 16px;
    padding: 40px 44px;
    box-shadow: 0 2px 16px rgba(15, 95, 192, 0.07);
    min-width: 0; /* prevent grid blowout */
}

.wpp-co-form-col > .wpp-co-eyebrow {
    margin-bottom: 28px;
}

/* ============================================================
   RIGHT COLUMN — Order summary card (sticky)
   
   position: sticky only works when NO ancestor has overflow
   set to anything other than visible. We cannot control the
   theme, so we use a JS-assisted sticky (see checkout.js).
   The CSS sticky is set here as the primary approach and will
   work when the theme allows it.
   ============================================================ */
.wpp-co-summary {
    grid-area: summary;
    background: #fff;
    border: 1px solid #D1D7E0;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(15, 95, 192, 0.07);
    position: sticky;
    top: 24px;
    align-self: start;
}

/* Force full-width breakout of theme content constraints.
   WordPress FSE applies max-width via .is-layout-constrained > :where(...)
   We must target .wpp-checkout-page directly to override it. */
.entry-content.is-layout-constrained > .wpp-checkout-page,
.wp-block-post-content.is-layout-constrained > .wpp-checkout-page,
.is-layout-constrained > .wpp-checkout-page,
.is-layout-flow > .wpp-checkout-page {
    max-width: none !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
}

/* Also break out the price meta element */
.entry-content.is-layout-constrained > .wpp-co-price-meta,
.is-layout-constrained > .wpp-co-price-meta {
    max-width: none !important;
}

/* Also bust out of any overflow: hidden ancestors that break sticky */
.wpp-checkout-fullpage .site-main,
.wpp-checkout-fullpage main,
.wpp-checkout-fullpage #main,
.wpp-checkout-fullpage #primary,
.wpp-checkout-fullpage .entry-content,
.wpp-checkout-fullpage .wp-block-post-content {
    overflow: visible !important;
}

.wpp-co-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6B7C93;
    margin: 0 0 20px;
}

.wpp-co-product-name {
    font-size: 22px;
    font-weight: 700;
    color: #0F5FC0;
    margin: 0;
    line-height: 1.25;
}

.wpp-co-product-desc {
    font-size: 14px;
    color: #6B7C93;
    margin: 0 0 24px;
    line-height: 1.65;
}

.wpp-co-divider {
    border: none;
    border-top: 1px solid #D1D7E0;
    margin: 0 0 20px;
}

.wpp-co-price-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid #D1D7E0;
    border-bottom: 1px solid #D1D7E0;
    margin-bottom: 24px;
    flex-wrap: nowrap;
}

.wpp-co-price-label {
    font-size: 14px;
    color: #6B7C93;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.wpp-co-price {
    font-size: 26px;
    font-weight: 700;
    color: #0F5FC0;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-align: right;
    min-width: 0;
}

.wpp-co-no-product {
    font-size: 14px;
    color: #6B7C93;
    font-style: italic;
    margin: 0;
}

/* Featured image + product name — inline flex row */
.wpp-co-product-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.wpp-co-product-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #E6E7EC;
    background: #f4f5f8;
    flex-shrink: 0;
}

/* Tax note */
.wpp-co-tax-note {
    font-size: 12px;
    color: #6B7C93;
    margin: 6px 0 24px;
    text-align: right;
}

/* ── One-time payment fee breakdown ─────────────────────────────────────── */

.wpp-co-line-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid #EEF0F4;
    flex-wrap: nowrap;
}

.wpp-co-line-label {
    font-size: 13px;
    color: #6B7C93;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.wpp-co-line-value {
    font-size: 13px;
    font-weight: 600;
    color: #2F3B52;
    white-space: nowrap;
}

.wpp-co-fee-recurring {
    font-style: italic;
    font-weight: 400;
    color: #9BA8B5;
    font-size: 11px;
}

/* Small ? badge with tooltip */
.wpp-co-fee-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #D1D7E0;
    color: #6B7C93;
    font-size: 10px;
    font-weight: 700;
    cursor: default;
    position: relative;
}

.wpp-co-fee-tip::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #2F3B52;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 5px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.wpp-co-fee-tip:hover::after {
    opacity: 1;
}

/* ── Subscription renewal info ───────────────────────────────────────────── */

.wpp-co-renewal-info {
    margin: 14px 0 18px;
    padding: 12px 14px;
    background: #F0F4FF;
    border: 1px solid #D0DEFF;
    border-radius: 10px;
}

.wpp-co-renewal-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.wpp-co-renewal-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: #0F5FC0;
}

.wpp-co-renewal-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.wpp-co-renewal-text {
    font-size: 13px;
    color: #2F3B52;
    line-height: 1.5;
}

.wpp-co-renewal-text strong {
    color: #0F5FC0;
    font-weight: 600;
}

.wpp-co-renewal-note {
    font-size: 12px;
    color: #6B7C93;
    margin: 8px 0 0;
    padding-left: 24px;
}

/* Subscription price comparison — shown above the billing toggle */
.wpp-co-sub-pricing {
    margin: 4px 0 10px;
}

.wpp-co-sub-pricing-row {
    display: flex;
    gap: 10px;
}

.wpp-co-sub-price-opt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #F4F5F8;
    border-radius: 10px;
    padding: 10px 8px 8px;
    transition: background 0.15s;
}

.wpp-co-sub-price-opt--active {
    background: #EBF2FF;
}

.wpp-co-sub-price-amount {
    font-size: 16px;
    font-weight: 700;
    color: #2F3B52;
    line-height: 1.2;
}

.wpp-co-sub-discount {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: #1a7f37;
    border-radius: 999px;
    padding: 2px 7px;
    letter-spacing: 0.02em;
}

/* Billing cycle toggle (subscriptions) */
.wpp-co-billing-toggle {
    display: inline-flex;
    background: #E6E7EC;
    border-radius: 999px;
    padding: 3px;
    margin: 8px 0 4px;
    width: 100%;
}

.wpp-co-cycle-opt {
    flex: 1;
    padding: 6px 0;
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #6B7C93;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    text-align: center;
}

.wpp-co-cycle-opt:hover { color: #2F3B52; }

.wpp-co-cycle-opt--active {
    background: #fff;
    color: #0F5FC0;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Trust list — icon + text layout */
.wpp-co-trust-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wpp-co-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #6B7C93;
}

.wpp-co-trust-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #0F5FC0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpp-co-trust-icon svg {
    width: 18px;
    height: 18px;
}

/* Stripe badge area */
.wpp-co-stripe-badge {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #E6E7EC;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6B7C93;
}

.wpp-co-stripe-badge svg {
    opacity: 0.45;
}

/* ============================================================
   GF Orbital theme — CSS variable overrides at root level
   Orbital drives nearly all styling via --gf-* custom properties.
   Setting them on the wrapper propagates into all child elements
   including the Stripe iframe font bridge.
   ============================================================ */
.wpp-checkout-page .gform_wrapper,
.wpp-checkout-page [data-form-theme],
.wpp-checkout-page .gform-theme {
    --gf-font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    --gf-ctrl-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    --gf-color-primary: #0F5FC0 !important;
    --gf-color-primary-rgb: 15, 95, 192 !important;
    --gf-color-primary-contrast: #fff !important;
    --gf-ctrl-label-color-primary: #2F3B52 !important;
    --gf-ctrl-label-color-secondary: #2F3B52 !important;
    --gf-ctrl-color: #2F3B52 !important;
    --gf-ctrl-bg-color: #fff !important;
    --gf-ctrl-border-color: #D1D7E0 !important;
    --gf-ctrl-border-width: 1.5px !important;
    --gf-ctrl-border-color-focus: #0F5FC0 !important;
    --gf-ctrl-outline-color-focus: rgba(124, 196, 255, 0.45) !important;
    --gf-ctrl-outline-width-focus: 3px !important;
    --gf-ctrl-placeholder-color: #a0aab8 !important;
    --gf-radius: 8px !important;
}

/* ============================================================
   GRAVITY FORMS — xMonthly style overrides
   All inputs, labels, and submit button restyled to match
   the form card on the tour page (.xmct-tp-form-card)
   ============================================================ */

.wpp-checkout-page .gform_wrapper,
.wpp-checkout-page .gform_wrapper * {
    box-sizing: border-box;
}

.wpp-checkout-page .gform_wrapper {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

.wpp-checkout-page .gform_body { padding: 0 !important; }

.wpp-checkout-page .gform_fields {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wpp-checkout-page .gfield {
    margin: 0 !important;
    padding: 0 !important;
}

/* Labels — GF Orbital theme uses CSS vars; override both the var and the property */
.wpp-checkout-page .gform_wrapper .gfield_label,
.wpp-checkout-page .gform_wrapper .gform-field-label,
.wpp-checkout-page .gform_wrapper .gfield_label.gform-field-label,
.wpp-checkout-page .gform-theme .gfield_label,
.wpp-checkout-page .gform-theme--orbital .gfield_label,
.wpp-checkout-page [data-form-theme] .gfield_label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2F3B52 !important;
    --gf-ctrl-label-color-primary: #2F3B52 !important;
    --gf-ctrl-label-color-secondary: #2F3B52 !important;
    margin: 0 0 7px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.wpp-checkout-page .gfield_required,
.wpp-checkout-page .gfield_required_text,
.wpp-checkout-page .gfield_required_asterisk {
    color: #e53e3e !important;
    margin-left: 3px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.wpp-checkout-page .ginput_container { margin: 0 !important; }

/* All inputs */
.wpp-checkout-page .gform_wrapper input[type="text"],
.wpp-checkout-page .gform_wrapper input[type="email"],
.wpp-checkout-page .gform_wrapper input[type="tel"],
.wpp-checkout-page .gform_wrapper input[type="number"],
.wpp-checkout-page .gform_wrapper input[type="url"],
.wpp-checkout-page .gform_wrapper input[type="password"],
.wpp-checkout-page .gform_wrapper textarea,
.wpp-checkout-page .gform_wrapper select {
    width: 100% !important;
    min-height: 46px !important;
    background: #fff !important;
    border: 1.5px solid #D1D7E0 !important;
    border-radius: 8px !important;
    color: #2F3B52 !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    padding: 11px 14px !important;
    outline: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

/* Focus — matches xMonthly focus ring rgba(124,196,255,.45) */
.wpp-checkout-page .gform_wrapper input[type="text"]:focus,
.wpp-checkout-page .gform_wrapper input[type="email"]:focus,
.wpp-checkout-page .gform_wrapper input[type="tel"]:focus,
.wpp-checkout-page .gform_wrapper input[type="number"]:focus,
.wpp-checkout-page .gform_wrapper textarea:focus,
.wpp-checkout-page .gform_wrapper select:focus {
    border-color: #0F5FC0 !important;
    box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.45) !important;
}

.wpp-checkout-page .gform_wrapper input::placeholder,
.wpp-checkout-page .gform_wrapper textarea::placeholder {
    color: #a0aab8 !important;
}

.wpp-checkout-page .gform_wrapper textarea {
    min-height: 110px !important;
    resize: vertical !important;
}

/* Select arrow */
.wpp-checkout-page .ginput_container_select { position: relative; }
.wpp-checkout-page .ginput_container_select::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6B7C93;
    pointer-events: none;
}

/* Standalone select fields: extra right padding clears the custom arrow */
.wpp-checkout-page .ginput_container_select select {
    padding-right: 36px !important;
}

/* ── Address field corrections ──────────────────────────────────────────── */
/*
 * DOM reordering (label before input) is handled by fixAddressFields() in JS.
 * CSS here only styles the already-correct DOM: spacing between sub-fields,
 * and label appearance matching the rest of the form.
 */

/* GF Orbital's .gform-grid-col adds 6px left/right padding to every address
   sub-span. This shifts inputs inward and misaligns them with the rest of the
   form. Zero it out, then restore the gutter between left/right pairs only. */
.wpp-checkout-page .ginput_container_address {
    margin-top: 12px !important;
}

.wpp-checkout-page .ginput_container_address .gform-grid-col {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.wpp-checkout-page .ginput_container_address .ginput_right.gform-grid-col {
    padding-left: 12px !important;
}

/* Sub-field bottom spacing */
.wpp-checkout-page .ginput_container_address .ginput_full,
.wpp-checkout-page .ginput_container_address .ginput_left,
.wpp-checkout-page .ginput_container_address .ginput_right {
    margin-bottom: 16px !important;
}

/* Sub-labels — match main field label style exactly */
.wpp-checkout-page .ginput_container_address label,
.wpp-checkout-page .ginput_container_address .wpp-addr-label {
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #2F3B52 !important;
    margin: 0 0 7px !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* Address <select> elements (State, Country): keep appearance:none so our
   CSS controls all rendering (appearance:auto causes the browser to override
   line-height with a ~13px native value, vertically clipping the text).
   Use an inline SVG chevron as the dropdown arrow instead of native chrome.
   padding-right:36px keeps text clear of the arrow. */
.wpp-checkout-page .ginput_container_address select {
    -webkit-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236B7C93' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 12px 12px !important;
    padding-right: 36px !important;
}

/* Checkbox + radio */
.wpp-checkout-page .gform_wrapper input[type="checkbox"],
.wpp-checkout-page .gform_wrapper input[type="radio"] {
    width: 17px !important;
    height: 17px !important;
    accent-color: #0F5FC0 !important;
    padding: 0 !important;
    margin-right: 8px !important;
    flex-shrink: 0;
    cursor: pointer !important;
}

.wpp-checkout-page .gfield_checkbox li,
.wpp-checkout-page .gfield_radio li {
    display: flex !important;
    align-items: center !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #E6E7EC !important;
}
.wpp-checkout-page .gfield_checkbox li:last-child,
.wpp-checkout-page .gfield_radio li:last-child { border-bottom: none !important; }

.wpp-checkout-page .gfield_checkbox label,
.wpp-checkout-page .gfield_radio label {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #2F3B52 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
}

/* Section separator heading */
.wpp-checkout-page .gsection_title {
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
    color: #6B7C93 !important;
    margin: 8px 0 0 !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #D1D7E0 !important;
    font-family: inherit !important;
}

/* Stripe card element wrapper */
.wpp-checkout-page .gform_wrapper .ginput_container .stripecard-element,
.wpp-checkout-page .gform_wrapper .ginput_container [class*="stripe"],
.wpp-checkout-page .gform_wrapper .ginput_container .gfield_creditcard_security_code {
    background: #fff !important;
    border: 1.5px solid #D1D7E0 !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}
.wpp-checkout-page .gform_wrapper .ginput_container .stripecard-element:focus-within {
    border-color: #0F5FC0 !important;
    box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.45) !important;
}

/* Validation errors */
.wpp-checkout-page .gfield_error input,
.wpp-checkout-page .gfield_error textarea,
.wpp-checkout-page .gfield_error select {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
}

.wpp-checkout-page .validation_message {
    font-size: 12px !important;
    color: #e53e3e !important;
    margin-top: 5px !important;
    display: block !important;
    font-family: inherit !important;
}

.wpp-checkout-page .gform_validation_errors {
    background: #fff5f5 !important;
    border: 1px solid #fed7d7 !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-bottom: 24px !important;
    color: #e53e3e !important;
    font-size: 13px !important;
}

.wpp-checkout-page .gform_validation_errors > h2 {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #e53e3e !important;
    margin: 0 !important;
    font-family: inherit !important;
}

/* Submit button — GF Orbital uses CSS vars for everything; override them all */
.wpp-checkout-page .gform_footer,
.wpp-checkout-page .gform_page_footer {
    margin: 28px 0 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

.wpp-checkout-page .gform_wrapper .gform_button,
.wpp-checkout-page .gform_wrapper input[type="submit"],
.wpp-checkout-page .gform_wrapper button[type="submit"],
.wpp-checkout-page .gform_wrapper .gform_submit_button,
.wpp-checkout-page .gform_footer input.button,
.wpp-checkout-page .gform-theme .gform_button,
.wpp-checkout-page .gform-theme--orbital .gform_button,
.wpp-checkout-page [data-form-theme] .gform_button {
    width: 100% !important;
    background: #0F5FC0 !important;
    background-color: #0F5FC0 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 14px 26px !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    display: block !important;
    box-shadow: none !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    /* GF Orbital CSS variable overrides */
    --gf-color-primary: #0F5FC0 !important;
    --gf-ctrl-btn-bg-color: #0F5FC0 !important;
    --gf-ctrl-btn-color: #fff !important;
    --gf-ctrl-btn-border-color: #0F5FC0 !important;
}

.wpp-checkout-page .gform_wrapper .gform_button:hover,
.wpp-checkout-page .gform_wrapper input[type="submit"]:hover,
.wpp-checkout-page .gform_wrapper button[type="submit"]:hover,
.wpp-checkout-page [data-form-theme] .gform_button:hover {
    background: #2563EB !important;
    background-color: #2563EB !important;
    color: #fff !important;
}

.wpp-checkout-page .gform_wrapper .gform_button:focus-visible,
.wpp-checkout-page .gform_wrapper input[type="submit"]:focus-visible {
    box-shadow: 0 0 0 3px rgba(124, 196, 255, 0.45) !important;
    outline: none !important;
}

/* Confirmation message — default state (before JS transforms the layout) */
.wpp-checkout-page .gform_confirmation_wrapper {
    padding: 32px 0 !important;
    text-align: center !important;
}

.wpp-checkout-page .gform_confirmation_message {
    font-size: 17px !important;
    color: #2F3B52 !important;
    line-height: 1.7 !important;
    font-family: inherit !important;
}

/* ============================================================
   Payment success state
   Applied by JS via .wpp-checkout-page--success after
   gform_confirmation_loaded fires.
   ============================================================ */

/* Collapse the two-column grid to a single centered column */
.wpp-checkout-page--success .wpp-co-content {
    grid-template-columns: 1fr !important;
    grid-template-areas: "confirm" !important;
    max-width: 640px !important;
}

/* Hide the order summary panel — no longer needed */
.wpp-checkout-page--success .wpp-co-summary {
    display: none !important;
}

/* Expand the form column to fill the space */
.wpp-checkout-page--success .wpp-co-form-col {
    grid-area: confirm !important;
    padding: 56px 48px !important;
    text-align: center !important;
}

/* Update hero subtitle */
.wpp-checkout-page--success .wpp-co-hero-sub {
    opacity: 0.9;
}

/* Success icon */
.wpp-co-success-icon {
    width: 64px;
    height: 64px;
    background: #edfaef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: wpp-co-fade-in 0.3s ease both;
}

.wpp-co-success-icon svg {
    width: 32px;
    height: 32px;
    color: #1a7f37;
}

/* Success heading */
.wpp-co-success-heading {
    font-size: 22px;
    font-weight: 700;
    color: #2F3B52;
    margin: 0 0 8px;
}

/* Product name recap */
.wpp-co-success-product {
    font-size: 15px;
    color: #0F5FC0;
    font-weight: 600;
    margin: 0 0 4px;
}

/* Amount recap */
.wpp-co-success-amount {
    font-size: 15px;
    color: #6B7C93;
    margin: 0 0 4px;
}

/* Next payment date — subscription only */
.wpp-co-success-next-payment {
    font-size: 14px;
    color: #6B7C93;
    margin: 8px 0 4px;
}

/* Email receipt note */
.wpp-co-success-email-note {
    font-size: 13px;
    color: #6B7C93;
    margin: 8px 0 24px;
    line-height: 1.6;
}

/* Divider */
.wpp-co-success-divider {
    border: none;
    border-top: 1px solid #D1D7E0;
    margin: 0 0 24px;
}

/* The GF confirmation message sits below our success header */
.wpp-checkout-page--success .gform_confirmation_wrapper {
    padding: 0 !important;
    text-align: center !important;
}

.wpp-checkout-page--success .gform_confirmation_message {
    font-size: 15px !important;
    color: #6B7C93 !important;
}

/* Hide hidden/service fields — the summary panel takes over display */
.wpp-checkout-page .gfield--type-hidden,
.wpp-checkout-page .gfield_visibility_hidden,
.wpp-checkout-page .wpp-field-name-preselected.gfield,
.wpp-checkout-page .gfield--product-hiddenproduct {
    display: none !important;
}

.wpp-checkout-page .wpp-product-readonly-card {
    display: none !important;
}

/* ============================================================
   Animations — matches xmctFadeIn
   ============================================================ */
@keyframes wpp-co-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wpp-co-summary { animation: wpp-co-fade-in 0.22s ease both; }
.wpp-co-form-col { animation: wpp-co-fade-in 0.22s ease 0.06s both; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
    .wpp-co-content {
        grid-template-columns: 1fr;
        grid-template-areas:
            "form"
            "summary";
        padding: 28px 20px 48px;
    }
    .wpp-co-summary {
        position: static; /* Can't be sticky in single-column */
    }
    .wpp-co-form-col {
        padding: 28px 24px;
    }
}

@media (max-width: 600px) {
    .wpp-co-hero { padding: 36px 20px 32px; }
    .wpp-co-content { padding: 24px 16px 48px; gap: 20px; }
    .wpp-co-summary { padding: 24px 20px; }
    .wpp-co-form-col { padding: 24px 20px; }
}

/* ============================================================
   Full-page mode — strip theme chrome
   ============================================================ */
.wpp-checkout-fullpage .site-header,
.wpp-checkout-fullpage .site-footer,
.wpp-checkout-fullpage .entry-header,
.wpp-checkout-fullpage #masthead,
.wpp-checkout-fullpage #colophon,
.wpp-checkout-fullpage .entry-title {
    display: none !important;
}

.wpp-checkout-fullpage .site-main,
.wpp-checkout-fullpage .entry-content,
.wpp-checkout-fullpage article,
.wpp-checkout-fullpage .wp-block-post-content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* ============================================================
   Admin error notice (admins only)
   ============================================================ */
.wpp-checkout-error {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #e53e3e;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
}
