/* Footer - Enhanced Quantity Controls & Submit Button */

/* ============================================
   FOOTER CONTAINER
   ============================================ */
.cod-footer {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg, 16px);
  /* ❌ REMOVED: margin-top (form gap handles it) */
}

/* Rest stays the same... */

/* ============================================
   QUANTITY CONTROLS
   ============================================ */
.cod-quantity {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm, 8px); /* Space between buttons and input */

  /* ✅ UNIFIED: Same height as other components */
  height: 56px;

  background: var(--cod-state-default-bg, #ffffff);
  border: 2px solid var(--cod-state-default-border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 0 var(--spacing-md, 12px);
}

/* Quantity buttons (- and +) */
.qty-btn {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: none;
  border-radius: var(--radius-md, 10px);

  font-size: 24px;
  font-weight: var(--font-weight-bold, 700);
  color: var(--cod-text-secondary, #374151);

  cursor: pointer;
  transition: all var(--transition-fast, 150ms ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover:not(:disabled) {
  background: var(--cod-primary-light, rgba(10, 219, 98, 0.08));
  color: var(--cod-primary, #0adb62);
}

.qty-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Quantity input */
#cod-quantity {
  width: 50px;
  height: 40px;

  background: transparent;
  border: none;
  border-radius: var(--radius-sm, 8px);

  font-size: var(--font-size-xl, 18px);
  font-weight: var(--font-weight-bold, 700);
  color: var(--cod-text, #052f1b);
  text-align: center;

  /* Remove spinner arrows */
  -moz-appearance: textfield;
}

#cod-quantity::-webkit-outer-spin-button,
#cod-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#cod-quantity:focus {
  outline: none;
  background: var(--cod-primary-light, rgba(10, 219, 98, 0.05));
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */
.cod-submit-btn {
  flex: 1; /* Take remaining space */

  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm, 8px);

  /* ✅ UNIFIED: Same height */
  min-height: 56px;
  padding: 0 var(--spacing-2xl, 24px);

  background: var(--cod-primary, #0adb62);
  border: 2px solid var(--cod-primary, #0adb62);
  border-radius: var(--radius-lg, 12px);

  font-family: inherit;
  font-size: var(--font-size-lg, 16px);
  font-weight: var(--font-weight-bold, 700);
  color: #ffffff;
  text-align: center;

  cursor: pointer;
  transition: all var(--transition-base, 0.2s ease);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cod-submit-btn:hover:not(:disabled) {
  background: var(--cod-primary-hover, #09c456);
  border-color: var(--cod-primary-hover, #09c456);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(10, 219, 98, 0.3);
}

.cod-submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 4px 8px -2px rgba(10, 219, 98, 0.3);
}

.cod-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Loading state */
.cod-submit-btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.cod-submit-btn.loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
  .cod-footer {
    gap: var(--spacing-md, 12px);
    margin-top: var(--spacing-xl, 20px);
  }

  .cod-quantity {
    height: 52px;
  }

  .qty-btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  #cod-quantity {
    width: 48px;
    height: 38px;
    font-size: var(--font-size-lg, 17px);
  }

  .cod-submit-btn {
    min-height: 52px;
    font-size: var(--font-size-base, 15px);
  }
}

@media (max-width: 480px) {
  .cod-footer {
    flex-direction: column;
    gap: var(--spacing-md, 12px);
  }

  .cod-quantity {
    width: 100%;
    justify-content: center;
    height: 50px;
  }

  .cod-submit-btn {
    width: 100%;
    min-height: 52px;
  }
}
