/* ============================================================
   WIZARD MODAL — TCC com Roberta
   Popup multi-etapas para solicitação de orçamento
   ============================================================ */

/* ========== OVERLAY ========== */
.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wizard-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ========== CONTAINER ========== */
.wizard-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.wizard-overlay.open .wizard-container {
  transform: translateY(0) scale(1);
}

/* ========== CLOSE BUTTON ========== */
.wizard-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-default);
}

.wizard-close:hover {
  background: #e8e6e1;
  color: var(--color-text-primary);
}

.wizard-close i {
  width: 20px;
  height: 20px;
}

/* ========== PROGRESS BAR ========== */
.wizard-progress {
  padding: 28px 40px 0;
  flex-shrink: 0;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 8px;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 40px;
  right: 40px;
  height: 2px;
  background: var(--color-border);
  z-index: 0;
}

.wizard-steps::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 40px;
  height: 2px;
  background: var(--color-accent);
  z-index: 1;
  transition: width 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  width: 0%;
}

.wizard-steps.step-1::after { width: 0%; }
.wizard-steps.step-2::after { width: calc(33.33% - 26px); }
.wizard-steps.step-3::after { width: calc(66.66% - 26px); }
.wizard-steps.step-4::after { width: calc(100% - 80px); }

.wiz-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  cursor: default;
}

.wiz-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--transition-default);
  border: 2px solid transparent;
}

.wiz-step.active .wiz-num {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 2px 8px rgba(201, 149, 107, 0.3);
}

.wiz-step.done .wiz-num {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.wiz-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color var(--transition-default);
}

.wiz-step.active .wiz-label {
  color: var(--color-accent);
  font-weight: 600;
}

.wiz-step.done .wiz-label {
  color: var(--color-text-secondary);
}

/* ========== PANELS (Cada passo) ========== */
.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 40px 20px;
  min-height: 280px;
}

.wiz-panel {
  display: none;
  animation: wizFadeIn 0.35s ease;
}

.wiz-panel.active {
  display: block;
}

@keyframes wizFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wiz-panel h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--color-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.wiz-panel > p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ========== STEP 1: SERVICE CARDS (no wizard) ========== */
.wiz-panel .service-selector {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wiz-panel .service-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  gap: 14px;
  text-align: left;
}

.wiz-panel .service-card .srv-check {
  position: static;
  flex-shrink: 0;
}

.wiz-panel .service-card .srv-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.wiz-panel .service-card .srv-title {
  font-size: 14px;
  flex: 1;
}

.wiz-panel .service-card .srv-desc {
  font-size: 12px;
  flex-shrink: 0;
  max-width: 180px;
  text-align: right;
}

/* ========== STEP 1.5: MENTORIA SUB-CARDS ========== */
.wiz-mentoria-subcards {
  animation: wizFadeIn 0.35s ease;
}

.wiz-subcards-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
}

.wiz-subcard-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  font-family: var(--font-body);
  transition: all 0.2s;
  width: fit-content;
}

.wiz-subcard-back:hover {
  color: var(--color-accent-hover);
  gap: 8px;
}

.wiz-subcard-back i {
  width: 18px;
  height: 18px;
}

.wiz-subcards-title {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--color-primary);
  margin: 0;
}

.wiz-subcards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wiz-subcard {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  padding: 14px 20px;
  gap: 14px;
  text-align: left;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--transition-default);
}

.wiz-subcard:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  transform: translateX(3px);
}

.wiz-subcard.active {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.wiz-subcard .srv-icon {
  width: 28px;
  height: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
}

.wiz-subcard .srv-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  flex: 1;
}

.wiz-subcard .srv-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  max-width: 180px;
  text-align: right;
}

@media (max-width: 480px) {
  .wiz-subcard {
    padding: 10px 14px;
    gap: 10px;
  }

  .wiz-subcard .srv-icon {
    width: 22px;
    height: 22px;
  }

  .wiz-subcard .srv-title {
    font-size: 13px;
  }

  .wiz-subcard .srv-desc {
    display: none;
  }
}

/* ========== CAMPO "OUTROS SERVIÇOS" ========== */
.wiz-other-field {
  display: none;
  margin-top: 4px;
  padding: 14px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.wiz-other-field.visible {
  display: block;
}

.wiz-other-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--color-text-primary);
  background: #fff;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.wiz-other-field textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 149, 107, 0.12);
}

.wiz-other-field textarea::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

/* ========== STEP 2: CHIPS (prazo) ========== */
.wiz-panel .chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wiz-panel .chip {
  padding: 12px 22px;
  font-size: 14px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 100px;
}

/* ========== STEP 3: FORM FIELDS ========== */
.wiz-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wiz-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wiz-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  font-family: var(--font-body);
}

.wiz-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-primary);
  background: #fff;
  transition: all 0.2s;
  outline: none;
  box-sizing: border-box;
}

.wiz-field input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 149, 107, 0.12);
}

.wiz-field input::placeholder {
  color: var(--color-text-muted);
}

.wiz-field .field-error {
  font-size: 12px;
  color: #dc2626;
  display: none;
}

