/*
Theme Name: Checkout PIX
Description: Tema que replica exatamente a aplicação de checkout do Replit
Version: 1.0
Author: Checkout App
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* Video checkout theme - minimalista */
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --text: #1F2937;
  --muted: #6B7280;
  --primary: #00C853;
  --primary-strong: #00A040;
  --accent: #3B82F6;
  --cta: #FF3B30;
  --cta-hover: #E6342A;
  --warning: #FFC107;
  --danger: #EF4444;
  --urgency: #FF3B30;
  --order-bump-bg: #111827;
  --order-bump-text: #FFFFFF;
  
  /* Existing shadcn vars for compatibility */
  --background: #F7FAFC;
  --foreground: #0F172A;
  --card-foreground: #0F172A;
  --popover: #FFFFFF;
  --popover-foreground: #0F172A;
  --primary-foreground: #FFFFFF;
  --secondary: #6B7280;
  --secondary-foreground: #FFFFFF;
  --muted-foreground: #6B7280;
  --accent-foreground: #FFFFFF;
  --destructive: #E11D48;
  --destructive-foreground: #FFFFFF;
  --input: #FFFFFF;
  --ring: #1F6FEB;
  --font-sans: Inter, system-ui, sans-serif;
  --font-serif: Georgia, serif;
  --font-mono: Menlo, monospace;
  --radius: 16px;
  
  /* PIX colors */
  --pix: #08B689;
  --pix-dark: #079972;
}

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

body {
  font-family: Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 24px;
  margin-bottom: 20px;
}

