/* =============================================
   SimplyNet Order Wizard — order.css
   ============================================= */

/* ── Order Header ── */
.order-header {
  background: var(--navy);
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.order-header-inner {
  display: flex;
  align-items: center;
  height: var(--nav-h);
  gap: 14px;
}
.order-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -.5px;
  text-decoration: none;
}
.order-logo span { color: var(--blue); }
.order-header-badge {
  background: rgba(66,183,226,.18);
  border: 1px solid rgba(66,183,226,.3);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 3px 10px;
  border-radius: 100px;
}
.order-header-back {
  margin-left: auto;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: var(--transition);
}
.order-header-back:hover { color: var(--blue); }
.order-secure-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: rgba(255,255,255,.4);
}

/* ── Progress Bar ── */
.wizard-progress {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.wizard-progress-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wizard-progress-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.wizard-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-dark), var(--blue));
  border-radius: 4px;
  transition: width .4s ease;
}
.wizard-steps-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.wizard-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  cursor: default;
}
.wizard-step-dot-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--border);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.wizard-step-dot.done .wizard-step-dot-circle { background: var(--blue); color: var(--white); }
.wizard-step-dot.active .wizard-step-dot-circle {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(66,183,226,.2);
}
.wizard-step-dot-label {
  font-size: .65rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  transition: var(--transition);
}
.wizard-step-dot.active .wizard-step-dot-label { color: var(--blue-dark); }
.wizard-step-dot.done .wizard-step-dot-label { color: var(--text); }

/* ── Wizard Body ── */
.wizard-body {
  min-height: calc(100vh - var(--nav-h) - 80px);
  padding: 48px 0 80px;
  background: var(--bg);
}
.wizard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 680px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.wizard-step { display: none; }
.wizard-step.active { display: block; }

.step-header { margin-bottom: 32px; }
.step-number-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue);
  margin-bottom: 8px;
}
.step-number-tag::before {
  content: attr(data-step);
  width: 20px; height: 20px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
}
.step-title { font-size: 1.5rem; color: var(--navy); margin-bottom: 6px; }
.step-desc { font-size: .92rem; color: var(--muted); }

/* ── Address check state ── */
.address-checking {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--blue-light);
  border: 1px solid rgba(66,183,226,.3);
  border-radius: var(--radius);
  font-size: .9rem;
  color: var(--blue-dark);
  font-weight: 600;
  margin-top: 16px;
}
.address-checking.show { display: flex; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(66,183,226,.3);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.address-result {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  margin-top: 16px;
}
.address-result.show { display: flex; }
.address-result.success {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #2e7d32;
}
.address-result-icon { font-size: 1.2rem; flex-shrink: 0; }

/* ── Plan selector cards ── */
.plan-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.plan-option {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  user-select: none;
}
.plan-option:hover { border-color: var(--blue); background: var(--blue-light); }
.plan-option.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(66,183,226,.15);
}
.plan-option.featured::before {
  content: 'Best Value';
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: var(--white);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-option input[type="radio"] { display: none; }
.plan-option-check {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: absolute;
  top: 14px; right: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.plan-option.selected .plan-option-check {
  background: var(--blue);
  border-color: var(--blue);
}
.plan-option.selected .plan-option-check::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
}
.plan-option-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: 4px; }
.plan-option-speed { font-size: 1.6rem; font-weight: 800; color: var(--navy); line-height: 1; }
.plan-option-upload { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.plan-option-price { font-size: 1.1rem; font-weight: 700; color: var(--blue-dark); margin: 10px 0 8px; }
.plan-option-features { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.plan-option-features li {
  font-size: .75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.plan-option-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: .7rem;
}

/* ── Choice cards (yes/no, modem type, etc.) ── */
.choice-grid {
  display: grid;
  gap: 12px;
}
.choice-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.choice-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  user-select: none;
  position: relative;
}
.choice-card:hover { border-color: var(--blue); background: var(--blue-light); }
.choice-card.selected {
  border-color: var(--blue);
  background: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(66,183,226,.12);
}
.choice-card input[type="radio"],
.choice-card input[type="checkbox"] { display: none; }
.choice-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}
.choice-text {}
.choice-title { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.choice-desc { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.choice-card-check {
  position: absolute;
  top: 14px; right: 14px;
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.choice-card.selected .choice-card-check {
  background: var(--blue);
  border-color: var(--blue);
}
.choice-card.selected .choice-card-check::after {
  content: '';
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
}

/* ── Conditional reveal panels ── */
.conditional-panel {
  display: none;
  margin-top: 16px;
  padding: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: fadeSlide .2s ease;
}
.conditional-panel.show { display: block; }
@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Step navigation ── */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  gap: 12px;
}
.wizard-nav-left { display: flex; align-items: center; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: var(--transition);
}
.btn-back:hover { border-color: var(--text); color: var(--text); }
.btn-back:disabled { opacity: .4; cursor: not-allowed; }
.wizard-step-label {
  font-size: .8rem;
  color: var(--muted);
}
.btn-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-next:hover { background: var(--blue-dark); }
.btn-next:disabled { opacity: .4; cursor: not-allowed; }

/* ── Error messages ── */
.field-error {
  font-size: .78rem;
  color: #c62828;
  margin-top: 4px;
  display: none;
}
.field-error.show { display: block; }
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229,57,53,.1);
}

