/* ---- Backdrop ---- */
.wizard-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
}

/* ---- Modal ---- */
.wizard-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1051;
  width: 480px;
  max-width: calc(100vw - 2rem);
  background: var(--color-background-primary, #fff);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---- Header ---- */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0;
}

.wizard-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.wizard-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border-secondary, #e2e8f0);
  transition: background 0.2s, width 0.2s;
}

.wizard-dot.active {
  background: #378ADD;
  width: 20px;
  border-radius: 4px;
}

.wizard-dot.done {
  background: #4ade80;
}

.wizard-controls {
  display: flex;
  gap: 4px;
}

.wizard-minimize-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-background-secondary, #f3f4f6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #6b7280);
  font-size: 13px;
  transition: background 0.15s;
}

.wizard-minimize-btn:hover {
  background: var(--color-border-secondary, #e2e8f0);
}

/* ---- Body ---- */
.wizard-body {
  padding: 1.5rem 2rem 1rem;
}

.wizard-panel {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wizard-panel[hidden] {
  display: none;
}

.wizard-panel__icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.wizard-panel__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary, #111827);
  margin: 0 0 0.25rem;
}

.wizard-panel__sub {
  font-size: 14px;
  color: var(--color-text-secondary, #6b7280);
  line-height: 1.6;
  margin: 0 0 1rem;
}

/* ---- Demo link ---- */
.wizard-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #378ADD;
  text-decoration: none;
  padding: 0.5rem 0;
}

.wizard-demo-link:hover {
  text-decoration: underline;
}

/* ---- Forms ---- */
.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.wizard-form label {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary, #111827);
  margin-bottom: 2px;
  display: block;
}

.wizard-form input[type="text"],
.wizard-form input[type="email"],
.wizard-form textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border-secondary, #e2e8f0);
  border-radius: 8px;
  font-size: 14px;
  color: var(--color-text-primary, #111827);
  background: var(--color-background-primary, #fff);
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.wizard-form input:focus,
.wizard-form textarea:focus {
  outline: none;
  border-color: #378ADD;
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
}

.wizard-form textarea {
  resize: vertical;
  min-height: 72px;
  font-family: inherit;
}

.wizard-form__error {
  font-size: 12px;
  color: #ef4444;
  margin: 0;
}

/* ---- Footer ---- */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--color-border-tertiary, #f1f5f9);
  margin-top: 0.5rem;
}

.wizard-skip-btn {
  font-size: 13px;
  color: var(--color-text-tertiary, #9ca3af);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wizard-skip-btn:hover {
  color: var(--color-text-secondary, #6b7280);
}

.wizard-next-btn {
  background: #378ADD;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.25rem;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.wizard-next-btn:hover {
  background: #2b6cb0;
}

.wizard-next-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---- Minimized pill ---- */
.wizard-pill {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1050;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-background-primary, #fff);
  border: 1px solid var(--color-border-secondary, #e2e8f0);
  border-radius: 999px;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.wizard-pill:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16);
}

.wizard-pill__text {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary, #111827);
  white-space: nowrap;
}

.wizard-pill__expand {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #378ADD;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

/* ---- Step counter label ---- */
.wizard-step-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary, #9ca3af);
  margin: 0;
}

/* ---- Done state ---- */
.wizard-panel--done .wizard-panel__icon {
  font-size: 2.5rem;
}

@media (max-width: 520px) {
  .wizard-modal {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: 16px 16px 0 0;
  }
}
