/* Review Order Page Styles */

.checkout-flow {
  min-height: 100vh;
  background: #f9fafb;
}

.checkout-content {
  max-width: 700px;
  margin: 1.5rem auto;
  padding: 0 2rem;
}

.checkout-content--wide {
  max-width: 1200px;
}

.content-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.content-title {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.content-subtitle {
  font-size: 1.125rem;
  color: #6b7280;
}

/* Review Grid Layout */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 450px;
  gap: 2rem;
}

.review-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
}

/* Journal Preview Card */
.journal-preview-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.journal-preview {
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.75rem;
}

.preview-container {
  aspect-ratio: 1.46;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: white;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  display: block;
}

/* Order Details */
.order-details-card,
.shipping-address-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.edit-link {
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.edit-link:hover {
  color: #15803d;
  text-decoration: underline;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.spec-item {
  text-align: center;
}

.spec-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.spec-value {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.5rem 0;
}

/* Shipping Address */
.address-display {
  line-height: 1.8;
  color: #374151;
}

.address-name {
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.address-line {
  font-size: 0.9375rem;
}

/* Pricing Sidebar */
.review-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e5e7eb;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 2rem;
}

.pricing-breakdown {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pricing-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  color: #374151;
}

.pricing-line > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.shipping-estimate {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 400;
}

.free-shipping-note {
  font-size: 0.75rem;
  color: #16a34a;
  font-weight: 600;
  font-style: italic;
}

.free-shipping {
  color: #16a34a;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

.pricing-value {
  font-weight: 600;
}

.pricing-line--discount {
  color: #16a34a;
  font-size: 0.95rem;
}

.discount-value {
  color: #16a34a;
  font-weight: 700;
}

.pricing-line--total {
  font-size: 1.375rem;
  font-weight: 700;
  color: #111827;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.pricing-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 0.5rem 0;
}

.pricing-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem;
  background: #fef3c7;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #92400e;
  margin: 1rem 0;
}


.payment-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.view-details-link {
  display: none; /* Hidden by default, shown on mobile */
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  margin-top: 1rem;
  color: #16a34a;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
}

.view-details-link:hover {
  color: #15803d;
  gap: 0.625rem;
}

.view-details-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.5;
  transition: transform 0.2s ease;
}

.view-details-link:hover svg {
  transform: translateY(2px);
}

.mobile-payment-button {
  display: none; /* Hidden by default, shown on mobile */
}

.btn {
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
}

.btn--primary {
  background: #16a34a;
  color: white;
}

.btn--primary:hover {
  background: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn--secondary {
  background: white;
  color: #374151;
  border: 2px solid #e5e7eb;
}

.btn--secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn--full {
  width: 100%;
  margin-top: 1rem;
}

.review-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Payment Form Styles */
#payment-form {
  margin-top: 1.5rem;
}

#payment-element {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
}

.payment-errors {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

#submit-payment {
  position: relative;
}

#button-loading {
  display: inline-block;
}

#button-loading::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid #ffffff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .review-grid {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
  }
  
  /* Show order summary first on mobile */
  .review-sidebar {
    order: 1;
  }
  
  .review-main {
    order: 2;
  }

  .pricing-card {
    position: static;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  /* Show view details link on mobile */
  .view-details-link {
    display: flex;
  }

  /* Show duplicate payment button on mobile */
  .mobile-payment-button {
    display: block;
    margin: 1.5rem 0;
  }
}