.urgency-bar {
  background: #FF3B30;
  color: white;
  padding: 16px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.urgency-timer {
  background: #B71C1C;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  display: inline-block;
  margin-right: 8px;
}

.checkout-container {
  min-height: 100vh;
  background: var(--bg);
}

.max-w-md {
  max-width: 28rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.p-4 {
  padding: 1rem;
}

.payment-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-tab {
  width: 140px;
  padding: 14px 24px;
  border: 2px solid #E5E7EB;
  border-radius: 25px;
  background: #FFFFFF;
  color: #6B7280;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.payment-tab.active {
  background: #00C853;
  color: white;
  border-color: #00C853;
  box-shadow: 0 2px 8px rgba(0,197,83,0.3);
}

.section-number {
  width: 24px;
  height: 24px;
  background: #FFFFFF;
  border: 2px solid #E5E7EB;
  color: #111827;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.total-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label {
  color: #6B7280;
  font-size: 14px;
  font-weight: 400;
}

.total-price {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.5px;
}

.cta-button {
  background: #28A745;
  color: white;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 24px 0;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(40,167,69,0.4);
}

.cta-button:hover {
  background: #218838;
}

.pix-benefit {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.pix-benefit-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  margin-top: 2px;
}

.pix-benefit-content {
  flex: 1;
}

.pix-benefit-title {
  font-weight: 700;
  color: #00C853;
  font-size: 15px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.pix-benefit-desc {
  color: #9CA3AF;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 400;
}

.guarantee-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 14px;
  padding: 16px 0;
  border-bottom: 1px solid #F1F3F4;
}

.guarantee-item:last-child {
  border-bottom: none;
}

.guarantee-icon {
  color: #22C55E;
  margin-top: 2px;
  flex-shrink: 0;
}

.guarantee-content {
  flex: 1;
}

.guarantee-title {
  font-weight: 700;
  color: #1F2937;
  font-size: 15px;
  margin-bottom: 4px;
  line-height: 1.2;
}

.guarantee-subtitle {
  color: #9CA3AF;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.3;
}

.security-message {
  text-align: center;
  color: #22C55E;
  font-weight: 700;
  font-size: 14px;
  margin-top: 16px;
  padding: 12px;
}

.order-bump-price {
  margin-top: 8px;
}

.price-old {
  color: #EF4444;
  text-decoration: line-through;
  font-size: 14px;
  margin-right: 8px;
}

.price-new {
  color: #22C55E;
  font-weight: 700;
  font-size: 16px;
}

.input {
  height: 52px;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 0 16px;
  background: #FFFFFF;
  font-size: 15px;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  font-family: inherit;
}

.input:focus {
  outline: none;
  border-color: #22C55E;
  box-shadow: 0 0 0 3px rgba(34,197,94,.1);
}

.input::placeholder {
  color: #A0A8B0;
  font-weight: 400;
}

.input-full-width {
  width: 100%;
  margin: 0;
}

.btn {
  height: 52px;
  border-radius: 999px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 15px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.order-bump-item {
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  transition: all 0.2s ease;
  border: 3px dashed #9CA3AF;
  transform: translateY(-3px);
}

.order-bump-item:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.order-bump-header {
  background: #F8F9FA;
  color: #111827;
  padding: 14px 18px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  border-radius: 12px;
}

.flex { display: flex; }
.items-center { align-items: center; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 16px; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.text-gray-800 { color: #1F2937; }
.text-gray-500 { color: #6B7280; }
.line-through { text-decoration: line-through; }
.space-y-4 > * + * { margin-top: 1rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 4px; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.rounded-lg { border-radius: 12px; }
.object-cover { object-fit: cover; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex: 1; }

/* QR Code Modal Styles */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 8px;
}

.qr-modal-content {
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
}

.qr-header {
  background: #EF4444;
  color: white;
  padding: 12px;
  border-radius: 24px 24px 0 0;
  text-align: center;
}

.qr-header.expired {
  background: #6B7280;
}

.qr-content {
  padding: 16px;
}

.qr-code-container {
  background: #F9FAFB;
  padding: 16px;
  border-radius: 24px;
  margin-bottom: 12px;
  text-align: center;
}

.qr-code-image {
  width: 144px;
  height: 144px;
  margin: 0 auto 8px;
}

.pix-code-input {
  width: 100%;
  font-size: 9px;
  padding: 8px;
  border: 1px solid #D1D5DB;
  border-radius: 12px;
  background: #F9FAFB;
  color: #6B7280;
  resize: none;
  font-family: monospace;
}

.copy-button {
  width: 100%;
  padding: 10px;
  background: #10B981;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 8px;
}

.copy-button:hover {
  background: #059669;
}

.payment-done-button {
  width: 100%;
  padding: 10px;
  background: #F97316;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.payment-done-button:hover {
  background: #EA580C;
}

.payment-instructions {
  margin-bottom: 16px;
}

.instructions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 12px;
  color: #6B7280;
}

.instruction-step {
  display: flex;
  align-items: center;
  gap: 8px;
}

.step-number {
  background: #DBEAFE;
  color: #2563EB;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Success Modal */
.success-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.success-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #D1FAE5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #22C55E;
}

.product-delivery-info {
  background: #EFF6FF;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: left;
}

.delivery-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.email-icon {
  color: #3B82F6;
  font-size: 18px;
}

.delivery-content h4 {
  font-weight: 600;
  color: #1E40AF;
  font-size: 14px;
  margin-bottom: 4px;
}

.delivery-content p {
  color: #1D4ED8;
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 8px;
}

.delivery-note {
  color: #2563EB;
  font-size: 12px;
  margin-top: 8px;
}

.order-details {
  font-size: 12px;
  color: #22C55E;
  margin-bottom: 16px;
}

.order-details p {
  margin: 0;
  line-height: 1.4;
}

/* Form Styling */
form {
  margin: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
}

.form-error {
  color: #EF4444;
  font-size: 12px;
  margin-top: 4px;
}

/* Utility Classes */
.hidden { display: none; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.text-green-600 { color: #059669; }
.text-red-500 { color: #EF4444; }
.bg-gray-50 { background-color: #F9FAFB; }
.rounded-xl { border-radius: 24px; }

/* Animation Classes */
.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Product Header */
.product-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-image {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

.product-info {
  flex: 1;
}

.product-name {
  font-weight: 700;
  font-size: 18px;
  color: #1F2937;
  margin-bottom: 4px;
}

.product-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.regular-price {
  font-size: 14px;
  color: #6B7280;
  text-decoration: line-through;
}

.sale-price {
  font-size: 20px;
  font-weight: 700;
  color: #22C55E;
}

/* Section Headers */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1F2937;
}

/* Responsive */
@media (max-width: 640px) {
  .container {
    padding: 16px;
  }
  
  .card {
    padding: 20px;
  }
  
  .instructions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .payment-tab {
    width: 120px;
    padding: 12px 16px;
    font-size: 14px;
  }
  
  .product-header {
    flex-direction: column;
    text-align: center;
  }
  
  .product-pricing {
    justify-content: center;
  }
}