/* Checkout Flow - Amphibious 2.0 */

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  margin: 0;
  background: #f8f9fa;
}

/* Checkout Header */
.aiab-checkout-header {
  background: white;
  border-bottom: 2px solid #dee2e6;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Progress Steps */
.aiab-checkout-progress-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}
.aiab-checkout-progress-steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6c757d;
  font-weight: 500;
}
.aiab-checkout-progress-steps li.aiab-active {
  color: var(--color-primary);
}
.aiab-checkout-progress-steps li.aiab-checkout-completed {
  color: #28a745;
}
.aiab-checkout-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s;
}
.aiab-checkout-progress-steps li.aiab-active .aiab-checkout-step-number {
  background: var(--color-primary);
  color: white;
}
.aiab-checkout-progress-steps li.aiab-checkout-completed .aiab-checkout-step-number {
  background: #28a745;
  color: white;
}
.aiab-checkout-step-connector {
  width: 60px;
  height: 2px;
  background: #dee2e6;
  margin: 0 -1rem;
}
.aiab-checkout-step-connector.aiab-checkout-completed {
  background: #28a745;
}

/* Form Styles */
.aiab-checkout-form {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.aiab-checkout-form h2 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.75rem;
}
fieldset {
  border: none;
  padding: 0;
  margin: 0 0 2rem 0;
}
legend {
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  width: 100%;
}
.aiab-checkout-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.aiab-form-group.aiab-checkout-full-width {
  grid-column: 1 / -1;
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}
label .required {
  color: #dc3545;
  margin-left: 0.25rem;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
input:invalid {
  border-color: #dc3545;
}
.aiab-checkout-form-help {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.25rem;
}
.aiab-radio-group,
.aiab-checkout-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.aiab-checkout-radio-option,
.aiab-checkout-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.aiab-checkout-radio-option:hover,
.aiab-checkout-checkbox-option:hover {
  border-color: var(--color-primary);
  background: #f8f9fa;
}
.aiab-checkout-radio-option input,
.aiab-checkout-checkbox-option input {
  margin-top: 0.25rem;
  cursor: pointer;
}
.aiab-checkout-radio-option.aiab-checkout-selected,
.aiab-checkout-checkbox-option.aiab-checkout-selected {
  border-color: var(--color-primary);
  background: #f0f4ff;
}

/* Order Summary Aside */
.aiab-checkout-order-summary {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 100px;
}
.aiab-checkout-order-summary h3 {
  margin-top: 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f0f0;
}
.aiab-checkout-order-items {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.aiab-checkout-order-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}
.aiab-checkout-order-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}
.aiab-checkout-order-item-details {
  flex: 1;
}
.aiab-checkout-order-item-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.aiab-checkout-order-item-meta {
  font-size: 0.875rem;
  color: #6c757d;
}
.aiab-checkout-order-item-price {
  font-weight: 600;
}
.aiab-checkout-order-totals {
  padding-top: 1rem;
}
.aiab-checkout-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.aiab-checkout-total-row.aiab-checkout-grand-total {
  font-size: 1.25rem;
  font-weight: 600;
  padding-top: 0.75rem;
  border-top: 2px solid #dee2e6;
  margin-top: 0.75rem;
}

/* Action Buttons */
.aiab-checkout-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
}
.aiab-checkout-btn-link {
  background: transparent;
  color: #6c757d;
  border: none;
  padding: 0.875rem 0;
}
.aiab-checkout-btn-link:hover {
  color: #495057;
}

/* Secure Badge */
.aiab-checkout-secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #d4edda;
  color: #155724;
  border-radius: 4px;
  font-size: 0.875rem;
  margin-left: auto;
}

/* Moved from inline styles */
.aiab-checkout-shipping-desc {
  font-size: 0.875rem;
  color: #6c757d;
}

.aiab-checkout-option-price {
  margin-left: auto;
}

.aiab-checkout-notes-group {
  margin-top: 1rem;
}

.aiab-checkout-action-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.aiab-checkout-main {
  padding: 2rem 0;
}

.aiab-checkout-promo-section {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
}

.aiab-checkout-promo-section h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
}

.aiab-checkout-promo-input-group {
  display: flex;
  gap: 0.5rem;
}

.aiab-checkout-promo-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

.aiab-checkout-promo-apply-btn {
  padding: 0.5rem 1rem;
}

.aiab-checkout-payment-methods {
  margin-top: 1.5rem;
}

.aiab-checkout-payment-methods h4 {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.aiab-checkout-payment-icons {
  display: flex;
  gap: 0.5rem;
}

.aiab-checkout-payment-icons img {
  height: 25px;
}

.aiab-checkout-discount-value {
  color: #28a745;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .aiab-checkout-form-row {
    grid-template-columns: 1fr;
  }
  .aiab-checkout-progress-steps {
    flex-direction: column;
    gap: 1rem;
  }
  .aiab-checkout-step-connector {
    display: none;
  }
  .aiab-checkout-form-actions {
    flex-direction: column;
    gap: 1rem;
  }
  .aiab-checkout-order-summary {
    position: static;
    margin-bottom: 2rem;
  }
}
