/* =============================================================
   Register Wizard — Fullscreen Immersive Design
   Крупные элементы, много воздуха, драматичная типографика
   Порядок: layout → progress → steps → inputs → dropzone →
   frames grid → confirmation → success → animations → responsive
   ============================================================= */

/* --- Layout --- */
.wizard-page {
  background: var(--bab-cream);
  min-height: 100vh;
  font-family: var(--font-family);
}
.wizard-header {
  text-align: center;
  padding: 32px 24px 0;
}
.wizard-header img {
  height: 36px;
  width: auto;
}
.wizard-tagline {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bab-text-soft);
  margin: 10px 0 0;
}
.wizard-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 28px 100px;
}

/* --- Progress bar --- */
.wizard-progress {
  display: flex;
  gap: 10px;
  margin: 40px 0 12px;
}
.wizard-progress-bar {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: var(--bab-border);
  transition: background 0.4s ease;
}
.wizard-progress-bar.active {
  background: var(--bab-tangerine);
}
.wizard-step-label {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bab-tangerine);
  margin-bottom: 8px;
}

/* --- Step common --- */
.wizard-step {
  display: none;
}
.wizard-step.active {
  display: block;
  animation: wizardFadeIn 0.4s ease-out;
}
.wizard-step-title {
  font-size: clamp(32px, 8vw, 48px);
  font-weight: 800;
  color: var(--bab-blue);
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.1;
}
.wizard-step-desc {
  font-size: 16px;
  color: var(--bab-text-muted);
  margin: 0 0 44px;
  line-height: 1.5;
}

/* --- Form elements --- */
.wizard-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bab-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.wizard-input {
  display: block;
  width: 100%;
  background: var(--bab-white);
  border: 2px solid var(--bab-border);
  border-radius: 16px;
  padding: 20px 24px;
  font-size: 18px;
  font-family: var(--font-family);
  color: var(--bab-text);
  transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
  -webkit-appearance: none;
  appearance: none;
}
.wizard-input:focus {
  outline: none;
  border-color: var(--bab-tangerine);
  box-shadow: 0 0 0 4px rgba(255, 106, 57, 0.1);
  background-color: #FFFCFA;
}
.wizard-input.error {
  border-color: #C5283D;
  box-shadow: 0 0 0 4px rgba(197, 40, 61, 0.08);
}
.wizard-input.valid {
  border-color: var(--bab-aqua-dark);
}
.wizard-field {
  margin-bottom: 28px;
}

/* --- Date selects (день/месяц/год) --- */
.wizard-date-selects {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr 0.9fr;
  gap: 8px;
}
.wizard-date-select {
  padding: 16px 10px;
  font-size: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B6966' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
  border-radius: 12px;
  min-width: 0;
}
.wizard-field-error {
  font-size: 13px;
  color: #C5283D;
  margin-top: 8px;
  min-height: 20px;
  font-weight: 500;
  animation: wizardFadeIn 0.2s ease-out;
}
.wizard-field-hint {
  display: block;
  font-size: 13px;
  color: var(--bab-text-soft);
  margin-top: 8px;
  line-height: 1.4;
}

/* --- Buttons --- */
.wizard-actions {
  display: flex;
  gap: 14px;
  margin-top: 48px;
}
.wizard-btn-primary {
  flex: 2;
  display: block;
  width: 100%;
  background: var(--bab-tangerine);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 22px 32px;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-family);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 6px 20px rgba(255, 106, 57, 0.3);
}
.wizard-btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(255, 106, 57, 0.35);
}
.wizard-btn-primary:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 106, 57, 0.25);
}
.wizard-btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.wizard-btn-ghost {
  flex: 1;
  background: var(--bab-white);
  color: var(--bab-blue);
  border: 2px solid var(--bab-blue);
  border-radius: 999px;
  padding: 22px 32px;
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-family);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.wizard-btn-ghost:hover {
  background: var(--bab-cream);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 61, 165, 0.08);
}

/* --- Store dropdown --- */
.wizard-store-wrap {
  position: relative;
}
.wizard-store-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--bab-white);
  border: 2px solid var(--bab-border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 61, 165, 0.10);
}
.wizard-store-option {
  padding: 16px 24px;
  cursor: pointer;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--bab-text);
  transition: background 0.15s;
}
.wizard-store-option:hover {
  background: rgba(255, 106, 57, 0.06);
  color: var(--bab-tangerine);
}
.wizard-store-option[hidden] {
  display: none;
}

