.checkout-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
  font-size: 2rem;
}

.checkout-container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  min-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  overflow: visible;
}

/* Contact Info Form - Left Side */
.contact-form {
  flex: 1 1 0;
  background: #f8f9fa;
  padding: 2rem 2rem 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e9ecef;
  min-width: 0;
  position: relative;
}

/* Menu Button */
.menu-button-container {
  position: absolute;
  top: 0.125rem;
  left: 1rem;
  z-index: 10;
}

.menu-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-button:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: white;
  text-decoration: none;
}

.menu-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.contact-form h3 {
  margin: 0 0 0.75rem 0;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.contact-form label {
  display: block;
  margin-top: 0.4rem;
  margin-bottom: 0.15rem;
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="time"] {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.15rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form input[type="time"]:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.contact-form .payment-options {
  margin-top: 0.75rem;
}

.contact-form button {
  margin-top: auto;
  padding: 0.75rem;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.contact-form button:hover {
  background: #0056b3;
}

/* Pickup Time Selection */
.pickup-time-section {
  margin-top: 0.4rem;
  position: relative;
  text-align: center;
}

.order-day-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.4rem;
  align-items: center;
  justify-content: center;
}

.order-day-options label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  color: #555;
}

.order-day-options input[type="radio"] {
  margin: 0;
  accent-color: #007bff;
}

/* Calendar styling - simple icon with date field */
#calendar-wrapper {
  display: none;
  margin-bottom: 0.4rem;
  text-align: center;
}

.calendar-container {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.4rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  width: 100%;
  max-width: 320px;
  justify-content: center;
  position: relative;
}

.calendar-icon {
  font-size: 1.2rem;
  cursor: pointer;
}

#date-picker {
  flex: 1;
  padding: 0.4rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  background: transparent;
  min-width: 0;
}

.time-selection {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#time-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  font-size: 0.95rem;
  text-align: center;
}

/* Status indicator positioning */
#datetime-status {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.2rem;
  color: green;
  margin: 0;
}

/* Payment method styling - horizontal like today/future */
.payment-method-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 0.4rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.payment-method-buttons label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  transition: border-color 0.2s, background-color 0.2s;
  margin: 0;
  font-weight: 500;
  color: #555;
}

.payment-method-buttons label:hover {
  border-color: #007bff;
  background: #f8f9ff;
}

.payment-method-buttons label.disabled-payment-option {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: #ddd;
  background: #f5f5f5;
  pointer-events: none;
}

.payment-method-buttons label.disabled-payment-option:hover {
  border-color: #ddd;
  background: #f5f5f5;
}

.payment-method-buttons input[type="radio"] {
  margin: 0;
  accent-color: #007bff;
}

.payment-limit-note {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #d9534f;
  text-align: center;
  display: none;
}

#time-dropdown {
  position: absolute;
  z-index: 2000;
  background: #ffffff;
  border: 1px solid #ccc;
  width: 140px;
  max-height: 180px;
  overflow-y: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.time-selection {
  position: relative;
  z-index: 1990;
}

/* Cart Summary - Right Side */
.cart-summary {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  background: white;
  min-height: 0;
  height: 85vh;
  overflow: hidden;
  overflow-x: hidden;
  padding: 2rem 2rem 1.5rem 2rem;
  min-width: 0;
}

.cart-summary h3 {
  margin: 0;
  padding: 1rem 1rem 0.75rem 1rem;
  color: #333;
  font-size: 1.5rem;
  font-weight: 600;
  border-bottom: 2px solid #e9ecef;
  flex-shrink: 0;
}

.cart-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 1rem 0 1rem;
  min-height: 0;
  width: 100%;
  max-height: calc(85vh - 200px); /* Ensure items are visible */
}

