/* Layout básico */
#cotizador-root * { box-sizing: border-box; }
.coti-wrap { max-width: 720px; margin: 24px auto; padding: 16px; }
.coti-card { background:#fff; border:1px solid #e8e8e8; border-radius:12px; padding:20px; box-shadow:0 3px 10px rgba(0,0,0,.06); }

.coti-title { font-size:20px; font-weight:700; margin:0 0 12px; }
.coti-sub { color:#666; margin:0 0 16px; }

.coti-row { display:flex; gap:12px; margin: 12px 0; }
.coti-row input[type="text"] { flex:1; padding:12px 14px; font-size:16px; border:1px solid #ddd; border-radius:10px; outline:none; }
.coti-row input[type="text"]:focus { border-color:#0ea5e9; box-shadow:0 0 0 3px rgba(14,165,233,.15); }

.coti-btn { padding:12px 16px; border-radius:10px; border:1px solid transparent; background:#0ea5e9; color:#fff; cursor:pointer; font-weight:600; }
.coti-btn[disabled] { opacity:.6; cursor:not-allowed; }
.coti-btn-outline { background:#fff; color:#0ea5e9; border-color:#0ea5e9; }

.coti-hint { font-size:13px; color:#777; margin-top:6px; }
.coti-error { background:#fff5f5; color:#b42318; border:1px solid #f1c0c0; padding:10px 12px; border-radius:10px; margin-top:10px; }

.coti-vehicle { display:flex; align-items:center; gap:14px; padding:12px; border:1px dashed #cbd5e1; border-radius:10px; background:#f8fafc; }
.coti-plate { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight:800; font-size:18px; }

.coti-actions { display:flex; gap:10px; margin-top:14px; }
.coti-step { font-size:13px; color:#6b7280; margin-bottom:8px; }

/* ===========================
   Captura de datos del cliente
   =========================== */

/* Contenedor del formulario */
.coti-form {
  display: block;
  margin-top: 8px;
}

/* Grid responsivo para campos (1 col en móvil, 2 en >=768px) */
.coti-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px) {
  .coti-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Campo de ancho completo cuando sea necesario */
.coti-col-span-2 {
  grid-column: 1 / -1;
}

/* Field wrapper */
.coti-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Etiquetas */
.coti-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a; /* gris-azul oscuro elegante */
}

/* Inputs y selects (heredan tu look & feel) */
.coti-input,
.coti-select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .2s ease;
}
.coti-input::placeholder {
  color: #9aa3af;
}
.coti-input:focus,
.coti-select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

/* Grupo con prefijo/sufijo (ej: 57 o íconos) */
.coti-input-group {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.coti-pre, .coti-post {
  padding: 10px 12px;
  font-size: 14px;
  color: #475569;
  background: #f8fafc;
  border-right: 1px solid #e5e7eb;
}
.coti-post { border-right: 0; border-left: 1px solid #e5e7eb; }
.coti-input-group .coti-input {
  border: 0; border-radius: 0; padding: 12px 12px;
}
.coti-input-group:focus-within {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

/* Mensajería de ayuda y error por campo */
.coti-help {
  font-size: 12px;
  color: #6b7280;
}
.coti-field-error {
  font-size: 12px;
  color: #b42318;
}

/* Estados de validación */
.coti-input.is-invalid,
.coti-select.is-invalid,
.coti-input-group.is-invalid {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 3px rgba(225,29,72,.1) !important;
}
.coti-input.is-valid,
.coti-select.is-valid,
.coti-input-group.is-valid {
  border-color: #16a34a !important;
  box-shadow: 0 0 0 3px rgba(22,163,74,.12) !important;
}

/* Footer de acciones del formulario */
.coti-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
}
@media (max-width: 480px) {
  .coti-form-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
}

/* Botones ya existentes, solo afinamos tamaños si van en el footer */
.coti-form-actions .coti-btn,
.coti-form-actions .coti-btn-outline {
  padding: 12px 18px;
  font-size: 15px;
}

/* Línea divisoria sutil dentro de la card cuando quieras separar bloques */
.coti-divider {
  height: 1px;
  background: #eef2f7;
  margin: 14px 0;
  border: 0;
  width: 100%;
  display: block;
}

/* Título de sección dentro de la misma card */
.coti-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin: 6px 0 4px;
}

/* “Chip” discreto para contexto (ej: Autos / Propietario) */
.coti-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
}

/* Micro-animación al mostrar secciones */
.coti-fade-in {
  animation: cotiFade .18s ease-out;
}
@keyframes cotiFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========= Overlay bonito (coti-overlay) ========= */
.coti-ov-lock { overflow: hidden; }
#coti-overlay {
  position: fixed; inset: 0;
  display: none; z-index: 9999;
}
#coti-overlay.is-visible { display: block; }

#coti-overlay .coti-ov-backdrop {
  position: absolute; inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.35); /* azul oscuro translúcido */
  animation: cotiFadeIn .2s ease-out both;
}

#coti-overlay .coti-ov-card {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  padding: 24px;
}
#coti-overlay .coti-ov-card > * {
  box-sizing: border-box;
}
#coti-overlay .coti-ov-card::before {
  content: "";
}
#coti-overlay .coti-ov-card > div,
#coti-overlay .coti-ov-card > h3,
#coti-overlay .coti-ov-card > p {
  max-width: 560px;
}

#coti-overlay .coti-ov-card {
  pointer-events: none;
}