/* --- Remove file button --- */
.wizard-btn-remove-file {
  background: none;
  border: 1px solid var(--bab-border);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bab-text-muted);
  cursor: pointer;
  font-family: var(--font-family);
  transition: border-color 0.2s, color 0.2s;
}
.wizard-btn-remove-file:hover {
  border-color: #C5283D;
  color: #C5283D;
}

/* --- Product search dropdown --- */
.wizard-product-search-wrap {
  position: relative;
}
.wizard-product-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--bab-white);
  border: 2px solid var(--bab-border);
  border-top: none;
  border-radius: 0 0 16px 16px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 61, 165, 0.10);
}
.wizard-product-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  font-size: 15px;
  font-family: var(--font-family);
  color: var(--bab-text);
  transition: background 0.15s;
}
.wizard-product-option:hover,
.wizard-product-option.active {
  background: rgba(255, 106, 57, 0.06);
}
.wizard-product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bab-cream);
  border: 1px solid var(--bab-border);
  flex-shrink: 0;
}
.wizard-product-name {
  font-weight: 600;
  color: var(--bab-text);
  line-height: 1.3;
}
.wizard-product-sku {
  font-size: 12px;
  color: var(--bab-text-soft);
  font-family: 'Space Mono', monospace;
}
.wizard-product-no-results {
  padding: 20px;
  text-align: center;
  color: var(--bab-text-soft);
  font-size: 14px;
}
.wizard-product-manual {
  padding: 14px 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--bab-tangerine);
  font-weight: 600;
  border-top: 1px solid var(--bab-border);
  transition: background 0.15s;
}
.wizard-product-manual:hover {
  background: rgba(255, 106, 57, 0.06);
}

/* --- Glasses card --- */
.wizard-glasses-card {
  background: var(--bab-white);
  border: 2px solid var(--bab-border);
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}
.wizard-glasses-card:hover {
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.06);
}
.wizard-glasses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.wizard-glasses-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bab-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  margin-right: 12px;
  flex-shrink: 0;
}
.wizard-glasses-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--bab-text);
}
.wizard-glasses-remove {
  background: none;
  border: none;
  color: var(--bab-blush);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: color 0.15s;
}
.wizard-glasses-remove:hover {
  color: #C5283D;
}
.wizard-add-glasses {
  display: block;
  width: 100%;
  background: var(--bab-white);
  border: 3px dashed var(--bab-border);
  border-radius: 24px;
  padding: 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--bab-blue);
  cursor: pointer;
  font-family: var(--font-family);
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  margin-bottom: 10px;
}
.wizard-add-glasses:hover {
  border-color: var(--bab-tangerine);
  background: rgba(255, 106, 57, 0.04);
  transform: translateY(-2px);
}
.wizard-add-hint {
  text-align: center;
  font-size: 13px;
  color: var(--bab-text-soft);
}

