.rey-checkout-body { background: #f7f9fb; color: #1c2938; }
.rey-checkout-brand { display: grid; place-items: center; padding: 1.6rem 1rem; background: #fff; }
.rey-checkout-brand img { display: block; width: min(197px, 65vw); height: auto; }
.rey-checkout { --blue: #065eaa; --border: #dce3eb; width: min(1080px, calc(100% - 2rem)); margin: 1.8rem auto 4rem; font-size: 1rem; line-height: 1.5; }
.rey-checkout-empty { min-height: 30vh; }
.rey-checkout-progress,.rey-checkout-panel { background: white; border: 1px solid var(--border); border-radius: .75rem; box-shadow: 0 2px 8px #172c4010; }
.rey-checkout-progress { margin-bottom: 1rem; padding: 1rem .5rem; }
.rey-checkout-progress ol { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); list-style: none; margin: 0; padding: 0; }
.rey-checkout-progress li { position: relative; text-align: center; font-size: .875rem; color: #4c6072; }
.rey-checkout-progress li + li::before { content: ""; position: absolute; top: 1rem; right: calc(50% + 1.2rem); width: calc(100% - 2.4rem); height: 2px; background: var(--border); }
.rey-checkout-progress :is(button,li > div) { display: inline-grid; justify-items: center; gap: .4rem; color: inherit; font: inherit; }
.rey-checkout-progress button { border: 0; background: none; padding: 0; cursor: pointer; }
.rey-checkout-progress span { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-weight: 700; background: #edf1f5; }
.rey-checkout-progress [aria-current] { color: var(--blue); font-weight: 700; }
.rey-checkout-progress [aria-current] span { background: var(--blue); color: white; outline: 3px solid #dceefe; }
.rey-checkout-progress .is-complete span { background: #dff4eb; color: #087647; }
.rey-checkout-progress .is-complete + li::before { background: #45a67f; }
.rey-checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); gap: 1rem; align-items: start; }
.rey-checkout-panel { min-width: 0; padding: clamp(1rem, 2vw, 1.5rem); }
.rey-checkout h1 { margin: 0 0 1.1rem; font-size: clamp(1.25rem, 2.6vw, 1.5rem); font-weight: 600; }
.rey-checkout h2,.rey-checkout-group legend { margin: 0 0 .65rem; font-size: 1rem; font-weight: 600; }
.rey-checkout-group { min-width: 0; margin: 0 0 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: .6rem; }
.rey-checkout-group legend { padding: 0 .25rem; }
.rey-checkout-group p { margin: .35rem 0; }
.rey-checkout-group address { margin-top: .5rem; font-style: normal; overflow-wrap: anywhere; color: #455569; }
.rey-checkout-address,.rey-checkout-review-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .7rem; }
.rey-checkout-address label { display: grid; gap: .3rem; font-weight: 500; font-size: .875rem; }
.rey-checkout-address input,.rey-checkout-address select {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: .45rem .65rem; font: inherit; font-size: 1rem; font-weight: 400;
  border-radius: .4rem; border: 1px solid #8797a7; background: white; color: inherit;
}
.rey-checkout-address .is-wide { grid-column: 1 / -1; }
.rey-checkout-option { display: flex; align-items: center; gap: .65rem; min-height: 44px; padding: .65rem; margin-top: .55rem; border: 1px solid var(--border); border-radius: .5rem; cursor: pointer; }
.rey-checkout-option:has(:checked) { border-color: var(--blue); background: #edf6ff; }
.rey-checkout-option span { flex: 1; }
.rey-checkout :is(.rey-checkout-option,.rey-checkout-review) small { display: block; color: #47596c; }
.rey-checkout-totals { margin: 0; }
.rey-checkout-totals div,.rey-checkout-review li { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; padding: .55rem 0; }
.rey-checkout-totals dd { margin: 0; font-weight: 700; text-align: right; }
.rey-checkout-totals div:last-child { margin-top: .35rem; border-top: 1px solid var(--border); color: var(--blue); font-weight: 700; }
.rey-checkout-review { list-style: none; padding: 0; margin: 0; }
.rey-checkout-review li + li { border-top: 1px solid var(--border); }
.rey-checkout-review strong { flex-shrink: 0; }
.rey-checkout-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .65rem; padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--border); }
.rey-checkout-primary,.rey-checkout-secondary { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: .55rem .9rem; border-radius: .45rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.rey-checkout-primary { background: var(--blue); color: #fff; border: 1px solid var(--blue); }
.rey-checkout-secondary { background: #f3f6f9; color: #20384c; border: 1px solid var(--border); }
.rey-checkout :disabled { cursor: default; opacity: .55; }
.rey-checkout-note { color: #47596c; margin-bottom: 0; }
@media (max-width: 760px) { .rey-checkout-layout { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 440px) {
  .rey-checkout-address,.rey-checkout-review-grid { grid-template-columns: minmax(0,1fr); }
  .rey-checkout-progress li { font-size: .75rem; }
  .rey-checkout-actions > * { flex: 1 1 100%; }
}
.rey-checkout-cep { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.rey-checkout-cep label { flex: 0 1 10rem; }
.rey-checkout-cep p { flex-basis: 100%; }
.rey-checkout-cep p:empty { display: none; }
.rey-payment { display: grid; grid-template-columns: minmax(160px, .8fr) minmax(0, 1.2fr); gap: 1rem; padding: .9rem; border: 1px solid var(--border); border-radius: .6rem; background: #f5f7f9; }
.rey-payment-methods,.rey-payment-brands { min-width: 0; margin: 0; padding: 0; border: 0; }
.rey-payment-methods legend,.rey-payment-brands legend { font-size: .875rem; font-weight: 600; margin-bottom: .45rem; }
.rey-payment-methods label { display: flex; align-items: center; gap: .45rem; cursor: pointer; min-height: 44px; margin: 0 0 .55rem; padding: .5rem .55rem; border: 1px solid var(--border); border-radius: .55rem; background: #fff; font-size: .9rem; }
.rey-payment-methods label:has(:checked) { background: #edf3fa; border-color: #17355b; color: #17355b; }
.rey-payment-methods label span { margin-left: auto; }
.rey-payment-content { min-width: 0; background: #fff; border-radius: .5rem; padding: .85rem; }
.rey-payment-card { display: grid; gap: .75rem; min-width: 0; margin: 0 0 1rem; padding: 0; border: 0; }
.rey-payment-card label { display: grid; gap: .3rem; font-size: .875rem; }
.rey-payment-card :is(input:not([type=radio]),select) { box-sizing: border-box; width: 100%; min-height: 44px; padding: .45rem .65rem; border: 1px solid #8797a7; border-radius: .35rem; background: #fff; color: inherit; font: inherit; font-size: 1rem; }
.rey-payment-brands { display: flex; flex-wrap: wrap; gap: .5rem .85rem; }
.rey-payment-brands label { display: inline-flex; gap: .25rem; align-items: center; }
.rey-payment-expiry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: .75rem; }
.rey-card-brands, .rey-card-validity { min-width: 0; margin: 0; padding: 0; border: 0; }
.rey-payment-card legend { padding: 0; margin-bottom: .35rem; font-size: .875rem; }
.rey-payment-card > legend { font-size: 1rem; font-weight: 600; }
.rey-card-brands > div { display: flex; flex-wrap: wrap; gap: .5rem; }
.rey-card-brands label {
  box-sizing: border-box;
  justify-items: center;
  align-content: start;
  flex: 1 1 4rem;
  min-height: 44px;
  padding: .35rem .2rem;
  border: 1px solid var(--border);
  border-radius: .4rem;
  text-align: center;
  font-size: .8125rem;
}
.rey-card-brands label:has(:checked) { border-color: #17355b; background: #edf3fa; }
.rey-card-brands label:has(:focus-visible) { outline: 2px solid #17355b; outline-offset: 2px; }
.rey-card-brands label:has(:enabled) { cursor: pointer; }
.rey-card-brands label input { margin: .15rem; accent-color: #17355b; }
.rey-card-brands img { display: block; width: 36px; height: 22px; object-fit: contain; }
.rey-card-validity > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.rey-payment-card :disabled { opacity: .8; background-color: #f4f6f8; }

.rey-payment-test,.rey-payment-info p { margin: 0; }
.rey-payment-test,.rey-payment-info small { color: #47596c; }
.rey-payment-info { display: grid; place-items: center; align-content: center; gap: .55rem; min-height: 180px; text-align: center; }
.rey-payment-info h2 { margin: 0; }
.rey-payment-pix { font-size: 3.5rem; line-height: 1; color: #13867f; }
.rey-payment-barcode { width: 4.3rem; height: 2.5rem; border: 2px solid #273744; border-radius: .3rem; background: repeating-linear-gradient(90deg,#273744 0 3px,#fff 3px 6px,#273744 6px 8px,#fff 8px 12px) center / 82% 70% no-repeat; }
@media (max-width: 530px) { .rey-payment { grid-template-columns: minmax(0,1fr); gap: .5rem; } }

.rey-checkout-address .is-short { width: min(100%, 8rem); }
.rey-checkout-address label:has(select) { width: min(100%, 9rem); }
.rey-checkout :is(.rey-checkout-option, .rey-payment-methods label) strong { font-weight: 600; }
.rey-checkout :is(input, select, button, a):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 650px) {
  .rey-payment-expiry { grid-template-columns: 1fr; }
}

.rey-payment-qr { display: block; width: min(100%, 15rem); height: auto; }

.rey-checkout-saved-address {
  padding: 16px;
  border: 1px solid #c3d5e8;
  border-radius: 8px;
  background: #f3f8fd;
}
.rey-checkout-saved-address > span,
.rey-checkout-address-choices li > div > span {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 8px;
  border-radius: 12px;
  background: #deedfc;
  color: #16497d;
  font-size: .875rem;
}
.rey-checkout-saved-address address {
  margin-top: 6px;
  font-style: normal;
  overflow-wrap: anywhere;
}
.rey-checkout-address-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.rey-checkout-address-choices { display: grid; gap: 8px; list-style: none; margin: 0; padding: 0; }
.rey-checkout-address-choices li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.rey-checkout-address-choices li > div { min-width: 0; overflow-wrap: anywhere; }
.rey-checkout-address-choices button { flex-shrink: 0; max-width: 100%; }
.rey-checkout-use-address { background: #fff; border-color: #7597b5; color: #16497d; }
.rey-checkout-use-address:hover:enabled { background: #e5eff9; border-color: #16497d; }
.rey-checkout-save-address { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.rey-checkout-save-address input[type="checkbox"] { width: auto; min-height: auto; }

.rey-order-confirmation { display: grid; gap: 1rem; }
.rey-order-confirmation > a { justify-self: start; }
.rey-order-success { display: flex; align-items: flex-start; gap: 1rem; border-top: 3px solid var(--blue); }
.rey-order-success h1 { margin-bottom: .3rem; }
.rey-order-success p, .rey-order-delivery p { margin: 0; }
.rey-order-check { display: grid; place-items: center; flex: 0 0 2.6rem; height: 2.6rem; border-radius: 50%; background: #dff4eb; color: #087647; font-size: 1.35rem; font-weight: 700; }
.rey-order-reference { padding-top: .65rem; overflow-wrap: anywhere; color: #4c6072; font-size: .875rem; }
.rey-order-reference strong { display: block; color: #1c2938; }
.rey-order-items li { align-items: center; }
.rey-order-items li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rey-order-items img { flex-shrink: 0; object-fit: contain; border: 1px solid var(--border); border-radius: .35rem; }
.rey-order-delivery { border-top: 1px solid var(--border); margin-top: .8rem; padding-top: .8rem; }

body.rey-checkout-body { margin: 0; font-family: system-ui, sans-serif; }
.checkout-flow { margin-top: 1rem; }
.checkout-flow .rey-checkout-panel h1 { margin-bottom: .75rem; }
.checkout-flow .rey-checkout-group { padding: .75rem; margin-bottom: .75rem; }
.checkout-flow .rey-checkout-group p { margin-block: .35rem; }
.checkout-flow .rey-checkout-progress { padding-block: .65rem; }
.checkout-flow .rey-checkout-progress button { min-height: 44px; }
.checkout-flow :focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.checkout-flow .rey-checkout-address input, .checkout-flow .rey-checkout-address select { font-size: 1rem; min-height: 44px; }
.rey-order-links { justify-content: flex-start; margin: 0; }

@media (min-width: 1000px) {
  .checkout-flow .rey-checkout-summary { position: sticky; top: 1rem; }
  .checkout-flow .rey-checkout-address { grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); }
  .checkout-flow .rey-checkout-address > label.is-wide { grid-column: span 2; }
}

@media (max-width: 760px) {
  .checkout-flow .rey-checkout-layout { display: flex; flex-direction: column; }
  .checkout-flow .rey-checkout-panel { box-sizing: border-box; width: 100%; }
  .checkout-flow .rey-checkout-summary { order: -1; }
  .checkout-flow .rey-checkout-summary h2 { margin-bottom: .2rem; }
  .checkout-flow .rey-checkout-summary .rey-checkout-totals div { padding-block: .15rem; }
}

.rey-payment-methods label { min-height: 60px; }
.rey-payment-methods input { accent-color: #17355b; }
.rey-payment-methods label:has(:focus-visible) { outline: 3px solid #17355b; outline-offset: 2px; }
@media (max-width: 700px) { .rey-payment { grid-template-columns: minmax(0, 1fr); } }

.rey-payer-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}
.rey-payer-summary > div {
  min-width: 0;
}

.rey-payment-confirmed {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 24px);
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid #b8dfce;
  border-radius: 12px;
  background: #edf8f2;
  color: #154633;
}

.rey-payment-confirmed h2 {
  margin: 0 0 4px;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
}

.rey-payment-confirmed p {
  margin: 0;
}

.rey-payment-confirmed-icon {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(44px, 8vw, 60px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #08764e;
  color: white;
}

.rey-payment-confirmed-icon > span {
  width: 40%;
  aspect-ratio: 2;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-15%) rotate(-45deg);
}

@media (prefers-reduced-motion: no-preference) {
  .rey-payment-confirmed.is-celebrating .rey-payment-confirmed-icon {
    animation: rey-payment-confirmed-pop 480ms ease-out both;
  }

  .rey-payment-confirmed.is-celebrating .rey-payment-confirmed-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid #08764e;
    border-radius: inherit;
    animation: rey-payment-confirmed-ring 680ms ease-out both;
  }
}

@keyframes rey-payment-confirmed-pop {
  0% { transform: scale(.72); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes rey-payment-confirmed-ring {
  0% { opacity: .65; transform: scale(.9); }
  100% { opacity: 0; transform: scale(1.42); }
}

.rey-boleto-details {
  margin-block: 12px 16px;
  padding: 12px 16px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.rey-boleto-details summary {
  width: fit-content;
  color: #005cb9;
  cursor: pointer;
  font-weight: 600;
}

.rey-boleto-details details:not([open]) .rey-boleto-close,
.rey-boleto-details details[open] .rey-boleto-open {
  display: none;
}

.rey-boleto-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.rey-boleto-header :is(h3, p) {
  margin: 0;
}

.rey-boleto-header h3 {
  font-size: 1rem;
}

.rey-boleto-details details {
  margin-top: .85rem;
}

.rey-boleto-code {
  padding: .75rem;
  border-radius: .4rem;
  background-color: #f4f6f8;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  user-select: all;
}

.rey-boleto-copy-status:empty {
  margin: 0;
}

.checkout-flow.is-review .rey-checkout-panel h1 { margin-bottom: .35rem; }
.rey-checkout-review-intro { margin: 0 0 1rem; color: #47596c; }
.checkout-flow.is-review .rey-checkout-totals div:last-child {
  padding: .7rem;
  border: 0;
  border-radius: .45rem;
  background: #edf1f5;
  color: inherit;
}
.rey-checkout-finalize { margin-top: 1rem; }
.rey-checkout-finalize .rey-checkout-primary {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
}
.rey-checkout-finalize .rey-checkout-primary,
.rey-checkout-primary.rey-checkout-continue-delivery,
.rey-checkout-primary.rey-payment-submit {
  background: #17643c;
  border-color: #17643c;
}
.rey-checkout-finalize .rey-checkout-primary:hover:enabled,
.rey-checkout-primary.rey-checkout-continue-delivery:hover:enabled,
.rey-checkout-primary.rey-payment-submit:hover:enabled {
  background: #104c2d;
  border-color: #104c2d;
}
.rey-checkout-finalize p { margin: .65rem 0 0; color: #47596c; font-size: .9rem; line-height: 1.45; }

@media (max-width: 760px) {
  .checkout-flow.is-review .rey-checkout-summary { order: 0; }
}

.rey-order-success { border-top: 1px solid var(--border); }
.rey-order-reference { padding-top: 0; }
.rey-order-reference strong { display: inline; }
.rey-order-confirmation .rey-checkout-layout { align-items: start; }
.rey-order-confirmation .rey-checkout-totals div:last-child { background: #eaf3fc; border: 0; border-radius: .45rem; padding: .65rem; }
.rey-order-confirmation .rey-order-links { justify-content: center; border-top: 0; }
.rey-order-links .rey-checkout-primary { background: #17355b; border-color: #17355b; }
.rey-payment-processing { padding: 1rem; border-radius: .55rem; background: #eaf3fc; color: #17355b; }
.rey-payment-processing p { margin: .35rem 0 0; }
.rey-order-main > .rey-checkout-panel:has(> .rey-payment-processing) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.rey-order-main > .rey-checkout-panel:has(> .rey-payment-processing) > :not(.rey-payment-processing) {
  margin-inline: 1rem;
}

.rey-order-main { min-width: 0; display: grid; gap: 1rem; }
.rey-payment-recovery { padding: 1rem; border: 1px solid #e9aab3; border-radius: .65rem; background: #fff3f4; color: #202d3d; }
.rey-payment-recovery h2 { margin: 0 0 .35rem; color: #902638; }
.rey-payment-recovery p { margin: .35rem 0; }
.rey-payment-recovery-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .85rem; }
.rey-payment-recovery-actions .rey-checkout-primary { background: #17643c; border-color: #17643c; }
.rey-payment-recovery-actions .rey-checkout-primary:hover { background: #104c2d; border-color: #104c2d; }
.rey-payment-recovery details { margin-top: .75rem; border-top: 1px solid #e9aab3; padding-top: .65rem; }
.rey-payment-recovery summary { cursor: pointer; }

.rey-pix-panel { container-type: inline-size; }
.rey-pix-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem .9rem;
}
.rey-pix .rey-pix-heading h2 { margin: 0; font-size: clamp(1.3rem, 3.7cqi, 1.65rem); color: #17355b; }
.rey-pix-badge { padding: .3rem .65rem; border-radius: .4rem; color: #7c4100; background: #fff0cc; font-size: .875rem; font-weight: 650; }
.rey-pix .rey-pix-amount { margin: .35rem 0 0; color: #17355b; font-size: 2rem; font-weight: 750; }
.rey-pix .rey-pix-validity { margin: .15rem 0 .9rem; color: #47596c; }
.rey-pix-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
  align-items: start;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.rey-pix-scan { display: grid; justify-items: center; text-align: center; }
.rey-pix-scan img { display: block; max-width: 100%; height: auto; object-fit: contain; padding: .5rem; background: #fff; }
.rey-pix-scan p { max-width: 23ch; }
.rey-pix-copy { display: grid; min-width: 0; gap: .55rem; }
.rey-pix-copy h3, .rey-pix-copy p { margin: 0; }
.rey-pix-copy h3 { color: #17355b; font-size: 1.08rem; }
.rey-pix-preview, .rey-pix-manual { width: 100%; padding: .6rem .7rem; border: 1px solid var(--border); border-radius: .45rem; background: #f4f6f8; color: #17355b; font-family: monospace; }
.rey-pix .rey-pix-copy-button { width: 100%; gap: .55rem; border-color: #216349; background: #216349; }
.rey-pix .rey-pix-copy-button:hover { background: #184d38; border-color: #184d38; }
.rey-pix-footer { display: flex; justify-content: center; margin-top: 1rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.rey-pix-check { min-height: 44px; padding: .45rem .75rem; border: 0; border-radius: .35rem; background: transparent; color: #17355b; font: inherit; font-weight: 650; cursor: pointer; }
.rey-pix-check:hover:enabled { text-decoration: underline; }
.rey-pix-check:disabled { opacity: .7; cursor: wait; }
.rey-pix-panel :focus-visible { outline: 2px solid #17355b; outline-offset: 3px; }
@container (min-width: 31rem) {
  .rey-pix-scan + .rey-pix-copy { padding-inline-start: 1rem; border-inline-start: 1px solid var(--border); }
}
@container (max-width: 30.99rem) {
  .rey-pix-scan + .rey-pix-copy { padding-top: .9rem; border-top: 1px solid var(--border); }
}