.wiz-field.error input {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.wiz-field.error .field-error {
  display: block;
}

/* ========== STEP 4: REVIEW + ORIGEM + DETALHAR ========== */
.wiz-review {
  margin-top: 18px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  border: 1px solid var(--color-border);
}

.wiz-review-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 12px;
  font-family: var(--font-body);
}

.wiz-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  font-family: var(--font-body);
}

.wiz-review-row:last-child {
  border-bottom: none;
}

.wiz-review-label {
  color: var(--color-text-muted);
  font-size: 13px;
}

.wiz-review-value {
  color: var(--color-text-primary);
  font-weight: 500;
  text-align: right;
  max-width: 60%;
}

.wiz-review-value.empty {
  color: var(--color-text-muted);
  font-style: italic;
  font-weight: 400;
}

/* ========== CAMPO DETALHAR MAIS (PASSO 4) ========== */
.wiz-detalhe {
  margin-top: 18px;
}

.wiz-detalhe label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  font-family: var(--font-body);
  margin-bottom: 6px;
}

.wiz-detalhe textarea {
  width: 100%;
  min-height: 80px;
  padding: 14px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text-primary);
  background: #fff;
  resize: vertical;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
  line-height: 1.5;
}

.wiz-detalhe textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 149, 107, 0.12);
}

.wiz-detalhe textarea::placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

.wiz-detalhe .wiz-detalhe-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ========== NAVIGATION ========== */
.wizard-footer {
  flex-shrink: 0;
  padding: 16px 40px 24px;
  border-top: 1px solid var(--color-border);
  background: #fff;
}

.wiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wiz-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--transition-default);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  line-height: 1;
}

.wiz-btn i {
  width: 18px;
  height: 18px;
}

.wiz-prev {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1.5px solid var(--color-border);
}

.wiz-prev:hover:not(:disabled) {
  border-color: var(--color-accent-light);
  color: var(--color-text-primary);
  background: rgba(201, 149, 107, 0.04);
}

.wiz-prev:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.wiz-next {
  background: var(--color-accent);
  color: #fff;
  margin-left: auto;
}

.wiz-next:hover:not(:disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201, 149, 107, 0.25);
}

.wiz-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Botão de envio final (WhatsApp) — dentro do .wiz-nav no passo 4 */
.wiz-submit {
  padding: 12px 28px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-default);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  line-height: 1;
  margin-left: auto;
}

.wiz-submit:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

.wiz-submit:active {
  transform: translateY(0);
}

.wiz-submit i {
  width: 20px;
  height: 20px;
}

.wiz-trust {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.wiz-trust i {
  width: 14px;
  height: 14px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .wizard-overlay {
    padding: 0;
    align-items: stretch;
  }

  .wizard-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
    transform: translateY(40px) scale(1);
    display: flex;
    flex-direction: column;
  }

  .wizard-overlay.open .wizard-container {
    transform: translateY(0);
  }

  .wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 16px;
    min-height: 240px;
  }

  .wizard-footer {
    flex-shrink: 0;
    padding: 14px 24px 20px;
  }

  .wizard-progress {
    padding: 24px 24px 0;
    flex-shrink: 0;
  }

  .wiz-panel .service-selector {
    gap: 6px;
  }

  .wiz-panel .service-card {
    padding: 12px 16px;
    gap: 10px;
  }

  .wiz-panel .service-card .srv-icon {
    width: 22px;
    height: 22px;
  }

  .wiz-panel .service-card .srv-title {
    font-size: 13px;
  }

  .wiz-panel .service-card .srv-desc {
    font-size: 11px;
    max-width: 140px;
  }

  .wiz-panel .chip {
    padding: 10px 16px;
    font-size: 13px;
    min-width: 80px;
  }

  .wiz-panel h3 {
    font-size: 19px;
  }

  .wiz-label {
    font-size: 10px;
  }

  .wiz-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .wizard-steps::before,
  .wizard-steps::after {
    top: 14px;
  }
}

@media (max-width: 480px) {
  .wizard-body {
    padding: 16px 18px 12px;
    min-height: 200px;
  }

  .wizard-footer {
    padding: 12px 18px 16px;
  }

  .wiz-panel .service-selector {
    gap: 6px;
  }

  .wiz-panel .service-card {
    padding: 10px 14px;
    gap: 8px;
  }

  .wiz-panel .service-card .srv-icon {
    width: 20px;
    height: 20px;
  }

  .wiz-panel .service-card .srv-title {
    font-size: 12px;
  }

  .wiz-panel .service-card .srv-desc {
    display: none;
  }

  .wiz-panel .chip {
    padding: 8px 14px;
    font-size: 12px;
    min-width: 70px;
  }

  .wiz-panel h3 {
    font-size: 17px;
  }

  .wiz-btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .wiz-submit {
    padding: 14px 24px;
    font-size: 15px;
  }

  .wiz-detalhe textarea {
    min-height: 70px;
    font-size: 14px;
  }

  .wiz-panel > p {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .wizard-steps::before,
  .wizard-steps::after {
    display: none;
  }
  
  .wiz-step {
    gap: 4px;
  }
}
