.cl-checkout-mount {
  --cl-checkout-bg: #fffaf1;
  --cl-checkout-surface: #fffefb;
  --cl-checkout-line: #ead9bb;
  --cl-checkout-line-strong: #d8bc85;
  --cl-checkout-text: #2f343a;
  --cl-checkout-muted: #6f747b;
  --cl-checkout-gold: #c58b21;
  --cl-checkout-gold-soft: rgba(197, 139, 33, 0.1);
  --cl-checkout-error: #c45133;
  --cl-checkout-success: #277348;
  --cl-checkout-shadow: 0 18px 40px rgba(111, 75, 23, 0.14);
}

.cl-checkout-load-error {
  width: min(500px, calc(100% - 28px));
  margin: 26px auto;
  color: #6f747b;
  text-align: center;
}

.cl-checkout-section {
  padding: 26px 18px 72px;
}

.cl-checkout-card {
  width: min(500px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--cl-checkout-line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--cl-checkout-surface), var(--cl-checkout-bg));
  color: var(--cl-checkout-text);
  box-shadow: var(--cl-checkout-shadow);
}

.cl-checkout-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 24px 30px 22px;
  border-bottom: 1px solid var(--cl-checkout-line);
  background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,248,235,.36));
}

.cl-checkout-lock {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(91,99,111,.08);
  color: #7f8792;
}

.cl-checkout-lock svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-checkout-header h2 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.15;
  font-weight: 800;
}

.cl-checkout-header p {
  margin: 7px 0 0;
  color: var(--cl-checkout-muted);
  font-size: 1rem;
  line-height: 1.4;
}

.cl-checkout-form {
  padding: 26px 30px 30px;
}

.cl-checkout-field {
  margin-bottom: 18px;
}

.cl-checkout-field label {
  display: block;
  margin-bottom: 7px;
  color: #68717d;
  font-size: .95rem;
  font-weight: 500;
}

.cl-checkout-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--cl-checkout-line);
  border-radius: 20px;
  outline: none;
  background: rgba(255,255,255,.92);
  color: #3e2c12;
  font: inherit;
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.cl-checkout-field input::placeholder {
  color: #af9c84;
}

.cl-checkout-field input:focus {
  border-color: var(--cl-checkout-gold);
  box-shadow: 0 0 0 4px rgba(197,139,33,.12);
}

.cl-checkout-field input.is-invalid {
  border-color: var(--cl-checkout-error);
  background: #fff8f6;
  box-shadow: 0 0 0 4px rgba(196,81,51,.1);
}

.cl-checkout-field-error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: var(--cl-checkout-error);
  font-size: .88rem;
  font-weight: 600;
}

.cl-checkout-payment,
.cl-checkout-summary {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--cl-checkout-line);
}

.cl-checkout-payment h3,
.cl-checkout-summary h3 {
  margin: 0 0 15px;
  color: #59616b;
  font-size: 1rem;
  font-weight: 600;
}

.cl-payment-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.cl-payment-option {
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid var(--cl-checkout-line);
  border-radius: 20px;
  background: rgba(255,255,255,.88);
  text-align: center;
}

.cl-payment-option.is-selected {
  border: 2px solid var(--cl-checkout-gold);
  background: var(--cl-checkout-gold-soft);
}

.cl-payment-option.is-unavailable {
  opacity: .62;
}

.cl-payment-option strong {
  color: var(--cl-checkout-text);
  font-size: 1.15rem;
  font-weight: 500;
}

.cl-payment-option > span:last-child {
  color: var(--cl-checkout-muted);
  font-size: .86rem;
}

.cl-payment-symbol,
.cl-payment-symbol svg {
  width: 25px;
  height: 25px;
  display: inline-flex;
  color: #505864;
}

.cl-payment-symbol svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #3e2c12;
  font-size: .98rem;
}

.cl-summary-line span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 400;
}

.cl-summary-line strong {
  flex: 0 0 auto;
}

.cl-summary-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--cl-checkout-line);
}

.cl-summary-line.is-total {
  color: var(--cl-checkout-text);
  font-size: 1.16rem;
  font-weight: 600;
}

.cl-summary-note {
  margin: 10px 0 0;
  color: var(--cl-checkout-muted);
  font-size: .82rem;
  line-height: 1.4;
}

.cl-checkout-message {
  min-height: 22px;
  margin: 20px 0 12px;
  color: var(--cl-checkout-success);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.cl-checkout-message.is-error {
  color: var(--cl-checkout-error);
}

.cl-generate-pix {
  width: 100%;
  min-height: 56px;
  padding: 16px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff4b5 0%, #f1c53c 100%);
  color: #4e3200;
  font: inherit;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: .02em;
  box-shadow: 0 6px 0 #b27710, 0 14px 24px rgba(122,73,0,.2), inset 0 2px 0 rgba(255,255,255,.72);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 180ms ease, filter 160ms ease;
}

.cl-generate-pix:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.cl-generate-pix:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #b27710, 0 9px 16px rgba(122,73,0,.18);
}

.cl-generate-pix:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

.cl-checkout-note {
  margin: 15px auto 0;
  color: #8a8f98;
  font-size: .78rem;
  line-height: 1.45;
  text-align: center;
}

.cl-pix-dialog[hidden], .cl-pix-image[hidden], .cl-pix-fallback[hidden] { display: none; }
.cl-pix-dialog { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(8, 18, 28, .72); }
.cl-pix-card { position: relative; width: min(100%, 440px); max-height: 92vh; overflow: auto; padding: 25px; border-radius: 18px; background: #fff; color: #24303a; text-align: center; box-shadow: 0 24px 70px #0005; }
.cl-pix-card h2 { margin: 0 0 10px; }
.cl-pix-card p { line-height: 1.45; }
.cl-pix-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 30px; cursor: pointer; }
.cl-pix-image { display: block; width: min(100%, 260px); margin: 14px auto; }
.cl-pix-code { box-sizing: border-box; width: 100%; height: 75px; padding: 10px; resize: none; border: 1px solid #b7c2cc; border-radius: 8px; }
.cl-pix-button { display: block; width: 100%; min-height: 42px; margin-top: 10px; border: 0; border-radius: 8px; background: #0a6c45; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.cl-pix-button:disabled { opacity: .55; cursor: wait; }

@media (max-width: 620px) {
  .cl-checkout-section {
    padding: 16px 10px 48px;
  }

  .cl-checkout-card {
    border-radius: 16px;
  }

  .cl-checkout-header {
    padding: 20px 18px 18px;
    gap: 11px;
  }

  .cl-checkout-header h2 {
    font-size: 1.38rem;
  }

  .cl-checkout-header p {
    font-size: .95rem;
  }

  .cl-checkout-form {
    padding: 20px 18px 24px;
  }

  .cl-checkout-field {
    margin-bottom: 16px;
  }

  .cl-checkout-field input {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cl-checkout-field input,
  .cl-generate-pix {
    transition: none;
  }
}
