/* ============================================================
   CHECKOUT DIRETO
   ============================================================ */
.checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(8, 24, 21, 0.76);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.checkout-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.checkout-shell {
  position: relative;
  width: min(69rem, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 1.25rem;
  background: #f5faf8;
  box-shadow: 0 32px 90px rgba(0,0,0,0.35);
  transform: translateY(12px) scale(0.99);
  transition: transform 0.25s ease;
}

.checkout-overlay.is-open .checkout-shell { transform: none; }

.checkout-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  color: #31534c;
  background: #e4f0ec;
  cursor: pointer;
}

.checkout-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.15rem 4rem 1.15rem 1.5rem;
  color: #fff;
  background: linear-gradient(115deg, #075e4d, #0d8069 65%, #13a383);
}

.checkout-brand__mark {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 0.8rem;
  color: #075e4d;
  background: #fff;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: inset 0 -3px 0 rgba(7,94,77,0.12);
}

.checkout-brand__eyebrow {
  margin: 0 0 0.05rem;
  color: #bcebdd;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.checkout-brand h2 { margin: 0; font-size: 1.2rem; line-height: 1.15; }

.checkout-brand__secure {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  color: #d9f7ee;
  font-size: 0.75rem;
  font-weight: 700;
}

.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.75fr); }
.checkout-main { padding: 1.65rem; background: #fff; }
.checkout-summary { padding: 1.65rem; border-left: 1px solid #dcebe6; background: #f5faf8; }

.checkout-section-head { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.checkout-section-head--payment { margin-top: 1.5rem; }
.checkout-section-head > span {
  display: grid;
  place-items: center;
  flex: 0 0 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  color: #fff;
  background: #0d8069;
  font-size: 0.75rem;
  font-weight: 800;
}
.checkout-section-head h3 { margin: 0; color: #18352f; font-size: 1rem; }
.checkout-section-head p { margin: 0.1rem 0 0; color: #70837e; font-size: 0.78rem; }

.checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
.checkout-field { display: grid; gap: 0.35rem; }
.checkout-field--wide { grid-column: 1 / -1; }
.checkout-field > span { color: #31534c; font-size: 0.72rem; font-weight: 800; }
.checkout-field input, .checkout-field select {
  width: 100%;
  height: 2.8rem;
  border: 1px solid #cdded9;
  border-radius: 0.65rem;
  padding: 0 0.8rem;
  color: #17332d;
  background: #fff;
  font: inherit;
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.checkout-field input:focus, .checkout-field select:focus { border-color: #0d8069; box-shadow: 0 0 0 3px rgba(13,128,105,0.12); }
.checkout-field input::placeholder { color: #a0aea9; }
.checkout-field input[aria-invalid="true"] { border-color: #d14343; background: #fffafa; box-shadow: 0 0 0 3px rgba(209,67,67,0.1); }
.checkout-field__hint { margin-top: 0.25rem; color: #7c8a86; font-size: 0.65rem; line-height: 1.35; }
.checkout-field__error { min-height: 0; color: #c1352b; font-size: 0.67rem; font-weight: 600; line-height: 1.35; }
.checkout-field__error:empty { display: none; }

.checkout-payment-tabs { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.checkout-payment-option {
  position: relative;
  display: grid;
  padding: 0.8rem 0.9rem 0.8rem 2.35rem;
  border: 1px solid #cdded9;
  border-radius: 0.75rem;
  cursor: pointer;
  background: #fff;
}
.checkout-payment-option.is-selected { border-color: #0d8069; background: #edf9f5; box-shadow: inset 0 0 0 1px #0d8069; }
.checkout-payment-option input { position: absolute; left: 0.85rem; top: 1rem; accent-color: #0d8069; }
.checkout-payment-option strong { color: #17332d; font-size: 0.87rem; }
.checkout-payment-option small { color: #71847f; font-size: 0.7rem; }

.checkout-feedback { min-height: 1.25rem; margin: 0.8rem 0 0; color: #c1352b; font-size: 0.78rem; }
.checkout-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.15rem;
  border: 0;
  border-radius: 0.75rem;
  color: #fff;
  background: linear-gradient(105deg, #f06a27, #e74f18);
  box-shadow: 0 10px 24px rgba(231,79,24,0.24);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.checkout-submit:disabled { opacity: 0.65; cursor: wait; }
.checkout-submit__loading { align-items: center; justify-content: center; gap: 0.55rem; }
.checkout-submit__loading:not([hidden]) { display: inline-flex; }
.checkout-spinner { width: 1.05rem; height: 1.05rem; border: 2px solid rgba(255,255,255,0.45); border-top-color: #fff; border-radius: 50%; animation: checkoutSpinner 0.75s linear infinite; }
@keyframes checkoutSpinner { to { transform: rotate(360deg); } }
.checkout-privacy { margin: 0.65rem 0 0; color: #82928e; font-size: 0.68rem; text-align: center; }

.checkout-summary__label, .checkout-bumps__title { margin: 0 0 0.75rem; color: #5e746e; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.checkout-product { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; padding-bottom: 1rem; border-bottom: 1px solid #dcebe6; }
.checkout-product__icon { display: grid; place-items: center; width: 2.7rem; height: 2.7rem; border-radius: 0.75rem; color: #fff; background: #0d8069; font-size: 0.68rem; font-weight: 900; }
.checkout-product strong { display: block; color: #18352f; font-size: 0.83rem; }
.checkout-product small { display: block; margin-top: 0.15rem; color: #788a85; font-size: 0.65rem; }
.checkout-product > span { color: #0d8069; font-size: 0.82rem; font-weight: 900; }
.checkout-bumps { margin-top: 1rem; }
.checkout-bump {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.6rem;
  padding: 0.75rem;
  border: 1px dashed #b9d4cc;
  border-radius: 0.75rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.checkout-bump:has(input:checked) { border-style: solid; border-color: #0d8069; background: #edf9f5; }
.checkout-bump input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-bump__media { position: relative; display: block; width: 2.7rem; height: 2.7rem; }
.checkout-bump__image { width: 100%; height: 100%; border-radius: 0.65rem; object-fit: cover; }
.checkout-bump__check { position: absolute; right: -0.2rem; bottom: -0.2rem; display: grid; place-items: center; width: 1.05rem; height: 1.05rem; border: 1px solid #a9c4bc; border-radius: 999px; color: transparent; background: #fff; font-size: 0.62rem; font-weight: 900; }
.checkout-bump input:checked + .checkout-bump__media .checkout-bump__check { border-color: #0d8069; color: #fff; background: #0d8069; }
.checkout-bump__copy strong { display: block; color: #23423b; font-size: 0.75rem; }
.checkout-bump__copy small { display: block; color: #7a8d88; font-size: 0.63rem; }
.checkout-bump__badge { display: inline-flex; margin-bottom: 0.2rem; padding: 0.13rem 0.38rem; border-radius: 999px; color: #fff; background: #6f42c1; font-size: 0.55rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
.checkout-bump__price { color: #0d8069; font-size: 0.7rem; font-weight: 900; white-space: nowrap; }
.checkout-total-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dcebe6; color: #27473f; }
.checkout-total-row span { font-size: 0.8rem; font-weight: 700; }
.checkout-total-row strong { color: #0d8069; font-size: 1.35rem; }
.checkout-trust-list { display: flex; flex-wrap: wrap; gap: 0.35rem 0.75rem; margin: 0.85rem 0 0; padding: 0; list-style: none; color: #6f827d; font-size: 0.64rem; }

.checkout-result { padding: 1.5rem 0.5rem; text-align: center; }
.checkout-result__icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto 0.8rem; border-radius: 999px; color: #fff; background: #0d8069; font-size: 1.35rem; font-weight: 900; }
.checkout-result h3 { margin: 0; color: #18352f; }
.checkout-result > p { margin: 0.35rem auto 0.9rem; max-width: 29rem; color: #6e817c; font-size: 0.82rem; }
.checkout-pix-image { width: min(15rem, 75%); margin: 0.5rem auto 1rem; border: 0.65rem solid #fff; border-radius: 0.8rem; box-shadow: 0 10px 30px rgba(12,65,54,0.12); }
.checkout-pix-copy { display: grid; gap: 0.5rem; max-width: 28rem; margin: 0 auto; }
.checkout-pix-copy textarea { width: 100%; height: 4.7rem; resize: none; border: 1px solid #cdded9; border-radius: 0.65rem; padding: 0.65rem; color: #45615a; background: #f7fbfa; font-size: 0.65rem; }
.checkout-pix-copy button { min-height: 2.5rem; border: 1px solid #0d8069; border-radius: 0.65rem; color: #0d8069; background: #fff; font-weight: 800; cursor: pointer; }
.checkout-status { color: #0d8069 !important; font-weight: 700; }
.checkout-success-details { max-width: 31rem; margin: 1.25rem auto 0; text-align: left; }
.checkout-success-details dl { display: grid; gap: 0.65rem; margin: 0; }
.checkout-success-details dl > div { display: grid; gap: 0.12rem; padding: 0.7rem 0.8rem; border-radius: 0.65rem; background: #f4f8f7; }
.checkout-success-details dt { color: #74857f; font-size: 0.63rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.checkout-success-details dd { margin: 0; color: #213c35; font-size: 0.78rem; font-weight: 700; overflow-wrap: anywhere; }
.checkout-success-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; margin-top: 0.85rem; }
.checkout-action { display: flex; min-height: 2.75rem; align-items: center; justify-content: center; border-radius: 0.65rem; font-size: 0.76rem; font-weight: 800; text-align: center; text-decoration: none; }
.checkout-action--primary { color: #fff; background: #1677e8; }
.checkout-action--secondary { border: 1px solid #0d8069; color: #0d8069; background: #fff; }
.checkout-action:focus-visible { outline: 3px solid rgba(22,119,232,0.22); outline-offset: 2px; }

@media (max-width: 760px) {
  .checkout-overlay { padding: 0; place-items: end center; }
  .checkout-shell { max-height: 96dvh; border-radius: 1.2rem 1.2rem 0 0; }
  .checkout-brand { padding: 1rem 3.5rem 1rem 1rem; }
  .checkout-brand__secure { display: none; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-main, .checkout-summary { padding: 1.1rem; }
  .checkout-summary { grid-row: 1; border-left: 0; border-bottom: 1px solid #dcebe6; }
  .checkout-trust-list { display: none; }
}

@media (max-width: 460px) {
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-field--wide { grid-column: auto; }
  .checkout-payment-tabs { grid-template-columns: 1fr; }
  .checkout-bump { grid-template-columns: auto minmax(0,1fr); }
  .checkout-bump__price { grid-column: 2; }
}

/* Layout inspirado no checkout de referência: página clara, cards e resumo lateral. */
.checkout-overlay {
  display: block;
  padding: 2rem 1rem;
  overflow-y: auto;
  background: #f6f6f6;
  backdrop-filter: none;
}

.checkout-timer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.9rem auto 1rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #f3d4d8;
  border-radius: 999px;
  color: #a62b3b;
  background: #fff5f6;
}
.checkout-timer[hidden] { display: none; }
.checkout-timer strong { font-size: 0.9rem; line-height: 1; letter-spacing: 0.03em; }
.checkout-timer span { font-size: 0.72rem; font-weight: 800; }

.checkout-shell {
  width: min(77.5rem, 100%);
  max-height: none;
  margin: 0 auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(8px);
}
.checkout-close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 5;
  color: #454545;
  background: #fff;
  box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.12);
}
.checkout-close:hover { color: #111; background: #f2f2f2; }
.checkout-brand {
  display: none;
}
.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(19rem, 0.92fr);
  align-items: start;
  gap: 1.9rem;
}
.checkout-main {
  padding: 0;
  background: transparent;
}
.checkout-panel,
.checkout-summary {
  border: 0;
  border-radius: 0.8rem;
  background: #fff;
  box-shadow: 0 8px 24px rgba(30, 38, 36, 0.11);
}
.checkout-panel { padding: 1.85rem; }
.checkout-panel--payment { margin-top: 1.9rem; }
.checkout-summary {
  position: sticky;
  top: 6rem;
  padding: 1.85rem;
}
.checkout-section-head { margin-bottom: 1.6rem; }
.checkout-section-head--payment { margin-top: 0; }
.checkout-section-head > span { display: none; }
.checkout-section-head h3,
.checkout-summary__title {
  margin: 0;
  color: #272727;
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: -0.015em;
}
.checkout-section-head p { margin-top: 0.25rem; color: #8c8c8c; }
.checkout-summary__title { margin-bottom: 1.15rem; }
.checkout-summary__label { display: none; }
.checkout-fields { gap: 0.75rem 1rem; }
.checkout-field > span {
  position: absolute;
  z-index: 1;
  margin: 0.62rem 0 0 0.8rem;
  color: #727272;
  font-size: 0.68rem;
  font-weight: 500;
  pointer-events: none;
}
.checkout-field { position: relative; gap: 0; }
.checkout-field input,
.checkout-field select {
  height: 4.2rem;
  padding: 1.55rem 0.8rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 0.45rem;
  color: #282828;
  background: #f8f8f8;
  font-size: 0.86rem;
}
.checkout-field input:focus,
.checkout-field select:focus {
  border-color: #8bd8b8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(54, 181, 130, 0.12);
}
.checkout-payment-tabs { grid-template-columns: 1fr; gap: 0.75rem; }
.checkout-payment-option {
  min-height: 4.15rem;
  place-content: center;
  padding: 0.75rem 1rem;
  border-color: transparent;
  border-radius: 0.45rem;
  text-align: center;
  background: #f7f7f7;
}
.checkout-payment-option input { position: absolute; opacity: 0; pointer-events: none; }
.checkout-payment-option.is-selected {
  border-color: #71cda7;
  background: #f2fbf7;
  box-shadow: inset 0 0 0 1px #71cda7;
}
.checkout-payment-option strong { color: #313131; font-size: 0.78rem; }
.checkout-payment-option small { margin-top: 0.08rem; }
.checkout-feedback { margin: 0.75rem 0 0; }
.checkout-submit {
  min-height: 3.25rem;
  margin-top: 0.15rem;
  border-radius: 0.55rem;
  color: #fff;
  background: #69cfa5;
  box-shadow: 0 7px 18px rgba(43, 170, 118, 0.2);
}
.checkout-submit:hover { background: #4fc493; }

#checkout-submit {
  min-height: 3.65rem;
  background: linear-gradient(90deg, #10b86f 0%, #22d88a 48%, #10b86f 100%);
  background-size: 180% 100%;
  box-shadow: 0 10px 24px rgba(16, 184, 111, 0.38);
  font-size: 1rem;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 1px rgba(0,0,0,0.16);
  animation: checkoutCtaPulse 2.5s ease-in-out infinite;
  will-change: transform, box-shadow, background-position;
}

#checkout-submit:hover {
  background: linear-gradient(90deg, #0da864 0%, #1fd382 48%, #0da864 100%);
  background-size: 180% 100%;
}

#checkout-submit:disabled {
  animation: none;
  box-shadow: none;
}

@keyframes checkoutCtaPulse {
  0%, 100% {
    transform: scale(1);
    background-position: 0% 50%;
    box-shadow: 0 10px 24px rgba(16, 184, 111, 0.38), 0 0 0 0 rgba(34, 216, 138, 0.42);
  }
  50% {
    transform: scale(1.035);
    background-position: 100% 50%;
    box-shadow: 0 14px 32px rgba(16, 184, 111, 0.5), 0 0 0 10px rgba(34, 216, 138, 0);
  }
}
.checkout-privacy { color: #8c8c8c; }
.checkout-product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.85rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid #ececec;
}
.checkout-product__visual {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 7.5rem;
  border-radius: 0.55rem;
  background: linear-gradient(135deg, #f8fbff 0%, #f4f1ff 100%);
  overflow: hidden;
}
.checkout-product__logo {
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  color: #303134;
  font-family: "Google Sans", "Segoe UI", sans-serif;
  font-size: clamp(1.8rem, 5vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}
.checkout-product__logo-mark { width: 1.2em; height: 1.2em; flex: 0 0 auto; }
.checkout-product__info strong { color: #2d2d2d; font-size: 0.88rem; }
.checkout-product__info small { color: #888; }
.checkout-product__subtotal { display: grid; align-content: start; justify-items: end; gap: 0.1rem; }
.checkout-product__subtotal span { color: #888; font-size: 0.68rem; }
.checkout-product__subtotal strong { color: #333; font-size: 0.82rem; }
.checkout-bumps__title { margin-top: 1rem; color: #666; }
.checkout-bump { border-color: #dcdcdc; border-style: solid; border-radius: 0.5rem; background: #fafafa; }
.checkout-bump:has(input:checked) { border-color: #69cfa5; background: #f0faf6; }
.checkout-total-row { border-top-color: #e7e7e7; color: #333; }
.checkout-total-row strong { color: #292929; }
.checkout-trust-list { justify-content: space-between; color: #767676; }

@media (max-width: 760px) {
  .checkout-overlay { padding: 1rem; }
  .checkout-close { top: 1rem; right: 0.75rem; width: 2rem; height: 2rem; }
  .checkout-shell { max-height: none; border-radius: 0; }
  .checkout-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .checkout-main { order: 2; }
  .checkout-summary { position: static; order: 1; grid-row: auto; border-bottom: 0; }
  .checkout-panel, .checkout-summary { padding: 1.55rem; }
  .checkout-product__visual { min-height: 6.75rem; }
}

@media (max-width: 540px) {
  .checkout-overlay { padding-inline: 0.9rem; }
  .checkout-fields { grid-template-columns: 1fr; }
  .checkout-payment-tabs { grid-template-columns: 1fr; }
  .checkout-section-head h3, .checkout-summary__title { font-size: 1.13rem; }
  .checkout-success-actions { grid-template-columns: 1fr; }
}

/* ============================================================
   ACCESSIBILITY: Respeita preferência do usuário
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
