/* Modern Success Page Styles */

/* Typography */
:root {
  --primary-color: #2563eb;
  --secondary-color: #3b82f6;
  --success-color: #10b981;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --background: #ffffff;
  --background-alt: #f8fafc;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
.success-page {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-alt);
  min-height: 100vh;
}

.success-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Success Header */
.success-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 5rem 0 2rem;
}

.success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.success-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Order Cards Grid */
.order-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.order-card {
  background: var(--background);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.order-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.order-card-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.order-card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.shipping-address {
  background: var(--background-alt);
  padding: 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.address-unavailable, .address-pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
}

.address-unavailable i, .address-pending i {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #ffc107;
}

.address-pending i {
  color: #17a2b8;
}

.address-unavailable small, .address-pending small {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* Order Summary */
.order-summary-section {
  margin-bottom: 3rem;
}

.summary-card {
  background: var(--background);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.summary-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--success-color), #059669);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.summary-header h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Order Summary Product Styles */
.order-product {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.order-product:last-child {
  border-bottom: none;
}

.product-image-small {
  width: 60px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.5rem;
  background: var(--background);
  flex-shrink: 0;
}

.product-details {
  flex: 1;
  min-width: 0;
}

.product-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.product-meta {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.product-price {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.order-totals {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--border);
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.total-line-bold {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
}

.discount-amount {
  color: var(--success-color);
  font-weight: 500;
}

.promo-code {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* What Happens Next */
.what-next-section {
  margin-bottom: 3rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin: 0;
}

.next-steps-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: var(--background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.timeline-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.step-number {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.step-icon {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.step-content h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin: 0;
}

/* Action Section */
.action-section {
  margin-bottom: 3rem;
}

/* Thank You Message */
.thank-you-message {
  background: var(--background);
  border-radius: 16px;
  padding: 3rem 2rem;
  margin: 3rem 0;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.message-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.message-content p {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.signature {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.signature p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.signature p:last-child {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.125rem;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 3rem 0 2rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  cursor: pointer;
  min-width: 180px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: var(--background);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--background);
  border-radius: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: var(--text-primary);
}

.action-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.action-card h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.action-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Confetti Canvas */
.confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1000;
}

/* Responsive Design */
@media (max-width: 768px) {
  .success-container {
    padding: 1rem;
  }
  
  .order-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .next-steps-timeline {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .support-card {
    flex-direction: column;
    text-align: center;
  }
  
  .support-contacts {
    justify-content: center;
  }
  
  /* Thank You Message - Mobile */
  .thank-you-message {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .message-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .message-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
  }
  
  .signature {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  
  /* Action Buttons - Mobile */
  .action-buttons {
    flex-direction: column;
    gap: 0.75rem;
    margin: 2rem 0 1rem;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: auto;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .success-header {
    padding: 1rem 0;
  }
  
  .order-card {
    padding: 1rem;
  }
  
  .summary-card {
    padding: 1.5rem;
  }
  
  .timeline-step {
    padding: 1rem;
  }
  
  .action-card {
    padding: 1.5rem 1rem;
  }
  
  .product-image-small {
    width: 50px;
    height: 65px;
  }
  
  .order-product {
    gap: 0.75rem;
  }
  
  .product-name {
    font-size: 0.85rem;
  }
  
  .product-meta {
    font-size: 0.75rem;
  }
  
  .product-price {
    font-size: 0.85rem;
  }
}

/* Loading States */
.info-value:contains("Loading") {
  color: var(--text-muted);
  font-style: italic;
}

/* Animation for smooth transitions */
.order-card,
.summary-card,
.timeline-step,
.action-card,
.support-card,
.thank-you-message,
.action-buttons {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

.order-card:nth-child(1) { animation-delay: 0.1s; }
.order-card:nth-child(2) { animation-delay: 0.2s; }
.order-card:nth-child(3) { animation-delay: 0.3s; }
.summary-card { animation-delay: 0.4s; }
.timeline-step:nth-child(1) { animation-delay: 0.5s; }
.timeline-step:nth-child(2) { animation-delay: 0.6s; }
.timeline-step:nth-child(3) { animation-delay: 0.7s; }
.timeline-step:nth-child(4) { animation-delay: 0.8s; }
.action-card:nth-child(1) { animation-delay: 0.9s; }
.action-card:nth-child(2) { animation-delay: 1.0s; }
.action-card:nth-child(3) { animation-delay: 1.1s; }
.thank-you-message { animation-delay: 1.2s; }
.action-buttons { animation-delay: 1.3s; }
.support-card { animation-delay: 1.4s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success header animation */
.success-header {
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s ease forwards;
}

@keyframes fadeInDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Thank You Message */
.thank-you-message {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  padding: 3rem;
  margin: 3rem 0;
  text-align: center;
  color: white;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.thank-you-message::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.message-content {
  position: relative;
  z-index: 1;
}

.thank-you-message h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.thank-you-message p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: rgba(255,255,255,0.95);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.signature {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.signature p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.signature strong {
  font-weight: 600;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  min-width: 200px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: var(--shadow);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary i,
.btn-secondary i {
  font-size: 1.125rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .thank-you-message {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .thank-you-message h2 {
    font-size: 1.75rem;
  }
  
  .thank-you-message p {
    font-size: 1rem;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 1rem;
    margin: 2rem 0;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: unset;
  }
}