/* ── Resume Builder Wizard ── */

[hidden] {
  display: none !important;
}

/* Shell */
.wizard {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - 56px);
  padding: 32px 20px 48px;
}

.wizard__progress-bar {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(1, 56, 44, 0.06);
  z-index: 10;
}

.wizard__progress-fill {
  height: 100%;
  background: var(--accent, #059669);
  border-radius: 0 3px 3px 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard__counter {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(1, 56, 44, 0.38);
  margin-bottom: 8px;
}

/* Step container */
.wizard__step {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
  animation: wizardStepIn 0.32s ease both;
}

.wizard__step.is-active {
  display: flex;
}

@keyframes wizardStepIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Headings */
.wizard__heading {
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--ink, #01382c);
  text-align: center;
  line-height: 1.35;
  margin: 0 0 8px;
}

.wizard__subtext {
  font-size: 0.86rem;
  color: rgba(1, 56, 44, 0.52);
  text-align: center;
  line-height: 1.55;
  max-width: 440px;
  margin: 0 0 28px;
}

.wizard__subtext strong {
  color: rgba(1, 56, 44, 0.68);
  font-weight: 600;
}

/* Choice cards */
.wizard__choices {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.wizard__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
  min-height: 120px;
  padding: 20px 24px;
  border: 1.5px solid rgba(1, 56, 44, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink, #01382c);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px -4px rgba(1, 56, 44, 0.08);
}

.wizard__choice:hover {
  border-color: rgba(5, 150, 105, 0.28);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -16px rgba(1, 56, 44, 0.18);
}

.wizard__choice.is-selected {
  border-color: rgba(5, 150, 105, 0.4);
  background: rgba(236, 253, 245, 0.96);
  color: var(--accent, #059669);
  box-shadow: 0 12px 28px -16px rgba(5, 150, 105, 0.32);
}

.wizard__choice-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(1, 56, 44, 0.04);
  color: rgba(1, 56, 44, 0.5);
}

.wizard__choice.is-selected .wizard__choice-icon {
  background: rgba(5, 150, 105, 0.1);
  color: var(--accent, #059669);
}

.wizard__choice-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Upload dropzone (Step 1) */
.wizard__upload {
  display: none;
  flex-direction: column;
  align-items: center;
  width: 100%;
  animation: wizardStepIn 0.28s ease both;
}

.wizard__upload.is-visible {
  display: flex;
}

.wizard__upload-heading {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink, #01382c);
  margin: 0 0 16px;
  text-align: center;
}

.wizard__dropzone {
  width: 100%;
  max-width: 420px;
  padding: 36px 24px;
  border: 2px dashed rgba(5, 150, 105, 0.22);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.4) 0%, rgba(255, 255, 255, 0.9) 100%);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wizard__dropzone:hover,
.wizard__dropzone.is-dragover {
  border-color: rgba(5, 150, 105, 0.45);
  background: linear-gradient(180deg, rgba(236, 253, 245, 0.7) 0%, rgba(255, 255, 255, 0.95) 100%);
  box-shadow: 0 8px 24px -12px rgba(5, 150, 105, 0.18);
}

.wizard__dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(5, 150, 105, 0.08);
  color: var(--accent, #059669);
}

.wizard__dropzone-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wizard__dropzone-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(1, 56, 44, 0.6);
  margin-bottom: 4px;
}

.wizard__dropzone-label strong {
  color: var(--accent, #059669);
  font-weight: 600;
}

.wizard__dropzone-hint {
  font-size: 0.76rem;
  color: rgba(1, 56, 44, 0.38);
}

.wizard__dropzone-filename {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(5, 150, 105, 0.06);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #059669);
}

.wizard__dropzone-filename.is-visible {
  display: inline-flex;
}

.wizard__privacy {
  font-size: 0.72rem;
  color: rgba(1, 56, 44, 0.34);
  text-align: center;
  margin-top: 14px;
  max-width: 380px;
  line-height: 1.5;
}

.wizard__privacy svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-right: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wizard__upload-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

/* Text input (Step 2) */
.wizard__input-wrap {
  width: 100%;
  max-width: 420px;
  margin-bottom: 24px;
}

.wizard__input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1.5px solid rgba(1, 56, 44, 0.1);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--ink, #01382c);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.wizard__input:focus {
  border-color: rgba(5, 150, 105, 0.34);
  box-shadow: 0 0 0 4px rgba(131, 230, 189, 0.16);
}

.wizard__input::placeholder {
  color: rgba(1, 56, 44, 0.32);
}

/* Actions row */
.wizard__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.wizard__skip {
  font-size: 0.82rem;
  color: rgba(1, 56, 44, 0.4);
  background: none;
  border: none;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.wizard__skip:hover {
  color: rgba(1, 56, 44, 0.6);
  background: rgba(1, 56, 44, 0.03);
}

.wizard__quick-start {
  margin-top: -8px;
  margin-bottom: 18px;
}

/* Info card (Step 4) */
.wizard__info-card {
  display: none;
  width: 100%;
  max-width: 480px;
  padding: 20px 22px;
  border-radius: 14px;
  border: 1px solid rgba(5, 150, 105, 0.12);
  border-left: 3px solid var(--accent, #059669);
  background: rgba(236, 253, 245, 0.4);
  margin-top: 20px;
  animation: wizardStepIn 0.28s ease both;
}

.wizard__info-card.is-visible {
  display: block;
}

.wizard__info-card p {
  font-size: 0.86rem;
  color: rgba(1, 56, 44, 0.68);
  line-height: 1.6;
  margin: 0 0 12px;
}

.wizard__info-card p:last-of-type {
  margin-bottom: 16px;
}

.wizard__info-source {
  font-size: 0.72rem;
  color: rgba(1, 56, 44, 0.36);
  font-style: italic;
  margin-bottom: 16px;
}

.wizard__info-card .wizard__actions {
  justify-content: flex-end;
}

/* Template grid override (Step 5) */
.wizard__step--wide {
  max-width: 720px;
}

.wizard__template-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  margin-bottom: 24px;
}

/* Transition screen (Step 7) */
.wizard__finale {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding-top: 16px;
}

.wizard__finale-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(5, 150, 105, 0.08);
  color: var(--accent, #059669);
}

.wizard__finale-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Toast */
.wizard__toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--ink, #01382c);
  color: #ecfff9;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 100;
}

.wizard__toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Exit animation */
.wizard--exiting {
  animation: wizardFadeOut 0.35s ease forwards;
}

@keyframes wizardFadeOut {
  to { opacity: 0; transform: translateY(-12px); }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .wizard { padding: 24px 16px 40px; }
  .wizard__choices { flex-direction: column; align-items: stretch; }
  .wizard__choice { min-width: 0; min-height: 80px; flex-direction: row; padding: 16px 20px; }
  .wizard__template-grid { grid-template-columns: repeat(2, 1fr); }
  .wizard__step--wide { max-width: 100%; }
}

@media (max-width: 420px) {
  .wizard__heading { font-size: 1.1rem; }
  .wizard__dropzone { padding: 28px 16px; }
}
