/* ===============================
   RESET / BASE
=============================== */
* {
  box-sizing: border-box;
}

body {
  background: #f3f4f6;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #111827;
}

/* ===============================
   STEPPER
=============================== */
.wizard-steps {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.wizard-steps .step {
  padding: 8px 14px;
  border-radius: 20px;
  background: #e5e7eb;
  font-size: 13px;
  color: #374151;
  transition: all 0.2s ease;
}

.wizard-steps .step.active {
  background: #007aff;
  color: #fff;
  font-weight: 600;
}

/* ===============================
   CARD (STEP)
=============================== */
.wizard-step {
  display: none;
  background: #fff;
  padding: 30px;
  border-radius: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.03);
}

.wizard-step.active {
  display: block;
}

/* ===============================
   FORM GROUP
=============================== */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full {
  grid-column: span 2;
}

/* ===============================
   LABELS
=============================== */
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

/* ===============================
   INPUTS / SELECTS
=============================== */
.form-group input,
.form-group select,
.form-group textarea {
  height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #fff;
  transition: all 0.2s ease;
}

/* textarea */
.form-group textarea {
  height: auto;
  min-height: 100px;
  padding: 12px;
}

/* focus */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #007aff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.15);
}

/* destaque (marca/modelo) */
.form-group.destaque input {
  font-size: 15px;
  font-weight: 600;
}

/* ===============================
   RESUMO
=============================== */
.resumo-veiculo {
  background: #f9fafb;
  border: 1px solid #eef2f7;
  padding: 18px 20px;
  border-radius: 14px;
  margin-bottom: 25px;
  font-size: 17px;
  font-weight: 600;
}

/* ===============================
   BOTÕES (APPLE STYLE)
=============================== */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 20px;
  padding-bottom: 10px;
  border-top: 1px solid #f1f5f9;
}

/* base */
.form-actions button {
  min-width: 140px;
  height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
}

/* voltar */
.prev-step {
  background: #f3f4f6;
  color: #111827;
}

.prev-step:hover {
  background: #e5e7eb;
}

/* próximo */
.next-step {
  background: #007aff;
  color: #fff;
  box-shadow:
    0 4px 10px rgba(0, 122, 255, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.next-step:hover {
  transform: translateY(-1px);
  box-shadow:
    0 6px 16px rgba(0, 122, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.next-step:active {
  transform: scale(0.97);
}

/* seta */
.next-step::after {
  content: "→";
  margin-left: 8px;
  transition: 0.2s;
}

.next-step:hover::after {
  margin-left: 12px;
}

/* disabled */
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===============================
   UPLOAD
=============================== */
.upload-area {
  border: 2px dashed #d1d5db;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  border-radius: 12px;
  margin-bottom: 20px;
  transition: 0.2s;
}

.upload-area:hover {
  background: #f9fafb;
}

#preview {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===============================
   LOADING
=============================== */
#placa-loading {
  margin-top: 10px;
  font-size: 13px;
  color: #6b7280;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

/* ===============================
   FEEDBACK
=============================== */
.input-success {
  border: 2px solid #22c55e !important;
  background: #f0fdf4;
}

/* ===============================
   STEP PLACA
=============================== */
.step-placa {
  text-align: center;
}

.placa-box input {
  font-size: 28px;
  text-align: center;
  height: 60px;
  border-radius: 14px;
  border: 2px solid #d1d5db;
  width: 280px;
  margin: 0 auto;
  display: block;
}

.subtitulo {
  color: #6b7280;
  margin-bottom: 20px;
}

/* ===============================
   TITULOS
=============================== */
h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
}

.form-subsection {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e5e7eb;
}

.sub-label {
  font-size: 12px;
  color: #6b7280;
  display: block;
  margin-bottom: 10px;
}

.form-hint {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 12px;
}

.vehicle-header {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 25px;
}

.vehicle-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0;
}

.vehicle-sub {
  font-size: 13px;
  color: #9ca3af;
}

/* badge */
.badge-auto {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.vehicle-header {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 25px;
}

.vehicle-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 8px 0;
}

.vehicle-sub {
  font-size: 13px;
  color: #9ca3af;
}

/* badge */
.badge-auto {
  display: inline-block;
  background: #16a34a;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.form-group.auto label::after {
  content: "Auto";
  margin-left: 6px;
  font-size: 10px;
  background: #e0f2fe;
  color: #0369a1;
  padding: 2px 6px;
  border-radius: 4px;
}

.form-group.destaque {
  background: #f8fafc;
  padding: 10px;
  border-radius: 10px;
}

.form-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  padding-bottom: 1px;
  margin-bottom: 14px;
  transition: 0.2s;
}

.form-section:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.form-section h3::before {
  content: "•";
  color: #007aff;
  margin-right: 6px;
}

.form-section h3::before {
  content: "•";
  color: #007aff;
  margin-right: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.form-group input,
.form-group select {
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.next-step {
  background: linear-gradient(135deg, #007aff, #2563eb);
  color: #fff;
  font-weight: 600;
}

.form-hint {
  background: #fef9c3;
  border: 1px solid #fde68a;
  padding: 10px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
}

.form-score {
  margin-bottom: 20px;
}

.score-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: #374151;
}

.score-bar {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

#score-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transition: width 0.4s ease;
}

.section-status {
  font-size: 11px;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 6px;
  background: #fee2e2;
  color: #b91c1c;
}

.section-status.ok {
  background: #dcfce7;
  color: #166534;
}

.opcionais-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.opcional-item {
  cursor: pointer;
}

.opcional-item input {
  display: none;
}

.opcional-item span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  transition: 0.2s;
}

/* selecionado */
.opcional-item input:checked + span {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
}

.toggle {
  position: relative;
  width: 40px;
  height: 22px;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  background: #d1d5db;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
  background: #007aff;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

.opcional-item span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  font-size: 13px;
  background: #fff;
  transition: all 0.2s ease;
}

/* hover */
.opcional-item span:hover {
  border-color: #007aff;
  color: #007aff;
}

/* selecionado */
.opcional-item input:checked + span {
  background: #007aff;
  color: #fff;
  border-color: #007aff;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25);
}

.opcional-item input:checked + span::before {
  content: "✓ ";
  font-weight: bold;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
  align-items: start; /* impede esticar altura */
}

/* linha */
.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #eef2f7;
}

/* label */
.toggle-group label {
  font-size: 13px;
  color: #374151;
}

/* toggle */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
}