#coti-overlay .coti-ov-card .coti-ov-inner {
  display: none;
}

/* Tarjeta */
#coti-overlay .coti-ov-card {
  /* La tarjeta real */
}
#coti-overlay .coti-ov-card > .coti-ov-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(2, 6, 23, .25);
}

/* Spinner */
.coti-ov-spinner {
  width: 52px; height: 52px;
  margin: 0 auto 12px auto;
  border-radius: 999px;
  border: 4px solid #e5e7eb;
  border-top-color: #0ea5e9; /* celeste */
  animation: cotiSpin 1s linear infinite;
}

/* Títulos/mensajes */
.coti-ov-title {
  text-align: center;
  font-size: 20px; font-weight: 800;
  margin: 6px 0 2px;
  color: #0f172a; /* slate-900 */
}
.coti-ov-sub {
  text-align: center;
  color: #334155;
  margin: 4px 0 6px;
}
.coti-ov-note {
  text-align: center;
  font-size: 12px; color: #64748b;
}

/* Animaciones */
@keyframes cotiSpin { to { transform: rotate(360deg); } }
@keyframes cotiFadeIn { from { opacity: 0 } to { opacity: 1 } }

/* Estructura interna real (envolver mensajes y spinner en panel) */
#coti-overlay .coti-ov-card {
  display: grid; place-items: center;
}
#coti-overlay .coti-ov-card > .coti-ov-panel {
  width: min(92vw, 520px);
}

/* Consistencia del botón outline (Corregir / Anterior) */
.coti-btn.coti-btn-outline {
  background: transparent;
  color: #0f62fe;                 /* o el primario que uses */
  border: 2px solid #0f62fe;
}
.coti-btn.coti-btn-outline:hover {
  background: rgba(15,98,254,0.06);
}

/* Fecha DD / MM / AAAA con barras fijas */
.coti-date-group{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.coti-date-group .coti-input{
  width: 72px;              /* DD/MM */
  text-align: center;
  height: 44px;
  line-height: 44px;
  padding: 0 10px;
}
.coti-date-group .coti-date-aaaa{
  width: 96px;              /* AAAA */
}
.coti-date-group .coti-date-slash{
  font-weight: 700;
  color: #111;              /* negras */
  user-select: none;
  pointer-events: none;
  line-height: 44px;
}

/* Select Género sin recortes */
.coti-select{
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-size: 16px;
  line-height: 1.2;
  padding: 12px 14px;
  height: auto;             /* evita forzado en mobile */
}