/*
 * v475 — white, matte checkout layer.
 * Reversible: remove this stylesheet link to restore the previous checkout styling.
 * Payment providers, secure fields, validation and submission behavior are untouched.
 */

html [data-screen="checkout"] {
  padding-bottom: max(96px, calc(62px + env(safe-area-inset-bottom)));
}

html [data-screen="checkout"] .billing-state,
html [data-screen="checkout"] .billing-tabs,
html [data-screen="checkout"] .billing-panel:not(.billing-product-summary):not(.billing-plan-hero) {
  border: 1px solid rgba(73, 45, 85, .10);
  background: #fff;
  box-shadow: 0 10px 24px rgba(44, 15, 61, .08);
}

html [data-screen="checkout"] .billing-state {
  color: #33243b;
}

html [data-screen="checkout"] .billing-state p {
  color: #766b7b;
}

html [data-screen="checkout"] .billing-tabs {
  gap: 6px;
  padding: 5px;
  border-radius: 16px;
  background: #f3f0f5;
  box-shadow: 0 8px 20px rgba(44, 15, 61, .06);
}

html [data-screen="checkout"] .billing-tabs button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #716776;
  background: transparent;
  box-shadow: none;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, transform .14s ease;
}

html [data-screen="checkout"] .billing-tabs button.active {
  border-color: #7a25ad;
  color: #64198e;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(122, 37, 173, .09);
}

html [data-screen="checkout"] .billing-tabs button:active:not(:disabled) {
  transform: scale(.987);
}

html [data-screen="checkout"] :is(#billingCardPanel, #billingPixPanel, #billingCheckoutVehiclePanel) {
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(44, 15, 61, .08);
}

html [data-screen="checkout"] :is(#billingCardPanel, #billingPixPanel) > .billing-panel-head {
  margin-bottom: 15px;
  padding-bottom: 14px;
  border-bottom: 1px solid #ece6ef;
}

html [data-screen="checkout"] .billing-kicker {
  margin-bottom: 5px;
  color: #7e339e;
  font-size: 10px;
  letter-spacing: .11em;
}

html [data-screen="checkout"] .billing-panel-head h2,
html [data-screen="checkout"] .billing-panel-head h3 {
  color: #35263d;
}

html [data-screen="checkout"] .billing-panel-head p {
  color: #766c7b;
}

html [data-screen="checkout"] .billing-form {
  gap: 13px;
}

html [data-screen="checkout"] .billing-screen .billing-field {
  gap: 7px;
  color: #4c414f;
  font-size: 12.5px;
  font-weight: 850;
}

html [data-screen="checkout"] .billing-field input,
html [data-screen="checkout"] .billing-field select,
html [data-screen="checkout"] .billing-secure-field {
  border: 1px solid #e1dbe4;
  border-radius: 13px;
  color: #302637;
  background: #faf9fb;
  box-shadow: none;
}

html [data-screen="checkout"] .billing-field input::placeholder {
  color: #a39aa7;
}

html [data-screen="checkout"] .billing-field input:focus,
html [data-screen="checkout"] .billing-field select:focus,
html [data-screen="checkout"] .billing-secure-field:focus-within {
  border-color: #7a25ad;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(122, 37, 173, .10);
}

html [data-screen="checkout"] .billing-choice {
  border-color: #e2dce5;
  background: #faf9fb;
  box-shadow: none;
}

html [data-screen="checkout"] .billing-choice:has(input:checked) {
  border-color: #7a25ad;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(122, 37, 173, .09);
}

html [data-screen="checkout"] .billing-check {
  padding: 12px;
  border-color: #e5dfe8;
  border-radius: 13px;
  color: #5e5264;
  background: #f7f5f8;
}

html [data-screen="checkout"] .billing-security-note {
  gap: 10px;
  padding: 12px;
  border: 1px solid #e7e1e9;
  border-radius: 13px;
  color: #6f6574;
  background: #faf9fb;
}

html [data-screen="checkout"] .billing-security-note i {
  color: #fff;
  background: #7623a7;
  box-shadow: none;
}

html [data-screen="checkout"] .billing-submit {
  border: 0;
  color: #fff;
  background: #681c9b;
  box-shadow: none;
  transition: background-color .14s ease, transform .14s ease;
}

html [data-screen="checkout"] .billing-submit:active:not(:disabled) {
  background: #571580;
  transform: scale(.992);
}

html [data-screen="checkout"] .billing-submit:disabled {
  color: #8f8494;
  background: #e4dfe7;
  opacity: 1;
}

html [data-screen="checkout"] .billing-secondary-button {
  border-color: #d9cce0;
  color: #6b2295;
  background: #fff;
  box-shadow: none;
}

html [data-screen="checkout"] .billing-pix-wrap > p {
  color: #726777;
}

html [data-screen="checkout"] .billing-pix-qr,
html [data-screen="checkout"] .billing-pix-code {
  border-color: #e2dbe5;
  background: #faf9fb;
  box-shadow: none;
}

html [data-screen="checkout"] .billing-result-icon,
html [data-screen="checkout"] .billing-checkout-result.error .billing-result-icon,
html [data-screen="checkout"] .billing-checkout-result.pending .billing-result-icon {
  box-shadow: none;
}

html [data-screen="checkout"] .billing-result-icon {
  background: #2a9860;
}

html [data-screen="checkout"] .billing-checkout-result.error .billing-result-icon {
  background: #bd4255;
}

html [data-screen="checkout"] .billing-checkout-result.pending .billing-result-icon {
  background: #c98a22;
}

/*
 * A populated Pix result can be taller than one phone viewport (especially
 * subscription checkout with vehicle selection). Keep it in normal document
 * flow so the QR code, copy button and status can scroll above the fixed nav.
 */
html [data-screen="checkout"]:has(#billingPixResult:not([hidden])) {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
  padding-bottom: max(104px, calc(70px + env(safe-area-inset-bottom)));
}

@media (max-width: 370px) {
  html [data-screen="checkout"] :is(#billingCardPanel, #billingPixPanel, #billingCheckoutVehiclePanel) {
    padding: 15px;
  }

  html [data-screen="checkout"] .billing-field-row {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html [data-screen="checkout"] :is(.billing-tabs button, .billing-submit) {
    transition: none;
  }
}