.toggle input {
  display: none;
}

.toggle-slider {
  position: absolute;
  background: #d1d5db;
  border-radius: 999px;
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 2px;
  left: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* ativo */
.toggle input:checked + .toggle-slider {
  background: #007aff;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-card {
  display: block;
  cursor: pointer;
}

.toggle-card input {
  display: none;
}

/* card */
.toggle-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  min-height: 38px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: all 0.2s ease;
}

/* texto */
.toggle-text {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
}

/* hover */
.toggle-card:hover .toggle-content {
  border-color: #007aff;
  background: #f9fafb;
}

/* selecionado */
.toggle-card input:checked + .toggle-content {
  border-color: #007aff;
  background: #eff6ff;
}

/* toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-slider {
  position: absolute;
  background: #d1d5db;
  border-radius: 999px;
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 2px;
  left: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* ativo */
.toggle-card input:checked + .toggle-content .toggle-slider {
  background: #007aff;
}

.toggle-card input:checked + .toggle-content .toggle-slider::before {
  transform: translateX(20px);
}

.toggle-card {
  display: block;
  cursor: pointer;
}

.toggle-card input {
  display: none;
}

/* card */
.toggle-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  transition: all 0.2s ease;
}

/* texto */
.toggle-text {
  font-size: 14px;
  color: #111827;
  font-weight: 500;
}

/* hover */
.toggle-card:hover .toggle-content {
  border-color: #007aff;
  background: #f9fafb;
}

/* selecionado */
.toggle-card input:checked + .toggle-content {
  border-color: #007aff;
  background: #eff6ff;
}

/* toggle switch */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-slider {
  position: absolute;
  background: #d1d5db;
  border-radius: 999px;
  width: 100%;
  height: 100%;
  transition: 0.3s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 2px;
  left: 2px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
}

/* ativo */
.toggle-card input:checked + .toggle-content .toggle-slider {
  background: #007aff;
}

.toggle-card input:checked + .toggle-content .toggle-slider::before {
  transform: translateX(20px);
}

.form-group.no-label > label:first-child {
  display: none;
}

