/* Stripe Checkout Clone - Pure CSS */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fafafa;
  min-height: 100vh;
  color: #333;
}

.checkout-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  min-height: 100vh;
}

/* Left Side - Order Summary */
.order-summary {
  width: 50%;
  background-color: #ffffff;
  padding: 3rem;
  display: flex;
  justify-content: center;
}

.order-content {
  width: 100%;
  max-width: 400px;
}

.header {
  margin-bottom: 2rem;
}

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

.brand-icon {
  width: 2rem;
  height: 2rem;
  background-color: #333;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
}

.brand-name {
  color: #333;
  font-weight: 500;
}

.test-mode {
  background-color: #fbba17;
  color: #333;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 500;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.total-amount {
  font-size: 2.25rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 2rem;
}

/* Order Items */
.order-items {
  margin-bottom: 2rem;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.item-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-icon.blue {
  background-color: #dbeafe;
}

.item-icon.purple {
  background-color: #e9d5ff;
}

.item-icon-inner {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.25rem;
}

.item-icon.blue .item-icon-inner {
  background-color: #93c5fd;
}

.item-icon.purple .item-icon-inner {
  background-color: #c4b5fd;
}

.item-details {
  flex: 1;
}

.item-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 0.25rem;
}

.item-quantity {
  font-size: 0.875rem;
  color: #6b7280;
}

.item-price {
  font-weight: 500;
  color: #333;
}

.item-price-detail {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

/* Order Summary */
.order-totals {
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.total-row.subtotal {
  color: #333;
}

.total-row.shipping {
  color: #6b7280;
}

.shipping-details {
  font-size: 0.75rem;
  color: #6b7280;
}

.total-row.final {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
  padding-top: 0.75rem;
  border-top: 1px solid #e5e7eb;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.powered-by {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.powered-by .stripe {
  font-weight: 500;
}

/* Right Side - Payment Form */
.payment-form {
  width: 50%;
  background-color: #ffffff;
  padding: 3rem;
}

.form-content {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Apple Pay Button */
.apple-pay-btn {
  width: 100%;
  background-color: #000;
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.apple-pay-btn:hover {
  opacity: 0.9;
}

.payment-note {
  font-size: 0.9rem;
  color: #666;   /* grey text */
  margin-bottom: 10px;
  text-align: left; /* optional */
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: #999;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ccc;
}

.divider:not(:empty)::before {
  margin-right: .75em;
}
.divider:not(:empty)::after {
  margin-left: .75em;
}

.divider-text {
  background-color: white;
  padding: 0 10px;
  color: #6b7280;
  position: relative;
  font-size: 0.875rem;
  top: 10px;     
}

/* Form Sections */
.form-section {
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 1rem;
}

/* Form Inputs */
.form-group {
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: white;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

/* Card Input Special Styling */
.card-input-group {
  position: relative;
}

.card-number-input {
  border-radius: 0.5rem 0.5rem 0 0;
  border-bottom: none;
}

.card-icons {
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  display: flex;
  gap: 0.25rem;
}

.card-icon {
  width: 1.5rem;
  height: 1rem;
  border-radius: 0.125rem;
  font-size: 0.625rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.card-icon.visa { background-color: #1e40af; }
.card-icon.mastercard { background-color: #ea580c; }
.card-icon.amex { background-color: #3b82f6; }
.card-icon.jcb { background-color: #16a34a; }

.card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.card-expiry {
  border-radius: 0 0 0 0.5rem;
  border-right: none;
}

.card-cvc {
  border-radius: 0 0 0.5rem 0;
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  background-color: white;
}

.checkbox-label {
  font-size: 0.875rem;
  color: #333;
  cursor: pointer;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  background-color: #333;
  color: white;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.9;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .checkout-container {
    flex-direction: column;
  }
  
  .order-summary {
    width: 100%
  }
  
  .payment-form {
    width: 100%;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .payment-form {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .card-details {
    grid-template-columns: 1fr;
  }
  
  .card-expiry {
    border-radius: 0;
    border-right: 1px solid #d1d5db;
    border-bottom: none;
  }
  
  .card-cvc {
    border-radius: 0 0 0.5rem 0.5rem;
  }
}