/* Checkout Page Styling */

.checkout-area {
  background-color: #f8f9fa;
  min-height: 100vh;
}

/* Progress Steps */
.checkout-progress {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.progress-steps {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
}

.step-number {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  text-align: center;
}

.step.active .step-number {
  background: #76a713;
  color: white;
}

.step.active .step-label {
  color: #76a713;
  font-weight: 600;
}

.step.completed .step-number {
  background: #28a745;
  color: white;
}

.step.completed .step-label {
  color: #28a745;
}

.step.completed .step-number::after {
  content: "✓";
  font-weight: bold;
}

.progress-line {
  height: 2px;
  background: #e9ecef;
  flex: 1;
  margin: 0 20px;
  margin-top: -20px;
  transition: all 0.3s ease;
}

.step.completed + .progress-line {
  background: #28a745;
}

/* Checkout Form */
.checkout-form-wrapper {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  margin-bottom: 30px;
}

/* Address Preview Card */
.address-preview-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  position: relative;
}

.address-preview-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #76a713 0%, #5d8610 100%);
  border-radius: 12px 12px 0 0;
}

/* Readonly Fields */
.readonly-field {
  background-color: #f8f9fa !important;
  border-color: #e9ecef !important;
  color: #495057 !important;
  cursor: default;
}

.readonly-field:focus {
  background-color: #f8f9fa !important;
  border-color: #e9ecef !important;
  box-shadow: none !important;
}

/* Editable Fields Section */
.editable-fields-section {
  border-top: 2px solid #f1f3f4;
  margin-top: 25px;
  padding-top: 25px;
}

.section-title {
  color: #2c3e50;
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 20px;
}

.section-title i {
  color: #76a713;
}

.checkout-step-title {
  color: #2c3e50;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
  font-size: 24px;
  font-weight: 600;
}

.checkout-step-title i {
  color: #76a713;
}

.checkout-form .form-group {
  margin-bottom: 25px;
}

.checkout-form label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  font-size: 14px;
}

