/* Order Wizard - Multi-step order form */
.order-wizard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(6px);
  z-index: 10000;
  justify-content: center;
  align-items: flex-start;
  padding: 20px;
  overflow-y: auto;
}
.order-wizard-overlay.active { display: flex; }

.order-wizard {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(15, 23, 42, 0.3);
  max-width: 640px;
  width: 100%;
  margin: 40px auto;
  position: relative;
  animation: wizardSlideIn 0.35s ease;
}

@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateY(-30px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.wizard-header {
  background: linear-gradient(135deg, #2563eb 0%, #22c55e 100%);
  padding: 24px 28px;
  border-radius: 20px 20px 0 0;
  color: #fff;
  position: relative;
}

.wizard-header h2 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-header p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.wizard-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.wizard-close:hover {
  background: rgba(255,255,255,0.35);
  transform: rotate(90deg);
}

.wizard-close svg { width: 18px; height: 18px; }

/* Progress Steps */
.wizard-progress {
  display: flex;
  justify-content: space-between;
  padding: 20px 28px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  gap: 8px;
}

.wizard-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.wizard-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-num,
.wizard-step.completed .wizard-step-num {
  background: linear-gradient(135deg, #2563eb, #22c55e);
  color: #fff;
}

.wizard-step.completed .wizard-step-num::after {
  content: "✓";
}

.wizard-step.completed .wizard-step-num span { display: none; }

.wizard-step-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 600;
  display: block;
}

.wizard-step.active .wizard-step-label { color: #2563eb; }
.wizard-step.completed .wizard-step-label { color: #22c55e; }

/* Body */
.wizard-body {
  padding: 28px;
  min-height: 300px;
}

.wizard-section { display: none; }
.wizard-section.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Form Elements */
.wiz-form-group {
  margin-bottom: 18px;
}

.wiz-form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  margin-bottom: 6px;
}

.wiz-form-group label .required { color: #ef4444; }

.wiz-form-group input,
.wiz-form-group select,
.wiz-form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.wiz-form-group input:focus,
.wiz-form-group select:focus,
.wiz-form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.wiz-form-group textarea {
  min-height: 90px;
  resize: vertical;
}

.wiz-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wiz-form-row-3 {
  display: grid;
  grid-template-columns: 1fr 100px 140px;
  gap: 14px;
}

@media (max-width: 540px) {
  .wiz-form-row, .wiz-form-row-3 { grid-template-columns: 1fr; }
}

/* Skip Button */
.wiz-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  color: #92400e;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}

.wiz-skip-btn:hover {
  background: #fde68a;
}

.wiz-skip-btn svg { width: 18px; height: 18px; }

/* Checkbox toggle */
.wiz-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}

.wiz-checkbox:hover { background: #e2e8f0; }

.wiz-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.wiz-checkbox span {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0f172a;
}

/* Radio Group */
.wiz-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wiz-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 2px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.wiz-radio-option:hover { border-color: #2563eb; }

.wiz-radio-option input { 
  width: auto; 
  margin: 0;
  accent-color: #2563eb;
}

.wiz-radio-option:has(input:checked) {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(34, 197, 94, 0.08));
  border-color: #2563eb;
}

/* Package Display */
.wiz-package-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(34, 197, 94, 0.06));
  border: 2px solid rgba(37, 99, 235, 0.2);
  border-radius: 14px;
  margin-bottom: 20px;
}

.wiz-package-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
}

.wiz-package-icon svg { width: 26px; height: 26px; }

.wiz-package-details h4 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: #0f172a;
}

.wiz-package-details .price {
  font-size: 1.2rem;
  font-weight: 800;
  color: #2563eb;
}

.wiz-package-details .price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
}

/* Summary Section */
.wiz-summary {
  background: #f8fafc;
  border-radius: 14px;
  padding: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.wiz-summary-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.wiz-summary-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.wiz-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.wiz-summary-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wiz-summary-header button {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.wiz-summary-header button:hover {
  background: rgba(37, 99, 235, 0.1);
}

.wiz-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 4px 0;
}

.wiz-summary-row .label { color: #64748b; }
.wiz-summary-row .value { color: #0f172a; font-weight: 600; }

.wiz-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: linear-gradient(135deg, #2563eb, #22c55e);
  border-radius: 12px;
  color: #fff;
  margin-top: 20px;
}

.wiz-summary-total .label {
  font-size: 1rem;
  font-weight: 600;
}

.wiz-summary-total .value {
  font-size: 1.4rem;
  font-weight: 800;
}

/* Footer Navigation */
.wizard-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  background: #f8fafc;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0 0 20px 20px;
  gap: 12px;
}

.wiz-btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  border: none;
}

.wiz-btn-back {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

.wiz-btn-back:hover {
  background: #f1f5f9;
}

.wiz-btn-next {
  background: linear-gradient(90deg, #2563eb, #22c55e);
  color: #fff;
  margin-left: auto;
}

.wiz-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.wiz-btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wiz-btn svg { width: 18px; height: 18px; }

.wiz-btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Success Screen */
.wizard-success {
  text-align: center;
  padding: 40px 20px;
}

.wizard-success-icon {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(37, 99, 235, 0.15));
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.wizard-success-icon svg {
  width: 45px;
  height: 45px;
  color: #22c55e;
}

.wizard-success h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
  color: #0f172a;
}

.wizard-success p {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 1rem;
}

.wizard-success .order-number {
  display: inline-block;
  background: #f1f5f9;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: monospace;
  font-size: 1rem;
  color: #2563eb;
  font-weight: 700;
  margin: 20px 0;
}

.wizard-success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.wizard-success-actions .wiz-btn {
  min-width: 160px;
}

.wiz-btn-secondary {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
}

.wiz-btn-secondary:hover {
  background: #f1f5f9;
}

/* Print styles */
@media print {
  .order-wizard-overlay {
    position: static;
    background: none;
    backdrop-filter: none;
  }
  .wizard-header, .wizard-progress, .wizard-footer, .wizard-close { display: none !important; }
  .order-wizard {
    box-shadow: none;
    max-width: 100%;
  }
  .wizard-success-actions { display: none !important; }
}