.cart-item {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 0.5rem;
  transition: background-color 0.2s;
  border-radius: 8px;
  padding: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.cart-item:hover {
  background-color: #f8f9fa;
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cart-item-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.cart-item strong {
  font-weight: 600;
  color: #333;
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  display: block;
}

.cart-item form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.cart-item button {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.cart-item button:hover {
  background: #c82333;
}

.cart-item .note-input {
  flex: 1;
  padding: 0.25rem 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.8rem;
  min-width: 0;
}

.cart-item .note-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

.cart-item .remove-button {
  background: #6c757d;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-left: 0.5rem;
}

.cart-item .remove-button:hover {
  background: #5a6268;
}

.cart-item .modifier-display {
  font-size: 0.8rem;
  color: #666;
  margin-top: 0.25rem;
  line-height: 1.2;
}

.cart-item .modifier-display span {
  display: inline-block;
  margin-right: 0.5rem;
}

.cart-item .item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cart-item .item-details span {
  display: block;
}

.cart-item .controls-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  min-width: 80px;
}

.cart-totals {
  padding: 0.25rem 1rem !important;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 2px solid #dee2e6;
  margin-top: auto;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.cart-totals p {
  margin: 0.05rem 0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95rem;
  padding: 0.05rem 0 !important;
}

.cart-totals p:last-child {
  border-top: 2px solid #dee2e6;
  padding-top: 0.15rem !important;
  margin-top: 0.15rem !important;
  font-size: 1.1rem;
  font-weight: 600;
}

.cart-totals strong {
  color: #333;
  font-weight: 600;
}

/* Ensure online fee line aligns properly */
#online-fee-line {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0.05rem 0 !important;
  padding: 0.05rem 0 !important;
  font-size: 0.95rem !important;
  text-align: left !important;
  width: 100% !important;
}

/* Also ensure it inherits from cart-totals p */
.cart-totals #online-fee-line {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin: 0.05rem 0 !important;
  padding: 0.05rem 0 !important;
  font-size: 0.95rem !important;
}

/* HIDE ONLINE FEE WHEN PAY IN STORE IS SELECTED */
.pay-in-store-selected #online-fee-line {
  display: none !important;
}

/* Empty Cart State */
.cart-summary > p {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 2rem;
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .checkout-container {
    flex-direction: column;
    margin: 0;
    width: 100%;
    max-width: none;
    padding: clamp(0.75rem, 4vw, 1.25rem);
    gap: clamp(1rem, 4vw, 1.5rem);
    min-height: auto;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    box-sizing: border-box;
  }
  
  .contact-form,
  .cart-summary {
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }
  
  .contact-form {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
    padding: clamp(1.2rem, 5vw, 1.6rem);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  }
  
  .cart-summary {
    height: auto;
    min-height: 0;
    padding: clamp(1.2rem, 5vw, 1.6rem);
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    overflow: visible;
  }
  
  .cart-summary ul {
    max-height: none;
  }
}

/* Payment Modal Styles */
.payment-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.payment-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal active state - hide header/footer and prevent scrolling */
body.modal-active {
  overflow: hidden;
}

body.modal-active header,
body.modal-active footer {
  display: none !important;
}

/* Ensure modal appears above everything */
.payment-modal {
  z-index: 99999;
}

