/* ── Wizard overlay ─────────────────────────────────────────────────── */
.wizard-overlay { position: fixed; inset: 0; background: rgba(20,18,16,.55); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(2px); }
.wizard-overlay.hidden { display: none; }

.wizard-panel { background: var(--ps-off-white); border-radius: var(--ps-radius); box-shadow: var(--ps-shadow-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }

/* ── Header ─────────────────────────────────────────────────────────── */
.wizard-header { display: flex; align-items: center; padding: 18px 20px 14px; border-bottom: 1.5px solid var(--ps-border); flex-shrink: 0; }
.wizard-title { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ps-text-primary); flex: 1; }
.wizard-close { background: none; border: none; font-size: 22px; color: var(--ps-text-muted); cursor: pointer; line-height: 1; padding: 0 4px; transition: color .12s; }
.wizard-close:hover { color: var(--ps-text-primary); }

/* ── Progress ───────────────────────────────────────────────────────── */
.wizard-progress { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--ps-border); flex-shrink: 0; }
.wiz-dots { display: flex; gap: 6px; }
.wdot { width: 8px; height: 8px; border-radius: 50%; background: var(--ps-border); transition: all .2s; }
.wdot.active { background: var(--ps-azul); transform: scale(1.25); }
.wdot.done { background: var(--ps-azul); opacity: .4; }
.wiz-step-label { font-size: 11.5px; color: var(--ps-text-muted); font-family: var(--display); }

/* ── Body ───────────────────────────────────────────────────────────── */
.wizard-body { flex: 1; overflow-y: auto; padding: 20px; }
.wiz-question { font-size: 15px; font-weight: 600; color: var(--ps-text-primary); margin-bottom: 16px; line-height: 1.4; }
.wiz-question strong { color: var(--ps-azul-dark); }

/* ── Theme / subtheme tiles ─────────────────────────────────────────── */
.wiz-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.wiz-tile { background: var(--ps-surface); border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm); padding: 14px 12px; cursor: pointer; text-align: left; transition: all .15s; display: flex; flex-direction: column; gap: 4px; }
.wiz-tile:hover { border-color: var(--ps-azul); box-shadow: 0 2px 10px rgba(120,137,144,.15); }
.wiz-tile.selected { border-color: var(--ps-azul); background: var(--ps-azul-faint); }
.wiz-tile-name { font-size: 13px; font-weight: 600; color: var(--ps-text-primary); }
.wiz-tile-count { font-size: 11px; color: var(--ps-text-muted); }

/* ── Flavour list ───────────────────────────────────────────────────── */
.wiz-flavour-list { display: flex; flex-direction: column; gap: 8px; }
.wiz-flavour-item { background: var(--ps-surface); border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm); padding: 12px 14px; cursor: pointer; text-align: left; transition: all .15s; }
.wiz-flavour-item:hover { border-color: var(--ps-azul); box-shadow: 0 2px 8px rgba(120,137,144,.12); }
.wiz-flavour-item.selected { border-color: var(--ps-azul); background: var(--ps-azul-faint); }
.wf-name { font-size: 13.5px; font-weight: 600; color: var(--ps-text-primary); margin-bottom: 2px; }
.wf-desc { font-size: 12px; color: var(--ps-text-muted); line-height: 1.5; }

/* ── Preview ────────────────────────────────────────────────────────── */
.wiz-preview { display: flex; flex-direction: column; gap: 12px; }
.wiz-preview-header { display: flex; align-items: center; gap: 8px; }
.wiz-preview-type { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: var(--ps-radius-xs); border: 1px solid; text-transform: uppercase; letter-spacing: .05em; }
.wiz-name-input { width: 100%; border: 1.5px solid var(--ps-border); border-radius: var(--ps-radius-sm); padding: 9px 12px; font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--ps-text-primary); background: var(--ps-surface); outline: none; transition: border-color .15s; }
.wiz-name-input:focus { border-color: var(--ps-azul); }
.wiz-preview-desc { font-size: 13px; color: var(--ps-text-secondary); line-height: 1.5; }
.wiz-preview-content { font-size: 12.5px; color: var(--ps-text-muted); line-height: 1.65; background: var(--ps-surface); border: 1px solid var(--ps-border); border-radius: var(--ps-radius-sm); padding: 12px 14px; font-style: italic; }
.wiz-actions { display: flex; gap: 10px; margin-top: 4px; flex-wrap: wrap; }
.wiz-action-btn { flex: 1; min-width: 140px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: var(--ps-radius-pill); border: none; font-family: var(--display); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.wiz-action-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.wiz-action-builder { background: var(--ps-azul); color: white; }
.wiz-action-builder:hover { background: var(--ps-azul-dark); box-shadow: 0 4px 14px rgba(120,137,144,.35); transform: translateY(-1px); }
.wiz-action-save { background: var(--ps-surface); color: var(--ps-text-primary); border: 1.5px solid var(--ps-border); }
.wiz-action-save:hover { border-color: var(--ps-border-strong); background: var(--ps-off-white); }

/* ── Empty state ────────────────────────────────────────────────────── */
.wiz-empty { text-align: center; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wiz-empty svg { width: 40px; height: 40px; fill: none; stroke: var(--ps-border-strong); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wiz-empty-title { font-size: 15px; font-weight: 600; color: var(--ps-text-primary); }
.wiz-empty-desc { font-size: 13px; color: var(--ps-text-muted); line-height: 1.6; max-width: 340px; }

/* ── More packs link ────────────────────────────────────────────────── */
.wiz-more-row { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ps-border); }
.wiz-more-label { font-size: 12.5px; color: var(--ps-text-muted); }
.wiz-more-btn { background: none; border: none; cursor: pointer; font-family: var(--display); font-size: 12.5px; font-weight: 600; color: var(--ps-azul); padding: 0; transition: color .15s; }
.wiz-more-btn:hover { color: var(--ps-azul-dark); }

/* ── Footer ─────────────────────────────────────────────────────────── */
.wizard-footer { display: flex; align-items: center; padding: 14px 20px; border-top: 1.5px solid var(--ps-border); flex-shrink: 0; }

/* ── Wizard button in builder bar ───────────────────────────────────── */
.bar-btn-wizard { color: var(--ps-verde-dark) !important; border-color: var(--ps-verde-light) !important; background: var(--ps-verde-faint) !important; font-weight: 600; }
.bar-btn-wizard:hover { background: var(--ps-verde-light) !important; border-color: var(--ps-verde) !important; }

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .wizard-panel { max-height: 85vh; border-radius: var(--ps-radius) var(--ps-radius) 0 0; }
  .wizard-overlay { align-items: flex-end; padding: 0; }
  .wiz-tile-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .wiz-actions { flex-direction: column; }
  .wiz-action-btn { min-width: unset; }
}
