/* ============================================================
   SOS ENCHENTES MG — CHECKOUT STYLES
   Mobile-first
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red: #c0392b;
  --red-dark: #922b21;
  --yellow: #f1c40f;
  --yellow-dark: #d4ac0d;
  --green: #27ae60;
  --green-dark: #1e8449;
  --dark: #1a1a1a;
  --dark2: #242424;
  --dark3: #2e2e2e;
  --white: #ffffff;
  --gray: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.12);
  --font: 'Inter', sans-serif;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--dark);
  color: var(--white);
  min-height: 100vh;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── Barra de urgência ────────────────────────────────────── */
.urgency-bar {
  background: var(--red);
  color: var(--white);
  text-align: center;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: var(--white);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

/* ── Layout principal ─────────────────────────────────────── */
.checkout-main {
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

/* ── Cabeçalho ────────────────────────────────────────────── */
.checkout-header {
  background: var(--dark2);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-back {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray);
  white-space: nowrap;
  transition: color 0.2s;
}

.btn-back:hover { color: var(--white); }

.checkout-title {
  flex: 1;
  text-align: center;
}

.checkout-icon {
  font-size: 1.6rem;
  margin-bottom: 2px;
}

.checkout-title h1 {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
}

.checkout-title p {
  font-size: 0.78rem;
  color: var(--gray);
}

/* ── Container central ────────────────────────────────────── */
.checkout-container {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Resumo do valor ──────────────────────────────────────── */
.amount-summary {
  background: linear-gradient(135deg, #1a0a0a, #2d1010);
  border: 2px solid var(--red);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}

.amount-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray);
  margin-bottom: 8px;
}

.amount-value {
  display: block;
  font-size: 3rem;
  font-weight: 900;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 8px;
}

.amount-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--gray);
}

/* ── Formulário ───────────────────────────────────────────── */
.form-box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.form-title {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-align: center;
}

.form-sub {
  font-size: 0.85rem;
  color: var(--gray);
  text-align: center;
  margin-bottom: 24px;
}

.alert-error {
  background: rgba(192,57,43,0.15);
  border: 1px solid var(--red);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.alert-error p {
  font-size: 0.88rem;
  color: #e74c3c;
  margin-bottom: 4px;
}

.alert-error p:last-child { margin-bottom: 0; }

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
}

.form-group input {
  background: var(--dark3);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--white);
  transition: border-color 0.2s;
  outline: none;
  -webkit-appearance: none;
}

.form-group input::placeholder {
  color: rgba(255,255,255,0.3);
}

.form-group input:focus {
  border-color: var(--yellow);
  background: #333;
}

.btn-gerar {
  background: var(--yellow);
  color: var(--dark);
  border: none;
  border-radius: var(--radius);
  padding: 18px 24px;
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  width: 100%;
  margin-top: 4px;
  letter-spacing: 0.3px;
}

.btn-gerar:hover {
  background: var(--yellow-dark);
  transform: translateY(-2px);
}

.btn-gerar:active {
  transform: translateY(0);
}

.btn-gerar:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.form-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.form-trust span {
  font-size: 0.78rem;
  color: var(--gray);
  font-weight: 600;
}

/* ── QR Code PIX ──────────────────────────────────────────── */
.pix-box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pix-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.8);
}

.step-num {
  width: 28px;
  height: 28px;
  background: var(--yellow);
  color: var(--dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-image {
  width: 240px;
  height: 240px;
  border-radius: var(--radius);
  background: var(--white);
  padding: 8px;
  box-shadow: var(--shadow);
}

@media (min-width: 400px) {
  .qr-image { width: 280px; height: 280px; }
}

.qr-amount {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--yellow);
}

.pix-or {
  font-size: 0.8rem;
  color: var(--gray);
  text-align: center;
}

.payload-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payload-textarea {
  width: 100%;
  background: var(--dark3);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.78rem;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.7);
  resize: none;
  height: 80px;
  outline: none;
  line-height: 1.4;
}

.btn-copy {
  width: 100%;
  background: var(--dark3);
  border: 2px solid var(--yellow);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font);
  color: var(--yellow);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn-copy:hover {
  background: rgba(241,196,15,0.1);
  transform: translateY(-2px);
}

.btn-copy.copied {
  background: rgba(39,174,96,0.15);
  border-color: var(--green);
  color: #2ecc71;
}

.pix-info {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pix-info p {
  font-size: 0.82rem;
  color: var(--gray);
}

.btn-confirmar {
  display: block;
  width: 100%;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  font-size: 1rem;
  font-weight: 800;
  transition: background 0.2s, transform 0.15s;
}

.btn-confirmar:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
}

/* ── Outros valores ───────────────────────────────────────── */
.other-amounts {
  text-align: center;
}

.other-amounts > p {
  font-size: 0.85rem;
  color: var(--gray);
  margin-bottom: 14px;
}

.other-amounts-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-other {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255,255,255,0.75);
  transition: all 0.2s;
}

.btn-other:hover {
  background: rgba(241,196,15,0.15);
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ── Footer ───────────────────────────────────────────────── */
.checkout-footer {
  background: #111;
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  text-align: center;
}

.checkout-footer p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.checkout-footer p strong {
  color: rgba(255,255,255,0.6);
}