/* --- Drop zone --- */
.wizard-dropzone {
  border: 3px dashed var(--bab-border);
  border-radius: 24px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  background: var(--bab-cream);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.wizard-dropzone:hover,
.wizard-dropzone.dragover {
  border-color: var(--bab-tangerine);
  background: rgba(255, 106, 57, 0.06);
  transform: scale(1.01);
}
.wizard-dropzone-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.wizard-dropzone-label {
  font-size: 16px;
  color: var(--bab-text-muted);
  font-weight: 500;
}
.wizard-dropzone-hint {
  font-size: 13px;
  color: var(--bab-text-soft);
  margin-top: 6px;
}
.wizard-receipt-preview {
  margin-top: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.wizard-receipt-preview img {
  max-width: 200px;
  max-height: 200px;
  border-radius: 16px;
  border: 2px solid var(--bab-border);
  object-fit: cover;
}

/* --- Confirmation cards --- */
.wizard-confirm-card {
  background: var(--bab-white);
  border: 2px solid var(--bab-border);
  border-radius: 24px;
  padding: 28px 32px;
  margin-bottom: 20px;
  transition: box-shadow 0.3s ease;
}
.wizard-confirm-card:hover {
  box-shadow: 0 8px 32px rgba(0, 61, 165, 0.06);
}
.wizard-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wizard-confirm-title {
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--bab-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.wizard-confirm-edit {
  background: none;
  border: none;
  color: var(--bab-tangerine);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-family);
  transition: color 0.15s;
}
.wizard-confirm-edit:hover {
  color: var(--bab-tangerine-dark);
}
.wizard-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.wizard-confirm-row:last-child {
  border-bottom: none;
}
.wizard-confirm-label {
  color: var(--bab-text-soft);
  font-size: 14px;
}
.wizard-confirm-value {
  color: var(--bab-text);
  font-weight: 600;
  font-size: 15px;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
.wizard-confirm-glasses-divider {
  border: none;
  border-top: 2px dashed var(--bab-border);
  margin: 16px 0;
}

/* --- Consent --- */
.wizard-consent {
  margin-top: 28px;
}
.wizard-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  font-size: 15px;
  color: var(--bab-text);
  cursor: pointer;
  line-height: 1.5;
}
.wizard-checkbox input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--bab-tangerine);
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* --- Success --- */
.wizard-success {
  text-align: center;
  padding: 80px 28px;
  max-width: 560px;
  margin: 0 auto;
  animation: wizardFadeIn 0.5s ease-out;
}
.wizard-success-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--bab-aqua);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  box-shadow: 0 8px 32px rgba(0, 191, 178, 0.25);
}
.wizard-success-icon svg {
  width: 48px;
  height: 48px;
  stroke: #fff;
  fill: none;
}
.wizard-success h2 {
  font-size: clamp(26px, 6vw, 36px);
  font-weight: 800;
  color: var(--bab-blue);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.wizard-success p {
  font-size: 17px;
  color: var(--bab-text-muted);
  margin-bottom: 40px;
  line-height: 1.7;
}
.wizard-success-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  margin: 0 auto;
}
.wizard-success-btn-primary {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--bab-tangerine);
  color: #fff;
  border-radius: 999px;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-family);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(255, 106, 57, 0.25);
}
.wizard-success-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 106, 57, 0.3);
}
.wizard-success-btn-ghost {
  display: block;
  text-align: center;
  text-decoration: none;
  background: var(--bab-white);
  color: var(--bab-blue);
  border: 2px solid var(--bab-blue);
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-family);
  transition: background 0.2s ease, transform 0.2s ease;
}
.wizard-success-btn-ghost:hover {
  background: var(--bab-cream);
  transform: translateY(-1px);
}

/* --- Success timeline --- */
.wizard-success-timeline {
  text-align: left;
  max-width: 360px;
  margin: 0 auto 40px;
}
.wizard-timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}
.wizard-timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 48px;
  bottom: 0;
  width: 2px;
  background: var(--bab-border);
}
.wizard-timeline-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bab-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  flex-shrink: 0;
}
.wizard-timeline-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
}
.wizard-timeline-text strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--bab-text);
}
.wizard-timeline-text span {
  font-size: 13px;
  color: var(--bab-text-soft);
  line-height: 1.4;
}

/* --- Help block --- */
.wizard-help {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 0 0;
  margin-top: 48px;
  border-top: 1px solid var(--bab-border);
  flex-wrap: wrap;
}
.wizard-help-text {
  font-size: 14px;
  color: var(--bab-text-soft);
  font-weight: 500;
}
.wizard-help-link {
  font-size: 14px;
  color: var(--bab-tangerine);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
}
.wizard-help-link:hover {
  color: var(--bab-tangerine-dark);
}
.wizard-help-divider {
  color: var(--bab-text-soft);
  font-size: 14px;
}

/* --- Banner --- */
.wizard-banner {
  background: var(--color-warning-bg);
  border: 2px solid var(--color-warning-border);
  border-radius: 16px;
  padding: 18px 24px;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* --- Animations --- */
@keyframes wizardFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-step.active,
  .wizard-success,
  .wizard-field-error {
    animation: none;
  }
}

