/* ============================================================
   wizard.css — Flex Clean | Cadastro Wizard
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --fc-blue: #0066CC;
  --fc-blue-d: #0052A3;
  --fc-sky: #E8F4FD;
  --fc-green: #16A34A;
  --fc-red: #DC2626;
  --fc-yellow: #CA8A04;
  --fc-gray: #6B7280;
  --fc-border: #D1D5DB;
  --fc-bg: #F8FAFC;
  --fc-card: #FFFFFF;
  --fc-radius: 12px;
  --fc-shadow: 0 4px 24px rgba(0, 0, 0, .08);
  --fc-trans: .2s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--fc-bg);
  color: #1F2937;
  min-height: 100vh;
}

/* ── Cabeçalho ── */
.fc-header {
  background: linear-gradient(135deg, var(--fc-blue) 0%, #0099E6 100%);
  padding: 20px 16px 56px;
  color: #fff;
}

.fc-header-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  /* Mantém a logo à frente do card branco */
}

.fc-header-content a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fc-header-logo {
  height: 78px;
  width: auto;
  flex-shrink: 0;
}

/* Responsividade da logo no cabeçalho */
@media (max-width: 640px) {
  .fc-header-logo {
    height: 58px;
    /* Ajusta o tamanho no mobile para não quebrar o layout horizontal */
  }

  .fc-header h1 {
    font-size: 1.2rem;
    /* Texto ligeiramente menor no celular para manter lado a lado */
  }
}

.fc-header-text {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.fc-header h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.fc-header p {
  font-size: .85rem;
  opacity: .85;
}

/* ── Card principal ── */
.fc-card {
  background: var(--fc-card);
  border-radius: var(--fc-radius);
  box-shadow: var(--fc-shadow);
  margin: -36px 16px 24px;
  padding: 28px 20px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  top: -36px;
}

/* ── Barra de progresso ── */
.fc-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  position: relative;
  margin-left: 45px;
  margin-right: 45px;
}

.fc-progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fc-border);
  transform: translateY(-50%);
  z-index: 0;
}

.fc-progress-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 2px;
  background: var(--fc-blue);
  transform: translateY(-50%);
  z-index: 0;
  transition: width .4s ease;
}

.fc-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--fc-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--fc-gray);
  z-index: 1;
  transition: all var(--fc-trans);
  flex-shrink: 0;
}

.fc-step-dot.active {
  border-color: var(--fc-blue);
  background: var(--fc-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0, 102, 204, .15);
}

.fc-step-dot.done {
  border-color: var(--fc-green);
  background: var(--fc-green);
  color: #fff;
}

/* ── Labels dos passos ── */
.fc-step-labels {
  position: relative;
  height: 18px;
  margin-top: 8px;
  margin-bottom: 24px;
  margin-left: 45px;
  margin-right: 45px;
}

@media (max-width: 480px) {

  .fc-progress-bar,
  .fc-step-labels {
    margin-left: 35px;
    margin-right: 35px;
  }
}

.fc-step-labels span {
  font-size: .68rem;
  color: var(--fc-gray);
  text-align: center;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  transition: color var(--fc-trans), left .4s ease;
}

.fc-step-labels span.active {
  color: var(--fc-blue);
  font-weight: 600;
}

.fc-step-labels span.done {
  color: var(--fc-green);
}

/* ── Título do passo ── */
.fc-step-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-blue);
  margin-bottom: 4px;
}

.fc-step-desc {
  font-size: .82rem;
  color: var(--fc-gray);
  margin-bottom: 20px;
}

/* ── Campos do formulário ── */
.fc-field {
  margin-bottom: 16px;
}

.fc-label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.fc-label .req {
  color: var(--fc-red);
  margin-left: 2px;
}

.fc-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--fc-border);
  border-radius: 8px;
  font-size: .95rem;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--fc-trans), box-shadow var(--fc-trans);
  background: #fff;
  -webkit-appearance: none;
}

.fc-input:focus {
  outline: none;
  border-color: var(--fc-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 204, .12);
}

.fc-input.valid {
  border-color: var(--fc-green);
}

.fc-input.invalid {
  border-color: var(--fc-red);
}

.fc-input:read-only {
  background: #F3F4F6;
  color: var(--fc-gray);
}

/* Input com ícone de status */
.fc-input-wrap {
  position: relative;
}

.fc-input-wrap .fc-input {
  padding-right: 40px;
}

.fc-input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--fc-trans);
}

.fc-input.valid~.fc-input-icon.ok {
  opacity: 1;
  color: var(--fc-green);
}

.fc-input.invalid~.fc-input-icon.err {
  opacity: 1;
  color: var(--fc-red);
}

.fc-input-icon.load {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--fc-blue);
  border-radius: 50%;
  animation: spin-icon .7s linear infinite;
  display: block;
  opacity: 0;
  box-sizing: border-box;
}

.fc-input.loading~.fc-input-icon.load {
  opacity: 1;
}

.fc-input.loading~.fc-input-icon.ok,
.fc-input.loading~.fc-input-icon.err {
  opacity: 0 !important;
}

@keyframes spin-icon {
  from {
    transform: translateY(-50%) rotate(0deg);
  }

  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Mensagem de erro inline */
.fc-error-msg {
  font-size: .75rem;
  color: var(--fc-red);
  margin-top: 4px;
  display: none;
}

.fc-error-msg.show {
  display: block;
}

/* ── Grid 2 colunas ── */
.fc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .fc-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* ── Botões ── */
.fc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all var(--fc-trans);
  -webkit-tap-highlight-color: transparent;
}