.checkout-form .form-control {
  height: 50px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.checkout-form .form-control:focus {
  border-color: #76a713;
  box-shadow: 0 0 0 0.2rem rgba(118, 167, 19, 0.15);
}

.checkout-form .form-control.is-invalid {
  border-color: #dc3545;
}

.checkout-form .invalid-feedback {
  display: block;
  font-size: 14px;
  margin-top: 5px;
}

.checkout-form textarea.form-control {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

/* Checkout Step Actions */
.checkout-step-actions {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #f1f3f4;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkout-step-actions .theme-btn {
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
}

/* Payment Methods */
.payment-methods {
  max-width: 100%;
}

.payment-header {
  border: 2px solid #76a713;
  border-radius: 12px;
  background: rgba(118, 167, 19, 0.05);
}

.payment-header .payment-option-content {
  padding: 20px;
  gap: 20px;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.payment-option {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.payment-option:hover {
  border-color: #76a713;
  box-shadow: 0 4px 15px rgba(118, 167, 19, 0.1);
}

.payment-option.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.payment-radio {
  display: block;
  margin: 0;
  cursor: pointer;
  width: 100%;
}

.payment-radio input[type="radio"] {
  display: none;
}

.payment-option-content {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 20px;
}

.payment-icon {
  width: 50px;
  height: 50px;
  background: #f8f9fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #76a713;
}

.payment-details {
  flex: 1;
}

.payment-details h6 {
  margin: 0 0 5px 0;
  font-weight: 600;
  color: #2c3e50;
}

.payment-details p {
  margin: 0;
  color: #6c757d;
  font-size: 14px;
}

.payment-logos {
  display: flex;
  gap: 10px;
}

.payment-logo {
  height: 30px;
  width: auto;
}

.payment-badge .badge {
  font-size: 12px;
  padding: 6px 12px;
}

.payment-radio input[type="radio"]:checked + .payment-option-content {
  background: rgba(118, 167, 19, 0.05);
}

.payment-radio input[type="radio"]:checked + .payment-option-content .payment-icon {
  background: #76a713;
  color: white;
}

/* Card Payment Form */
.card-payment-form {
  margin-top: 30px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: 12px;
}

.secure-payment-notice {
  text-align: center;
}

.security-badge {
  display: inline-flex;
  align-items: center;
  background: #e8f5e8;
  color: #28a745;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

.input-with-tooltip {
  position: relative;
}

.cvv-tooltip {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: help;
}

.cvv-tooltip .fas {
  color: #6c757d;
}

.tooltip-content {
  position: absolute;
  top: -80px;
  right: -50px;
  background: #2c3e50;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 12px;
  width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 20px;
  border: 5px solid transparent;
  border-top-color: #2c3e50;
}

.cvv-tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

.stripe-integration-notice {
  margin-top: 25px;
  text-align: center;
}

.integration-badge {
  display: inline-flex;
  align-items: center;
  background: #f3f4ff;
  color: #6772e5;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

/* Cash Payment Info */
.cash-payment-info {
  margin-top: 30px;
}

.info-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
}

.info-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.info-header h6 {
  margin: 0;
  font-weight: 600;
  color: #2c3e50;
}

.cash-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cash-info-list li {
  display: flex;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
  color: #495057;
}

/* Header z-index fix for checkout page */
.main-header.fixed-header .header-upper {
  z-index: 999 !important;
}

/* Order Summary Sidebar */
.order-summary-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.order-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
}

.order-summary-header h4 {
  color: #2c3e50;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.item-count {
  background: #76a713;
  color: white;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
}

/* Order Items */
.order-items {
  margin-bottom: 25px;
}

.order-item {
  display: flex;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f1f3f4;
  gap: 15px;
}

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

.item-image {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
}

.item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-quantity {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #76a713;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.item-details {
  flex: 1;
}

.item-name {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0 0 5px 0;
}

.item-store {
  font-size: 12px;
  color: #6c757d;
  margin: 0;
}

.item-pricing {
  text-align: right;
}

.item-unit-price {
  display: block;
  font-size: 12px;
  color: #6c757d;
}

.item-total-price {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
}

/* Pricing Breakdown */
.pricing-breakdown {
  border-top: 1px solid #f1f3f4;
  padding-top: 20px;
  margin-bottom: 25px;
}

.pricing-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.pricing-line.total-line {
  border-top: 2px solid #f1f3f4;
  margin-top: 15px;
  padding-top: 15px;
  font-size: 16px;
  color: #2c3e50;
}

/* Delivery Estimate */
.delivery-estimate {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

.estimate-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.estimate-item:last-child {
  margin-bottom: 0;
}

.estimate-item i {
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.estimate-item div strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 2px;
}

.estimate-item div p {
  font-size: 13px;
  color: #6c757d;
  margin: 0;
}

/* Promo Code */
.promo-code-section {
  border-top: 1px solid #f1f3f4;
  padding-top: 20px;
}

.promo-btn {
  background: none;
  border: none;
  color: #76a713;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

.promo-input-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.promo-input-group .form-control {
  height: 40px;
  font-size: 14px;
}

/* Order Review */
.order-review-section {
  margin-bottom: 30px;
}

.order-review-section h5 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

.delivery-info-review .info-card,
.payment-info-review .info-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.delivery-info-review .info-card p {
  margin: 3px 0;
  font-size: 14px;
  color: #495057;
}

.payment-info-review .info-card p {
  margin: 0;
  font-size: 14px;
  color: #495057;
}

/* Order Confirmation */
.order-confirmation-area {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  min-height: 100vh;
}

.order-success-header {
  margin-bottom: 50px;
}

.success-icon {
  margin-bottom: 30px;
}

.success-circle {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #28a745, #20c997);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  animation: successPulse 2s ease-in-out;
}

.success-circle i {
  font-size: 48px;
  color: white;
}

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

.success-title {
  font-size: 36px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

.success-subtitle {
  font-size: 18px;
  color: #6c757d;
  margin-bottom: 25px;
}

.order-number {
  background: #e8f5e8;
  color: #28a745;
  padding: 12px 25px;
  border-radius: 25px;
  display: inline-block;
  font-size: 18px;
}

/* Order Section */
.order-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.section-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
}

.section-header h4 {
  color: #2c3e50;
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.section-header i {
  color: #76a713;
}

/* Delivery Timeline */
.delivery-timeline {
  position: relative;
  padding: 20px 0;
}

.timeline-item {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  position: relative;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 50px;
  width: 2px;
  height: 30px;
  background: #e9ecef;
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-item.active::before {
  background: #76a713;
}

.timeline-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 20px;
  position: relative;
  z-index: 2;
}

.timeline-item.active .timeline-icon {
  background: #76a713;
  color: white;
}

.timeline-content h6 {
  margin: 0 0 5px 0;
  font-weight: 600;
  color: #2c3e50;
}

.timeline-content p {
  margin: 0;
  font-size: 14px;
  color: #6c757d;
}

/* Address Card */
.address-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  margin-top: 15px;
}

.address-card p {
  margin: 3px 0;
  font-size: 14px;
  color: #495057;
}

/* Order Items List */
.order-items-list {
  max-height: 400px;
  overflow-y: auto;
}

.order-item-row {
  display: flex;
  justify-content: between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f1f3f4;
}

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

.item-info {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 15px;
}

.item-quantity-badge {
  background: #76a713;
  color: white;
  border-radius: 15px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.item-details h6 {
  margin: 0 0 5px 0;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.item-price {
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
}

/* Payment Method Display */
.payment-method-display {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
}

.payment-card,
.payment-cash {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-status .badge {
  font-size: 12px;
  padding: 6px 12px;
}

/* Order Summary Sidebar (Confirmation) */
.order-summary-sidebar {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.summary-header {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f1f3f4;
}

.summary-header h5 {
  color: #2c3e50;
  margin: 0;
  font-weight: 600;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 14px;
}

.summary-line.total-line {
  border-top: 2px solid #f1f3f4;
  margin-top: 15px;
  padding-top: 15px;
  font-size: 16px;
  color: #2c3e50;
}

/* Contact Info */
.contact-info {
  border-top: 1px solid #f1f3f4;
  padding-top: 20px;
  margin-bottom: 25px;
}

.contact-info h6 {
  margin-bottom: 15px;
  font-weight: 600;
  color: #2c3e50;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #495057;
}

/* Action Buttons */
.action-buttons .btn {
  height: 45px;
  font-weight: 500;
  border-radius: 8px;
}

/* Email Notification */
.email-notification {
  margin-top: 50px;
}

.notification-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 30px;
  max-width: 500px;
  margin: 0 auto;
}

.notification-card i {
  font-size: 48px;
  margin-bottom: 20px;
}

.notification-card h6 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-weight: 600;
}

/* Loading and Error States */
.order-confirmation-loading,
.order-confirmation-error {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-icon {
  margin-bottom: 30px;
}

.error-actions {
  margin-top: 30px;
}

.error-actions .theme-btn {
  margin: 0 10px;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .checkout-form-wrapper,
  .order-summary-card {
    padding: 25px;
  }
  
  .order-section {
    padding: 25px;
  }
}

@media (max-width: 992px) {
  .progress-steps {
    flex-direction: column;
    gap: 20px;
  }
  
  .progress-line {
    display: none;
  }
  
  .checkout-step-actions {
    flex-direction: column;
    gap: 15px;
  }
  
  .checkout-step-actions .theme-btn {
    width: 100%;
  }
  
  .payment-option-content {
    padding: 15px;
    gap: 15px;
  }
  
  .payment-details h6 {
    font-size: 16px;
  }
}

@media (max-width: 768px) {
  .checkout-area {
    padding: 60px 0;
  }
  
  .checkout-form-wrapper {
    padding: 20px;
  }
  
  .checkout-step-title {
    font-size: 20px;
  }
  
  .order-summary-card {
    padding: 20px;
    margin-top: 30px;
  }
  
  .success-title {
    font-size: 28px;
  }
  
  .success-subtitle {
    font-size: 16px;
  }
  
  .order-section {
    padding: 20px;
  }
  
  .timeline-item {
    margin-bottom: 25px;
  }
  
  .timeline-content h6 {
    font-size: 15px;
  }
}

@media (max-width: 576px) {
  .checkout-progress {
    padding: 20px;
  }
  
  .step-number {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
  
  .step-label {
    font-size: 12px;
  }
  
  .checkout-form .form-control {
    height: 45px;
    font-size: 14px;
  }
  
  .payment-option-content {
    padding: 12px;
    gap: 12px;
  }
  
  .payment-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .item-pricing {
    text-align: left;
    width: 100%;
  }
  
  .success-circle {
    width: 80px;
    height: 80px;
  }
  
  .success-circle i {
    font-size: 36px;
  }
  
  .success-title {
    font-size: 24px;
  }
}

/* Delivery Fee Breakdown Styling */
.delivery-breakdown {
  background-color: rgba(118, 167, 19, 0.05);
  border-left: 3px solid #76a713;
  padding-left: 12px !important;
  margin-left: -4px;
}

.delivery-breakdown small {
  font-size: 11px;
  margin-top: 2px;
  opacity: 0.8;
}