.payment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 30px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.payment-modal-header h2 {
  margin: 0;
  color: #2c5530;
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.close-modal:hover {
  background: #e0e0e0;
}

.payment-modal-body {
  display: flex;
  gap: 30px;
  padding: 30px;
}

.payment-form-section {
  flex: 1;
  min-width: 0;
}

.order-summary-section {
  flex: 1;
  min-width: 0;
  background: #f8f9fa;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.payment-form-section h3,
.order-summary-section h3 {
  margin: 0 0 20px 0;
  color: #2c5530;
  font-size: 1.2rem;
}

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

.form-row {
  display: flex;
  gap: 15px;
}

.form-row .form-group {
  flex: 1;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.stripe-element {
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  padding: 12px;
  background: white;
  transition: border-color 0.2s;
}

.stripe-element.StripeElement--focus {
  border-color: #2c5530;
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.stripe-element.StripeElement--invalid {
  border-color: #dc3545;
}

#billing-zip {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

#billing-zip:focus {
  outline: none;
  border-color: #2c5530;
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.error-message {
  color: #dc3545;
  font-size: 0.9rem;
  margin-top: 10px;
  padding: 10px;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.summary-item:last-of-type {
  margin-bottom: 0;
}

.total-item {
  border-top: 2px solid #e0e0e0;
  padding-top: 15px;
  margin-top: 15px;
  font-size: 1.1rem;
}

.tip-section-modal {
  margin: 20px 0;
  padding: 15px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.tip-section-modal label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.tip-section-modal input {
  width: 100%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.tip-section-modal input:focus {
  outline: none;
  border-color: #2c5530;
  box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.submit-payment-btn {
  width: 100%;
  padding: 15px;
  background: #2c5530;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.submit-payment-btn:hover {
  background: #1e3a22;
}

.submit-payment-btn:disabled {
  background: #6c757d;
  cursor: not-allowed;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.payment-success {
  text-align: center;
  padding: 30px;
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 6px;
  animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
  0% { transform: scale(0.95); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.success-checkmark {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 15px;
  animation: checkmarkBounce 0.6s ease-out;
}

@keyframes checkmarkBounce {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.payment-error {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 15px;
  margin-top: 15px;
  text-align: center;
}

@media (max-width: 768px) {
  .payment-modal-body {
    flex-direction: column;
  }
  
  .payment-modal-content {
    margin: 10px;
    max-height: 95vh;
  }
  
  .form-row {
    flex-direction: column;
  }
}

/* Payment method selection in modal */
.payment-method-selection {
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.payment-method-selection label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

/* Payment method buttons - side by side like today/future */
.payment-options {
  margin-top: 0.75rem;
}

.payment-method-buttons {
  margin-top: 0.25rem;
}

.payment-method-buttons label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  cursor: pointer;
}

.payment-method-buttons input[type="radio"] {
  margin: 0;
}

#phone::placeholder {
  color: #bbb;
  opacity: 0.7;
}

.rewards-banner{margin-bottom:0.75rem;padding:0.75rem;border:1px solid #d1e7dd;background:#f8fff9;border-radius:8px}
.rewards-banner .progress-wrap{position:relative;height:72px}
.rewards-banner .progress-bar{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:10px;background:#e9ecef;border-radius:6px;overflow:hidden}
.rewards-banner .progress-fill{position:absolute;left:0;top:0;height:100%;background:#28a745;width:0;border-radius:6px;transition:width .3s ease;z-index:1}
.rewards-banner .selected-fill{position:absolute;left:0;top:0;height:100%;background:#d79a00;width:0;border-radius:6px;transition:width .25s ease;z-index:2}
.rewards-banner .milestones{position:absolute;left:0;right:0;top:0;bottom:0}
.rewards-banner .milestone{position:absolute;left:0;top:50%;width:1px;height:1px;transform:translate(-50%, -50%)}
.rewards-banner .milestone .dot{position:absolute;left:0;top:0;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid #adb5bd;transform:translate(-50%, -50%);cursor:pointer}
.rewards-banner .milestone.top .dot{margin-top:-14px}
.rewards-banner .milestone.bottom .dot{margin-top:14px}
.rewards-banner .milestone.active .dot{border-color:#28a745}
.rewards-banner .milestone.locked .dot{border-color:#adb5bd}
.rewards-banner .milestone .label{position:absolute;left:0;top:0;font-size:.7rem;line-height:1;white-space:nowrap;transform:translate(-50%, -100%)}
.rewards-banner .milestone.top .label{margin-top:-22px}
.rewards-banner .milestone.bottom .label{transform:translate(-50%, 0);margin-top:22px}
.rewards-banner .using-text{color:#28a745;text-align:center;font-weight:600;margin-top:0.4rem}

/* Disabled button and radio button styles */
.contact-form button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.5;
}

.contact-form button:disabled:hover {
  background: #6c757d;
}

.payment-method-buttons input[type="radio"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.payment-method-buttons input[type="radio"]:disabled + label {
  cursor: not-allowed;
  opacity: 0.5;
}

.payment-method-buttons input[type="radio"]:disabled + label:hover {
  opacity: 0.5;
}

/* Saved Payment Method Section */
.saved-payment-section {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.saved-payment-section .payment-method-selection {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.saved-payment-section .payment-method-option {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.saved-payment-section .payment-method-option:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.saved-payment-section .payment-method-option input[type="radio"] {
  margin-right: 0.75rem;
}

.payment-method-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #333;
}

.default-badge {
  background-color: #d79a00;
  color: white;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
}

.add-new-card-btn {
  margin-top: 0.75rem;
  padding: 0.5rem 1rem;
  background: #28a745;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
  width: 100%;
}

.add-new-card-btn:hover {
  background: #218838;
}

.error-message-cart {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.error-message-cart strong {
  color: #dc3545;
}

.tip-section {
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}

.tip-section label {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 500;
  color: #555;
  font-size: 0.9rem;
}

.tip-section input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tip-section input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Reward price display styling */
.reward-price-display {
  display: flex;
  align-items: center;
  gap: 5px;
}

.reward-price-display .original-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9em;
}

.reward-price-display .reward-price {
  color: #28a745;
  font-weight: bold;
}

/* Disabled Pay online styling */
input[name="payment_method"][value="Pay online"]:disabled + span {
  opacity: 0.5;
  cursor: not-allowed;
}

input[name="payment_method"][value="Pay online"]:disabled {
  cursor: not-allowed;
}

.device-mobile .payment-modal {
  align-items: flex-start;
  justify-content: center;
  padding: clamp(0.9rem, 3vh, 1.4rem) 0 calc(env(safe-area-inset-bottom, 0) + 1.25rem);
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: manipulation;
}

.device-mobile .payment-modal-content {
  width: min(96vw, 640px);
  max-width: calc(100vw - clamp(1rem, 6vw, 1.8rem));
  margin: 0 auto;
  max-height: none;
  overflow: visible;
  padding: clamp(1.1rem, 3vw, 1.6rem) clamp(1rem, 3.4vw, 1.7rem) clamp(1.6rem, 4vw, 2.2rem);
  box-sizing: border-box;
}

.device-mobile .payment-modal-body {
  flex-direction: column;
  gap: clamp(1rem, 3vw, 1.6rem);
  padding: 0;
}

.device-mobile .payment-form-section,
.device-mobile .order-summary-section {
  width: 100%;
  padding: 0;
  min-width: 0;
}

.device-mobile .order-summary-section {
  background: rgba(248, 249, 250, 0.95);
  padding: clamp(1rem, 3.2vw, 1.6rem);
  border-radius: 10px;
  border: 1px solid rgba(224, 224, 224, 0.85);
}

.device-mobile .payment-modal-header,
.device-mobile .payment-modal-footer {
  padding-left: clamp(1rem, 3.4vw, 1.6rem);
  padding-right: clamp(1rem, 3.4vw, 1.6rem);
}

.device-mobile body.modal-active header,
.device-mobile body.modal-active footer {
  display: none !important;
}

.device-mobile .payment-modal {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  width: 100vw;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: manipulation;
}

.device-mobile .payment-modal-content {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  box-sizing: border-box;
  overflow-x: hidden;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
}

.device-mobile .payment-modal-header {
  position: sticky;
  top: env(safe-area-inset-top, 0);
  padding: clamp(1rem, 4vw, 1.3rem) clamp(1.2rem, 5vw, 1.6rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px 16px 0 0;
  z-index: 5;
  background: #f8f9fa;
}

.device-mobile .payment-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(1.2rem, 5vw, 1.6rem);
  display: flex;
  flex-direction: column;
  gap: clamp(1.1rem, 4vw, 1.6rem);
}

.device-mobile .payment-form-section,
.device-mobile .order-summary-section {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: clamp(1rem, 4vw, 1.4rem);
  width: 100%;
  box-sizing: border-box;
}

.device-mobile .order-summary-section {
  display: flex;
  flex-direction: column;
  gap: clamp(0.9rem, 3vw, 1.2rem);
  position: relative;
}

.device-mobile .order-summary-section .summary-item {
  font-size: clamp(0.95rem, 3.4vw, 1.05rem);
}

.device-mobile #submit-payment-btn {
  width: 100%;
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom, 0) + 0.65rem);
  margin-top: clamp(1rem, 4vw, 1.5rem);
  box-shadow: 0 12px 28px rgba(214, 35, 35, 0.3);
  z-index: 10;
  transform: translateZ(0);
}

.device-mobile #payment-success,
.device-mobile #payment-error {
  position: relative;
  z-index: 1;
}

.device-mobile #payment-success,
.device-mobile #payment-error,
.device-mobile .payment-success,
.device-mobile .payment-error {
  width: 100%;
  box-sizing: border-box;
}

.device-mobile body.modal-active header,
.device-mobile body.modal-active footer {
  display: none !important;
}