/* --- Desktop (768px+) --- */
@media (min-width: 768px) {
  .wizard-header {
    padding: 48px 32px 0;
  }
  .wizard-header img {
    height: 44px;
  }
  .wizard-container {
    max-width: 640px;
    padding: 0 40px 120px;
  }
  .wizard-progress {
    margin: 56px 0 16px;
    gap: 12px;
  }
  .wizard-progress-bar {
    height: 8px;
  }
  .wizard-step-label {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .wizard-step-title {
    font-size: clamp(40px, 6vw, 56px);
    margin-bottom: 14px;
  }
  .wizard-step-desc {
    font-size: 18px;
    margin-bottom: 56px;
  }
  .wizard-label {
    font-size: 13px;
    margin-bottom: 12px;
  }
  .wizard-input {
    padding: 24px 28px;
    font-size: 20px;
    border-radius: 20px;
  }
  .wizard-field {
    margin-bottom: 36px;
  }
  .wizard-actions {
    margin-top: 56px;
    gap: 16px;
  }
  .wizard-btn-primary,
  .wizard-btn-ghost {
    padding: 24px 36px;
    font-size: 19px;
  }
  .wizard-glasses-card {
    padding: 36px;
    border-radius: 28px;
  }
  .wizard-glasses-header {
    margin-bottom: 28px;
  }
  .wizard-glasses-title {
    font-size: 20px;
  }
  .wizard-add-glasses {
    padding: 28px;
    font-size: 17px;
    border-radius: 28px;
  }
  .wizard-dropzone {
    padding: 56px 32px;
    border-radius: 28px;
  }
  .wizard-dropzone-icon {
    font-size: 48px;
  }
  .wizard-dropzone-label {
    font-size: 18px;
  }
  .wizard-confirm-card {
    padding: 36px 40px;
    border-radius: 28px;
  }
  .wizard-confirm-row {
    padding: 10px 0;
    font-size: 17px;
  }
  .wizard-success {
    padding: 100px 40px;
  }
  .wizard-success-icon {
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
  }
  .wizard-success-icon svg {
    width: 56px;
    height: 56px;
  }
  .wizard-success h2 {
    font-size: 40px;
  }
  .wizard-success p {
    font-size: 19px;
    margin-bottom: 48px;
  }
  .wizard-success-actions {
    max-width: 360px;
    gap: 14px;
  }
  .wizard-success-btn-primary {
    padding: 18px 32px;
    font-size: 17px;
  }
  .wizard-success-btn-ghost {
    padding: 16px 32px;
    font-size: 16px;
  }
  .wizard-checkbox {
    font-size: 16px;
    gap: 16px;
  }
  .wizard-checkbox input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }
  .wizard-banner {
    padding: 22px 28px;
    font-size: 16px;
    border-radius: 20px;
  }
  .wizard-store-option {
    padding: 18px 28px;
    font-size: 17px;
  }
  .wizard-receipt-preview img {
    max-width: 240px;
    max-height: 240px;
    border-radius: 20px;
  }
  .wizard-tagline {
    font-size: 13px;
    margin-top: 12px;
  }
  .wizard-product-option {
    padding: 16px 24px;
    gap: 16px;
  }
  .wizard-product-thumb {
    width: 52px;
    height: 52px;
    border-radius: 12px;
  }
  .wizard-confirm-row {
    padding: 12px 0;
    font-size: 16px;
  }
  .wizard-confirm-label {
    font-size: 15px;
  }
  .wizard-confirm-value {
    font-size: 16px;
  }
  .wizard-success-timeline {
    max-width: 400px;
    margin-bottom: 48px;
  }
  .wizard-timeline-num {
    width: 40px;
    height: 40px;
    font-size: 15px;
  }
  .wizard-timeline-text strong {
    font-size: 16px;
  }
  .wizard-timeline-text span {
    font-size: 14px;
  }
  .wizard-help {
    gap: 10px;
    padding-top: 40px;
    margin-top: 56px;
  }
  .wizard-help-text,
  .wizard-help-link,
  .wizard-help-divider {
    font-size: 15px;
  }
}

/* --- Small mobile (≤ 380px) --- */
@media (max-width: 380px) {
  .wizard-container {
    padding: 0 16px 60px;
  }
  .wizard-step-title {
    font-size: 28px;
  }
  .wizard-step-desc {
    margin-bottom: 32px;
  }
  .wizard-input {
    padding: 18px 20px;
    font-size: 16px;
  }
  .wizard-btn-primary,
  .wizard-btn-ghost {
    padding: 20px 24px;
    font-size: 16px;
  }
  .wizard-glasses-card {
    padding: 20px;
  }
  .wizard-confirm-card {
    padding: 20px 24px;
  }
}