/* ===============================
   MOBILE RESPONSIVE
=============================== */
@media (max-width: 768px) {
  /* ===============================
       GRID / LAYOUT
    =============================== */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .wizard-step {
    padding: 20px 16px;
    border-radius: 12px;
  }

  /* ===============================
       HEADER VEÍCULO
    =============================== */
  .vehicle-header {
    padding: 16px;
  }

  .vehicle-header h1 {
    font-size: 18px;
    line-height: 1.3;
  }

  .vehicle-sub {
    font-size: 12px;
  }

  /* ===============================
       INPUTS (ANTI ZOOM iOS)
    =============================== */
  .form-group input,
  .form-group select,
  .form-group textarea {
    height: 48px;
    font-size: 16px;
  }

  /* ===============================
       TOGGLES (TOUCH FRIENDLY)
    =============================== */
  .toggle-content {
    padding: 14px;
  }

  .toggle {
    width: 50px;
    height: 28px;
  }

  /* ===============================
       OPCIONAIS
    =============================== */
  .opcionais-grid {
    gap: 8px;
  }

  .opcional-item span {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* ===============================
       STEPS (SCROLL HORIZONTAL)
    =============================== */
  .wizard-steps {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .wizard-steps .step {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* ===============================
       BOTÕES FIXOS (UX TOP)
    =============================== */
  .form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    z-index: 999;
    gap: 10px;
  }

  .form-actions button {
    flex: 1;
    height: 52px;
    font-size: 15px;
  }

  /* espaço para não esconder conteúdo */
  body {
    padding-bottom: 90px;
  }
}

@media (max-width: 768px) {
  /* 🔥 GRID MAIS FECHADO */
  .toggle-grid {
    gap: 6px; /* antes 10/14 */
  }

  /* 🔥 REMOVE ESPAÇO EXTRA DO WRAPPER */
  .form-group {
    margin-bottom: 0;
  }

  /* 🔥 CARD MAIS COMPACTO */
  .toggle-content {
    padding: 8px 10px;
    min-height: 38px;
  }

  /* 🔥 TEXTO MAIS JUSTO */
  .toggle-text {
    font-size: 13px;
    line-height: 1.2;
  }

  /* 🔥 SWITCH MENOR E MAIS AJUSTADO */
  .toggle {
    width: 40px;
    height: 22px;
    margin-left: 8px;
  }
}

@media (max-width: 768px) {
  /* ===============================
       CONTAINER FULL WIDTH
    =============================== */
  .container,
  .wrap,
  .content,
  .elementor-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* ===============================
       STEP OCUPANDO TELA
    =============================== */
  .wizard-step {
    margin: 0;
    border-radius: 0;
    padding: 16px 12px;
  }

  /* ===============================
       SECTIONS MAIS JUSTAS
    =============================== */
  .form-section {
    margin-left: 0;
    margin-right: 0;
    padding: 12px;
    border-radius: 12px;
  }
}

input[name="placa"] {
  text-transform: uppercase;
}

.btn-link {
  background: none;
  border: none;
  color: #007aff;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 6px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* =========================
   SELECT2 PADRÃO INPUT
========================= */

.select2-container .select2-selection--single {
  height: 42px !important;
  border: 1px solid #ced4da !important;
  border-radius: 6px !important;
  padding: 6px 12px !important;
  display: flex;
  align-items: center;
  font-size: 14px;
}

/* texto */
.select2-container .select2-selection__rendered {
  line-height: normal !important;
  color: #495057 !important;
}

/* seta */
.select2-container .select2-selection__arrow {
  height: 100% !important;
}

/* foco igual input */
.select2-container--default.select2-container--focus
  .select2-selection--single {
  border-color: #86b7fe !important;
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25) !important;
}

/* dropdown */
.select2-dropdown {
  border-radius: 6px !important;
}

/* campo de busca */
.select2-search__field {
  padding: 6px !important;
}

.select2-container--default .select2-selection--single {
  background-color: #fff;
}

.input-success {
  border: 2px solid #198754 !important;
  transition: all 0.3s ease;
}

/* =========================
   CENTRALIZAR TEXTO SELECT2
========================= */

.select2-container .select2-selection--single {
  height: 42px !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 12px !important;
}

/* texto selecionado */
.select2-container .select2-selection__rendered {
  line-height: 42px !important;
  padding-left: 0 !important;
}

/* placeholder */
.select2-container--default
  .select2-selection--single
  .select2-selection__placeholder {
  line-height: 42px !important;
  color: #6c757d;
}

/* seta alinhada */
.select2-container .select2-selection__arrow {
  height: 42px !important;
}

.placa-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 32px;
}

.placa-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.placa-icon {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #eff6ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.placa-header-content h3 {
  font-size: 38px;
  margin: 0;
  color: #0f172a;
}

.placa-header-content p {
  margin-top: 8px;
  color: #64748b;
  font-size: 18px;
}

.placa-alert {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  padding: 18px 22px;
  border-radius: 16px;
  margin-bottom: 30px;
  font-size: 16px;
}

.placa-content {
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  gap: 30px;
  align-items: center;
}

.placa-info label {
  display: block;
  font-size: 34px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.placa-info small {
  color: #64748b;
  font-size: 16px;
  line-height: 1.5;
}

.placa-input {
  width: 100%;
  height: 120px;
  border-radius: 20px;
  border: 2px solid #dbeafe;
  text-align: center;
  font-size: 64px;
  letter-spacing: 8px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0f172a;
  background: #fff;
}

.placa-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.btn-buscar-placa {
  width: 100%;
  height: 80px;
  border-radius: 18px;
  border: 2px solid #2563eb;
  background: #fff;
  color: #2563eb;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.btn-buscar-placa:hover {
  background: #2563eb;
  color: #fff;
}

.placa-loading {
  margin-top: 20px;
  color: #2563eb;
  font-weight: 600;
}

.placa-tip {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  color: #64748b;
  font-size: 16px;
}

@media (max-width: 991px) {
  .placa-content {
    grid-template-columns: 1fr;
  }

  .placa-input {
    font-size: 42px;
    height: 90px;
  }

  .placa-header-content h3 {
    font-size: 28px;
  }
}
