/* ============================================
   Checkout / Pagamento / Download · CorretorIA
   Reaproveita variáveis CSS de style.css
   ============================================ */

.topbar-cta-static {
  color: rgba(255,255,255,.85);
  font-size: 14px;
  letter-spacing: .02em;
}

.lead-sm {
  color: var(--text-mute);
  font-size: 16px;
  line-height: 1.6;
  max-width: 540px;
  margin-bottom: 28px;
}

/* ===== CHECKOUT ===== */
.checkout-page,
.pagamento-page,
.download-page {
  background: var(--bg);
  min-height: calc(100vh - 60px);
  padding: 60px 0;
}

.checkout-grid,
.pagamento-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}

.checkout-form-block,
.pagamento-qr-block {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.checkout-form-block h1,
.pagamento-qr-block h1 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--navy);
}

#checkout-form label {
  display: block;
  margin-bottom: 18px;
}
#checkout-form label > span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--navy);
  letter-spacing: .01em;
}
#checkout-form input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  transition: border-color .15s ease, background .15s ease;
}
#checkout-form input:focus {
  outline: none;
  border-color: var(--navy);
  background: white;
}
#checkout-form input:invalid:not(:placeholder-shown) {
  border-color: #cc3a3a;
}

#checkout-submit {
  width: 100%;
  margin-top: 12px;
  padding: 18px 24px;
  font-size: 17px;
}
#checkout-submit[disabled] {
  opacity: .6;
  cursor: wait;
}

.checkout-trust {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.checkout-trust .trust-icon {
  font-size: 15px;
  color: var(--green);
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.checkout-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fdeded;
  border: 1px solid #f3c0c0;
  border-radius: 8px;
  color: #cc3a3a;
  font-size: 14px;
}

/* ===== RESUMO ===== */
.checkout-summary {
  background: white;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 3px solid var(--navy);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 24px;
}
.checkout-summary h2 {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 15px;
}
.summary-list {
  list-style: none;
  margin: 16px 0;
}
.summary-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-mute);
  border-bottom: 1px solid var(--border);
}
.summary-list li:last-child {
  border-bottom: none;
}
.summary-list li .material-symbols-outlined {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(6,167,125,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  color: var(--green);
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 20;
  user-select: none;
}
.checkout-summary hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}
.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  padding-top: 8px;
}
.customer-info {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-mute);
}
.customer-info small {
  display: block;
  font-size: 12px;
  color: var(--text-mute);
  margin-bottom: 4px;
}
.customer-info div {
  color: var(--navy);
  font-weight: 500;
}

/* ===== QR CODE (pagamento) ===== */
.qr-box {
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  min-height: 280px;
}
.qr-box img {
  max-width: 260px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.copy-pix-btn {
  width: 100%;
  padding: 16px 24px;
  margin-bottom: 14px;
  font-size: 15px;
}
.copy-pix-btn.copied {
  background: var(--navy);
}

.pix-code-display {
  width: 100%;
  height: 80px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: none;
  color: var(--text-mute);
  word-break: break-all;
}

.status-row {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.status-pill .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  animation: pulse 1.5s ease-in-out infinite;
}
.status-pill.paid {
  background: #e8f9f3;
  border-color: var(--green);
  color: var(--green-dark);
}
.status-pill.paid .status-dot {
  background: var(--green);
  animation: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ===== DOWNLOAD ===== */
.download-container {
  max-width: 760px;
  margin: 0 auto;
  background: white;
  padding: 48px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.download-container h1 {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--navy);
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 32px 0;
}
.files-empty {
  padding: 24px;
  background: #fdeded;
  border: 1px solid #f3c0c0;
  border-radius: var(--radius);
  color: #cc3a3a;
  text-align: center;
}

.file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--navy);
  transition: all .15s ease;
}
.file-card:hover {
  background: white;
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.file-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-icon .material-symbols-outlined {
  font-size: 22px;
  color: white;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 24;
  user-select: none;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-name {
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-meta {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 2px;
}
.file-arrow {
  font-size: 22px;
  font-weight: 900;
  color: var(--green-dark);
  flex-shrink: 0;
}

.download-footer {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.download-footer h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  color: var(--navy);
}
.download-footer ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
.download-footer ol li {
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-mute);
  line-height: 1.55;
}
.download-footer hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}
.trust-note {
  font-size: 13px;
  color: var(--text-mute);
  line-height: 1.55;
  margin-bottom: 10px;
}
.trust-note a {
  color: var(--green-dark);
  font-weight: 600;
}

/* ===== ERRO ===== */
.error-state {
  text-align: center;
}
.error-state h1 {
  font-size: 28px;
}
.error-icon {
  font-size: 56px;
  margin-bottom: 20px;
}
.error-actions {
  margin: 32px 0;
  text-align: left;
}
.error-actions h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--navy);
}
.error-actions ol {
  padding-left: 22px;
}
.error-actions li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text-mute);
}
.back-home {
  padding: 16px 32px;
  margin-top: 20px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .checkout-grid,
  .pagamento-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .checkout-summary {
    position: static;
    order: -1;
  }
  .checkout-form-block,
  .pagamento-qr-block,
  .download-container {
    padding: 28px 24px;
  }
  .download-container h1,
  .checkout-form-block h1,
  .pagamento-qr-block h1 {
    font-size: 24px;
  }
  .checkout-page,
  .pagamento-page,
  .download-page {
    padding: 30px 0;
  }
}
