/* SREB Wizard (Cadastro Inteligente): estilos compartilhados entre Fluxo A e Fluxo B */

/* Barra/indicador de progresso "Passo X de 5" */
.wizard-progress-track {
  height: 6px;
  border-radius: 999px;
  background: rgb(var(--color-outline-variant) / 0.4);
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: rgb(var(--color-secondary));
  transition: width 0.4s ease;
}

.wizard-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(var(--color-outline-variant));
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.wizard-step-dot.is-done {
  background: rgb(var(--color-secondary));
}

.wizard-step-dot.is-current {
  background: rgb(var(--color-secondary));
  transform: scale(1.3);
}

/* Painéis de passo */
.wizard-step {
  display: none;
}

.wizard-step.is-active {
  display: block;
  animation: wizard-step-in 0.35s ease both;
}

@keyframes wizard-step-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Cards grandes de opção (Passo 2 dos dois fluxos) */
.wizard-option-card {
  cursor: pointer;
  position: relative;
}

.wizard-option-card .wizard-option-badge {
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.wizard-option-card.is-selected .wizard-option-badge {
  opacity: 1;
  transform: scale(1);
}

.wizard-option-card[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* Chips de multi-seleção (Especialidades, Objetivos, etc.) */
.wizard-chip.is-selected {
  background: rgb(var(--color-secondary));
  border-color: rgb(var(--color-secondary));
  color: white;
}

/* Mensagens de erro amigáveis por campo */
.wizard-field-error {
  display: none;
  align-items: center;
  gap: 4px;
}

.wizard-field-error.is-visible {
  display: flex;
}

.wizard-field.has-error input,
.wizard-field.has-error select,
.wizard-field.has-error textarea {
  border-color: rgb(var(--color-error));
}

/* Barra de ações fixa no mobile */
.wizard-actions-bar {
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* Cards flutuantes do mockup institucional (mesmo padrão de criar-conta.css) */
@keyframes wizard-float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.wizard-float-card {
  animation: wizard-float-card 4.5s ease-in-out infinite;
}

.wizard-float-card:nth-child(2) { animation-delay: 0.6s; }
.wizard-float-card:nth-child(3) { animation-delay: 1.2s; }
.wizard-float-card:nth-child(4) { animation-delay: 1.8s; }
.wizard-float-card:nth-child(5) { animation-delay: 2.4s; }

@keyframes wizard-fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.wizard-fade-in-up {
  animation: wizard-fade-in-up 0.5s ease-out both;
}

/* Overlay "Preparando sua experiência personalizada..." */
.wizard-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgb(var(--color-background));
}

.wizard-loading-overlay.is-visible {
  display: flex;
}

.wizard-loading-spinner {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 3px solid rgb(var(--color-outline-variant) / 0.5);
  border-top-color: rgb(var(--color-secondary));
  animation: wizard-spin 0.8s linear infinite;
}

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

.wizard-loading-message {
  animation: wizard-fade-in-up 0.4s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .wizard-float-card,
  .wizard-fade-in-up,
  .wizard-loading-message,
  .wizard-step.is-active {
    animation: none;
  }

  .wizard-loading-spinner {
    animation: none;
  }
}

/* ---- Slider de filtro (controle deslizante) ---- */
.suimob-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: rgb(var(--color-outline-variant));
  outline: none;
  cursor: pointer;
}

.suimob-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(var(--color-secondary));
  border: 3px solid rgb(var(--color-surface-container-lowest));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.suimob-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(var(--color-secondary));
  border: 3px solid rgb(var(--color-surface-container-lowest));
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.suimob-slider::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: transparent;
}

.suimob-slider:hover::-webkit-slider-thumb,
.suimob-slider:active::-webkit-slider-thumb {
  transform: scale(1.15);
}

.suimob-slider:focus-visible {
  outline: 2px solid rgb(var(--color-secondary));
  outline-offset: 3px;
}

/* ---- Switch de filtro (liga/desliga) ---- */
.suimob-switch-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.suimob-switch-track {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgb(var(--color-outline-variant));
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.suimob-switch-track::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgb(var(--color-surface-container-lowest));
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}

.suimob-switch-input:checked + .suimob-switch-track {
  background: rgb(var(--color-secondary));
}

.suimob-switch-input:checked + .suimob-switch-track::before {
  transform: translateX(18px);
}

.suimob-switch-input:focus-visible + .suimob-switch-track {
  outline: 2px solid rgb(var(--color-secondary));
  outline-offset: 2px;
}
