/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  color: #1f2937;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  background: transparent;
}

/* Layout */
.main-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}
.checkout-container {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

/* Header */
.checkout-header {
  text-align: center;
  margin-bottom: 24px;
}
.checkout-title {
  font-size: 24px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 4px;
}
.checkout-subtitle {
  font-size: 14px;
  color: #6b7280;
}

/* Single-column layout */
.checkout-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Form card */
.checkout-form-section {
  background: #ffffff;
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 28px;
  border: 1px solid #e5e7eb;
}

.form-section {
  margin-bottom: 24px;
}
.form-section:last-of-type {
  margin-bottom: 16px;
}

/* Section Divider (PAYMENT) */
.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  margin-top: 8px;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d1d5db;
}
.section-divider-text {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Inputs & Fields */
.customer-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  width: 100%;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background-color: #fff;
  color: #111827;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
  color: #9ca3af;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* intl-tel-input integration — match the other field styles */
.iti {
  width: 100%;
}
.iti__tel-input {
  width: 100%;
}

.required {
  color: #ef4444;
}

/* Product Selection Table */
.product-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.product-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 0 0 8px 0;
  border-bottom: 1px solid #e5e7eb;
}
.product-table td {
  padding: 10px 0;
  font-size: 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f3f4f6;
}
.product-item-name {
  color: #111827;
  font-weight: 500;
}
.product-price {
  color: #111827;
  font-weight: 600;
}

/* Radio-button pricing */
.pricing-radio-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0;
}
.pricing-radio {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #2563eb;
  cursor: pointer;
}
.pricing-label-text {
  display: flex;
  flex-direction: column;
}
.pricing-sublabel {
  font-size: 12px;
  color: #6b7280;
  font-weight: 400;
}

/* Qty select (shared) */
.order-qty-select {
  padding: 4px 20px 4px 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background-color: #fff;
  cursor: pointer;
}

/* Inline Order Summary */
.order-summary-inline {
  margin: 20px 0;
}
.order-summary-divider {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  border-top: 1px solid #d1d5db;
  border-bottom: 1px solid #d1d5db;
  padding: 8px 0;
  margin-bottom: 12px;
}
.order-summary-table {
  width: 100%;
  border-collapse: collapse;
}
.order-summary-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding-bottom: 6px;
}
.order-summary-table td {
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
}
.total-row th,
.total-row td {
  border-top: 2px solid #e5e7eb;
  border-bottom: none;
  padding-top: 12px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

/* Payment Element */
.payment-element {
  margin-bottom: 20px;
}

/* Submit Button */
.submit-button {
  background: #1d4ed8;
  color: #fff;
  border-radius: 6px;
  border: none;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
}
.submit-button:hover {
  background: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Secure Footer */
.secure-footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
}

/* Error Messages */
.payment-message {
  color: #b91c1c;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
  background-color: #fef2f2;
  border: 1px solid #fee2e2;
  padding: 10px;
  border-radius: 6px;
}
.hidden {
  display: none !important;
}

/* Text alignment */
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}

/* Status Page */
#payment-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 20px;
  text-align: center;
}
#status-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#status-text {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 24px;
}
#details-table {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
}
#view-details {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}
#view-details:hover {
  text-decoration: underline;
}

/* Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 3px solid #fff;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =====================================================================
   Order Bumps / Upsells
   ===================================================================== */
.order-bumps-container {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.order-bump {
  border: 2px dashed #f59e0b;
  border-radius: 8px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  overflow: hidden;
  transition: all 0.2s ease;
}
.order-bump:hover {
  border-color: #d97706;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

/* Nested child bumps */
.order-bump-child {
  margin: 0 16px 12px 16px;
}
.order-bump-children {
  padding: 0 0 4px 0;
}

.order-bump-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  margin: 0;
}
.order-bump-arrow {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 0;
  color: #dc2626;
  animation: bump-arrow-blink 1s ease-in-out infinite;
  transform-origin: center;
}
@keyframes bump-arrow-blink {
  0%,
  100% {
    opacity: 1;
    transform: translateX(0);
  }
  50% {
    opacity: 0.25;
    transform: translateX(-3px);
  }
}
.order-bump-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin-top: 2px;
  accent-color: #f59e0b;
  cursor: pointer;
}
.order-bump-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.order-bump-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}
.order-bump-title {
  font-size: 15px;
  font-weight: 700;
  color: #16a34a;
}
.order-bump-price {
  font-size: 15px;
  color: #111827;
  white-space: nowrap;
}
.order-bump-highlight {
  font-weight: 700;
  color: #dc2626;
}
.order-bump-description {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.5;
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  .main-wrapper {
    padding: 16px 12px;
  }
  .checkout-form-section {
    padding: 20px 16px;
    border-radius: 8px;
  }
  .submit-button {
    font-size: 15px;
    padding: 14px 16px;
  }
}