.fc-btn-primary {
  background: linear-gradient(135deg, var(--fc-blue) 0%, #0088DD 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 102, 204, .3);
}

.fc-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, .4);
}

.fc-btn-primary:active {
  transform: translateY(0);
}

.fc-btn-secondary {
  background: #F3F4F6;
  color: #374151;
}

.fc-btn-secondary:hover {
  background: #E5E7EB;
}

.fc-btn-success {
  background: linear-gradient(135deg, #15803D, #16A34A);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, .3);
}

.fc-btn-success:hover {
  transform: translateY(-1px);
}

.fc-btn-whats {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 211, 102, .3);
}

.fc-btn-group {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.fc-btn-group .fc-btn {
  flex: 1;
}

/* ── Toast / Alerta ── */
.fc-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1F2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: .88rem;
  font-weight: 500;
  max-width: calc(100vw - 32px);
  z-index: 9999;
  opacity: 0;
  transition: all .3s ease;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fc-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.fc-toast.success {
  background: #15803D;
}

.fc-toast.warning {
  background: #B45309;
}

.fc-toast.error {
  background: #B91C1C;
}

/* ── Alert box inline (cadastro existente) ── */
.fc-alert-box {
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  display: none;
}

.fc-alert-box.show {
  display: block;
}

.fc-alert-box p {
  font-size: .85rem;
  color: #78350F;
  margin-bottom: 10px;
}

.fc-alert-box strong {
  display: block;
  font-size: .9rem;
  color: #92400E;
  margin-bottom: 8px;
}

/* ── Mapa ── */
.fc-map-wrap {
  border-radius: 10px;
  overflow: hidden;
  height: 220px;
  border: 1.5px solid var(--fc-border);
  margin-bottom: 12px;
  display: none;
}

.fc-map-wrap.show {
  display: block;
}

#fc-map,
#fc-map2 {
  width: 100%;
  height: 100%;
}

.fc-map-hint {
  font-size: .75rem;
  color: var(--fc-gray);
  text-align: center;
  margin-bottom: 12px;
  display: none;
}

.fc-map-hint.show {
  display: block;
}

/* ── Toggle 2º endereço ── */
.fc-toggle-end {
  background: #EFF6FF;
  border: 1.5px dashed #93C5FD;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  font-size: .88rem;
  font-weight: 500;
  color: var(--fc-blue);
  transition: background var(--fc-trans);
}

.fc-toggle-end:hover {
  background: #DBEAFE;
}

.fc-toggle-end input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--fc-blue);
  cursor: pointer;
}

.fc-end2-wrap {
  display: none;
  margin-top: 20px;
}

.fc-end2-wrap.show {
  display: block;
}

.fc-divider {
  border: none;
  border-top: 1.5px dashed var(--fc-border);
  margin: 20px 0;
}

/* ── Resumo (step 4) ── */
.fc-summary-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
  font-size: .88rem;
}

.fc-summary-item:last-child {
  border-bottom: none;
}

.fc-summary-label {
  color: var(--fc-gray);
  min-width: 110px;
}

.fc-summary-value {
  font-weight: 500;
  color: #1F2937;
}

.fc-summary-section {
  background: #F8FAFC;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}

.fc-summary-section h4 {
  font-size: .8rem;
  font-weight: 700;
  color: var(--fc-blue);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

/* ── Loading spinner ── */
.fc-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.fc-spinner.show {
  display: block;
}

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

/* ── Steps container ── */
.fc-step {
  display: none;
}

.fc-step.active {
  display: block;
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ── Tela de sucesso ── */
.fc-success-screen {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.fc-success-screen.show {
  display: block;
}

.fc-success-icon {
  width: 72px;
  height: 72px;
  background: #DCFCE7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 2rem;
}

.fc-success-screen h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--fc-green);
  margin-bottom: 8px;
}

.fc-success-screen p {
  font-size: .88rem;
  color: var(--fc-gray);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Badge tipo documento ── */
.fc-doc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--fc-sky);
  color: var(--fc-blue);
  font-size: .75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* ── Rodapé fixo de segurança ── */
.fc-footer-safe {
  text-align: center;
  font-size: .72rem;
  color: #9CA3AF;
  padding: 8px 16px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Modal ── */
.fc-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fc-modal.show {
  display: flex;
  animation: modalFadeIn 0.3s ease;
}

.fc-modal-content {
  background: var(--fc-card);
  border-radius: var(--fc-radius);
  padding: 32px 24px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  animation: modalSlideUp 0.3s ease;
}

.fc-modal-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.fc-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--fc-blue);
  margin-bottom: 12px;
}

.fc-modal-text {
  font-size: 0.9rem;
  color: var(--fc-gray);
  line-height: 1.5;
  margin-bottom: 16px;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalSlideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Sugestões do Autocomplete do Google */
.pac-container {
  z-index: 100000 !important;
  border-radius: var(--fc-radius);
  font-family: inherit;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 1px solid #E5E7EB;
  margin-top: 4px;
}

.pac-item {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--fc-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pac-item:hover {
  background-color: #F9FAFB;
}

.pac-item-query {
  font-size: 0.88rem;
  color: #1F2937;
}