/* Modal de checkout PIX (site publico) */
.gsck {
  position: fixed;
  inset: 0;
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.gsck.is-open { display: flex; }

.gsck__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 35, .55);
  backdrop-filter: blur(2px);
}

.gsck__dialog {
  position: relative;
  z-index: 1;
  background: #fff;
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 36px);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(5, 20, 40, .35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #17212e;
}

.gsck__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.gsck__close:hover { background: #e2e8f0; }

.gsck__head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid #e9eef5;
  background: linear-gradient(180deg, #f7fbfe, #fff);
}
.gsck__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e6f7ef;
  color: #0f7a4d;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.gsck__badge::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: #16a34a;
}
.gsck__head h2 { margin: 10px 0 2px; font-size: 21px; letter-spacing: -.3px; }
.gsck__head p { margin: 0; color: #64748b; font-size: 13px; }

.gsck__body {
  padding: 18px 26px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gsck__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f7fafc;
  border: 1px solid #e7eef6;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.gsck__summary .info { flex: 1 1 200px; min-width: 0; }
.gsck__summary .info strong { display: block; font-size: 14px; line-height: 1.3; }
.gsck__summary .info span { font-size: 12.5px; color: #64748b; }
.gsck__summary .qty {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #64748b;
}
.gsck__summary .qty input {
  width: 62px; padding: 6px 8px; border: 1px solid #d3dde9; border-radius: 8px;
  font: inherit; text-align: center;
}
.gsck__summary .total { margin-left: auto; text-align: right; }
.gsck__summary .total span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #64748b; }
.gsck__summary .total strong { font-size: 20px; letter-spacing: -.5px; }

.gsck fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 6px;
}
.gsck legend {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #0b6f9e;
  margin-bottom: 10px;
  padding: 0;
}
.gsck__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.gsck__grid .full { grid-column: 1 / -1; }
.gsck__grid .third { grid-column: span 1; }
.gsck label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 5px;
}
.gsck input,
.gsck select {
  width: 100%;
  border: 1px solid #d3dde9;
  border-radius: 9px;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: #17212e;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.gsck input:focus,
.gsck select:focus {
  border-color: #0b8fcd;
  box-shadow: 0 0 0 3px rgba(11, 143, 205, .15);
}
.gsck input.is-invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.gsck input[readonly] { background: #f6f8fb; color: #475569; }
.gsck small.hint { display: block; margin-top: 4px; font-size: 11.5px; color: #7b8a9e; }

.gsck__error {
  background: #fdeaea;
  border: 1px solid #f5c2c0;
  color: #9b231d;
  border-radius: 10px;
  padding: 11px 13px;
  font-size: 13px;
  margin-bottom: 14px;
}
.gsck__submit {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #0b8fcd, #0a6fa1);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 15px 18px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(10, 111, 161, .28);
  transition: filter .15s, transform .1s;
}
.gsck__submit:hover { filter: brightness(1.06); }
.gsck__submit:active { transform: translateY(1px); }
.gsck__submit[disabled] { opacity: .65; cursor: wait; }
.gsck__legal {
  margin: 12px 0 0;
  font-size: 11.5px;
  color: #7b8a9e;
  text-align: center;
  line-height: 1.5;
}

/* resultado / PIX */
.gsck__status {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff8e6;
  border: 1px solid #f4e2ae;
  color: #8a6109;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 16px;
}
.gsck__status.is-paid { background: #e7f8ee; border-color: #b7e6c9; color: #0f7a4d; }
.gsck__status.is-error { background: #fdeaea; border-color: #f5c2c0; color: #9b231d; }
.gsck__status .dot {
  width: 9px; height: 9px; border-radius: 50%; background: currentColor;
  animation: gsck-pulse 1.4s infinite;
}
@keyframes gsck-pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

.gsck__pix {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.gsck__qr {
  background: #fff;
  border: 1px solid #e3ebf3;
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  min-height: 200px;
  display: grid;
  place-items: center;
}
.gsck__qr svg, .gsck__qr img { display: block; width: 100%; height: auto; max-width: 200px; }
.gsck__qr .loading { font-size: 12px; color: #7b8a9e; }

.gsck__pixinfo h3 { margin: 0 0 6px; font-size: 15px; }
.gsck__pixinfo p { margin: 0 0 12px; font-size: 13px; color: #56677d; line-height: 1.55; }
.gsck__pixinfo ol { margin: 0 0 12px; padding-left: 18px; font-size: 12.5px; color: #56677d; line-height: 1.7; }

.gsck__copy {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.gsck__copy input {
  flex: 1 1 auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  background: #f6f9fc;
  color: #334155;
}
.gsck__copy button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 9px;
  background: #16a34a;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
}
.gsck__copy button:hover { filter: brightness(1.07); }

.gsck__order {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 10px;
}
.gsck__order strong { color: #17212e; }

.gsck__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.gsck__actions a, .gsck__actions button {
  border: 1px solid #d3dde9;
  background: #fff;
  color: #334155;
  border-radius: 9px;
  padding: 10px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.gsck__actions a:hover, .gsck__actions button:hover { background: #f6f9fc; }
.gsck__actions .primary { background: #0b8fcd; border-color: #0b8fcd; color: #fff; }
.gsck__actions .primary:hover { background: #0a7fb6; }

.gsck__success { text-align: center; padding: 18px 6px 6px; }
.gsck__success .tick {
  width: 74px; height: 74px; border-radius: 50%;
  background: #e7f8ee; color: #16a34a;
  display: grid; place-items: center; margin: 0 auto 14px;
  font-size: 36px; line-height: 1;
}
.gsck__success h3 { margin: 0 0 6px; font-size: 20px; }
.gsck__success p { margin: 0 0 18px; color: #56677d; font-size: 14px; }

/* chip de pedido pendente */
.gsck-chip {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 99990;
  display: none;
  align-items: center;
  gap: 9px;
  background: #0e1a2b;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(5, 20, 40, .3);
}
.gsck-chip.is-visible { display: inline-flex; }
.gsck-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; animation: gsck-pulse 1.4s infinite; }

body.gsck-lock { overflow: hidden; }

@media (max-width: 720px) {
  .gsck { padding: 0; align-items: flex-end; }
  .gsck__dialog {
    max-width: 100%;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }
  .gsck__head { padding: 20px 18px 14px; }
  .gsck__body { padding: 16px 18px 22px; }
  .gsck__grid { grid-template-columns: 1fr; }
  .gsck__grid .full, .gsck__grid .third { grid-column: 1 / -1; }
  .gsck__pix { grid-template-columns: 1fr; }
  .gsck__qr { max-width: 240px; margin: 0 auto; }
  .gsck__summary .total { margin-left: 0; width: 100%; text-align: left; display: flex; align-items: baseline; gap: 8px; }
  .gsck__summary .total strong { font-size: 18px; }
}