/* ── Order summary (payment step) ── */
.order-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.order-summary h4 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--muted); }
.summary-value { font-weight: 600; color: var(--text); text-align: right; max-width: 60%; }
.summary-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0 0;
  margin-top: 6px;
  border-top: 2px solid var(--border);
  font-weight: 700;
}
.summary-total-label { font-size: .95rem; color: var(--navy); }
.summary-total-value { font-size: 1.2rem; color: var(--blue-dark); }

/* ── Payment placeholder ── */
.payment-placeholder {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin: 20px 0;
}
.payment-placeholder-icon { font-size: 2.5rem; margin-bottom: 12px; }
.payment-placeholder h4 { font-size: 1rem; color: var(--navy); margin-bottom: 6px; }
.payment-placeholder p { font-size: .85rem; color: var(--muted); max-width: 380px; margin: 0 auto; }
.payment-form-fields { opacity: .4; pointer-events: none; margin-top: 20px; }

/* ── Success screen ── */
.success-screen {
  display: none;
  text-align: center;
  padding: 48px 32px;
}
.success-screen.show { display: block; }
.success-icon { font-size: 4rem; margin-bottom: 20px; animation: popIn .4s ease; }
@keyframes popIn {
  from { transform: scale(.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-screen h2 { color: var(--navy); margin-bottom: 10px; }
.success-screen p { color: var(--muted); max-width: 440px; margin: 0 auto 28px; }

/* ── Inline info box ── */
.info-box {
  display: flex;
  gap: 10px;
  padding: 13px 16px;
  background: var(--blue-light);
  border: 1px solid rgba(66,183,226,.25);
  border-radius: var(--radius);
  font-size: .85rem;
  color: var(--text);
  margin: 16px 0;
}
.info-box-icon { color: var(--blue); flex-shrink: 0; font-size: 1rem; }

/* ── SMS consent ── */
.sms-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  margin-top: 8px;
}
.sms-consent:hover { border-color: var(--blue); }
.sms-consent.checked { border-color: var(--blue); background: var(--blue-light); }
.sms-consent input { margin-top: 2px; accent-color: var(--blue); cursor: pointer; flex-shrink: 0; }
.sms-consent-text { font-size: .85rem; color: var(--text); line-height: 1.5; }
.sms-consent-text strong { display: block; margin-bottom: 2px; }

/* ── Delivery address toggle ── */
.delivery-address-display {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--text);
  font-weight: 500;
  margin-top: 8px;
}

/* ── Step transition animation ── */
.wizard-step.active {
  animation: stepIn .25s ease;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wizard-step.prev {
  animation: stepOut .25s ease forwards;
}
@keyframes stepOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Order footer ── */
.order-footer {
  background: var(--navy);
  padding: 20px 0;
  margin-top: 0;
}
.order-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
  flex-wrap: wrap;
  gap: 8px;
}
.order-footer a { color: rgba(255,255,255,.4); }
.order-footer a:hover { color: var(--blue); }

/* ── Responsive ── */
@media (max-width: 680px) {
  .wizard-card { padding: 28px 20px; border-radius: 0; border-left: none; border-right: none; margin: 0; max-width: 100%; }
  .wizard-body { padding: 0 0 60px; }
  .plan-selector { grid-template-columns: 1fr; }
  .choice-grid.cols-2 { grid-template-columns: 1fr; }
  .wizard-step-dot-label { display: none; }
  .wizard-step-dot-circle { width: 22px; height: 22px; font-size: .65rem; }
}
@media (max-width: 400px) {
  .order-header-back { display: none; }
}
