/* =========================================================
   Brief Proyecto Web — Estilos del formulario
   ========================================================= */

:root {
  --bpw-brand:        #000000;
  --bpw-brand-mid:    #5b5b5b;
  --bpw-brand-light:  #bcbcbc;
  --bpw-accent:       #c9823a;
  --bpw-accent-light: #fdf3e7;
  --bpw-white:        #ffffff;
  --bpw-gray-light:   #f7f7f5;
  --bpw-gray-mid:     #e4e4e0;
  --bpw-gray-dark:    #9e9e9e;
  --bpw-text:         #1a1a1a;
  --bpw-muted:        #757575;
  --bpw-danger:       #d32f2f;
  --bpw-radius:       8px;
  --bpw-radius-lg:    12px;
  --bpw-transition:   0.18s ease;
}

/* ── WRAPPER ── */
.bpw-wrap {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--bpw-text);
  max-width: 820px;
  margin: 0 auto;
}

/* ── PROGRESS ── */
.bpw-progress-bar {
  margin-bottom: 1.5rem;
}
.bpw-progress-track {
  height: 4px;
  background: var(--bpw-gray-mid);
  border-radius: 2px;
  overflow: hidden;
}
.bpw-progress-fill {
  height: 100%;
  background: var(--bpw-accent);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 0%;
}
.bpw-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--bpw-muted);
  margin-top: 6px;
}

/* ── STEP TABS ── */
.bpw-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--bpw-gray-mid);
  padding-bottom: 0;
}
.bpw-step {
  padding: 8px 0;
  margin-right: 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--bpw-muted);
  cursor: pointer;
  transition: all var(--bpw-transition);
  white-space: nowrap;
}
.bpw-step:hover { color: var(--bpw-brand); }
.bpw-step--active {
  color: var(--bpw-brand);
  border-bottom-color: var(--bpw-brand);
}
.bpw-step--done::after {
  content: " ✓";
  color: var(--bpw-accent);
  font-size: 11px;
}

/* ── SECTION ── */
.bpw-section { display: none; }
.bpw-section--active { display: block; animation: bpwFade 0.22s ease; }
@keyframes bpwFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bpw-section-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--bpw-gray-mid);
}
.bpw-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bpw-brand-light);
  color: var(--bpw-brand);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.bpw-section-header h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--bpw-brand);
}
.bpw-section-header p {
  font-size: 14px;
  color: var(--bpw-muted);
  margin: 0;
}

/* ── FIELDS ── */
.bpw-field {
  margin-bottom: 1.25rem;
}
.bpw-field label,
.bpw-label-group {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--bpw-muted);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.bpw-field label .req { color: var(--bpw-accent); margin-left: 2px; }

.bpw-wrap input[type="text"],
.bpw-wrap input[type="email"],
.bpw-wrap input[type="url"],
.bpw-wrap input[type="tel"],
.bpw-wrap input[type="number"],
.bpw-wrap textarea,
.bpw-wrap select {
  width: 100%;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--bpw-gray-mid);
  border-radius: var(--bpw-radius);
  background: var(--bpw-white);
  color: var(--bpw-text);
  outline: none;
  transition: border-color var(--bpw-transition), box-shadow var(--bpw-transition);
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.bpw-wrap input:focus,
.bpw-wrap textarea:focus,
.bpw-wrap select:focus {
  border-color: var(--bpw-brand);
  box-shadow: 0 0 0 3px rgba(26,58,42,0.1);
}
.bpw-wrap textarea { resize: vertical; min-height: 80px; }
.bpw-wrap select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.bpw-wrap input.bpw-invalid,
.bpw-wrap textarea.bpw-invalid,
.bpw-wrap select.bpw-invalid {
  border-color: var(--bpw-danger);
  box-shadow: 0 0 0 3px rgba(211,47,47,0.1);
}

/* ── ROW ── */
.bpw-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.bpw-row--ref { margin-bottom: 0.5rem; }

/* ── CHIPS ── */
.bpw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.bpw-chip {
  cursor: pointer;
}
.bpw-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.bpw-chip span {
  display: inline-block;
  padding: 7px 14px;
  border: 1px solid var(--bpw-gray-mid);
  border-radius: 20px;
  font-size: 13px;
  background: var(--bpw-white);
  color: var(--bpw-text);
  transition: all var(--bpw-transition);
  cursor: pointer;
  user-select: none;
}
.bpw-chip:hover span {
  border-color: var(--bpw-brand);
  color: var(--bpw-brand);
}
.bpw-chip input:checked + span {
  background: var(--bpw-brand-light);
  border-color: var(--bpw-brand);
  color: var(--bpw-brand);
  font-weight: 600;
}

/* ── TOGGLES ── */
.bpw-toggles { display: flex; flex-direction: column; gap: 4px; }
.bpw-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border: 1px solid var(--bpw-gray-mid);
  border-radius: var(--bpw-radius);
  cursor: pointer;
  transition: background var(--bpw-transition);
  gap: 1rem;
}
.bpw-toggle-row:hover { background: var(--bpw-gray-light); }
.bpw-toggle-row input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.bpw-toggle-row span:first-child { font-size: 14px; flex: 1; }
.bpw-toggle-switch {
  width: 34px;
  height: 20px;
  border-radius: 10px;
  background: var(--bpw-gray-mid);
  position: relative;
  flex-shrink: 0;
  transition: background var(--bpw-transition);
}
.bpw-toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bpw-white);
  top: 3px;
  left: 3px;
  transition: left var(--bpw-transition);
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.bpw-toggle-row input:checked ~ .bpw-toggle-switch {
  background: var(--bpw-brand);
}
.bpw-toggle-row input:checked ~ .bpw-toggle-switch::after {
  left: 17px;
}

/* ── NAVIGATION ── */
.bpw-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bpw-gray-mid);
}
.bpw-btn {
  padding: 10px 22px;
  border-radius: var(--bpw-radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--bpw-transition);
  border: 1px solid var(--bpw-gray-mid);
  background: var(--bpw-white);
  color: var(--bpw-text);
}
.bpw-btn:hover { background: var(--bpw-gray-light); }
.bpw-btn--primary {
  background: var(--bpw-brand);
  color: var(--bpw-white);
  border-color: var(--bpw-brand);
}
.bpw-btn--primary:hover { background: var(--bpw-brand-mid); }
.bpw-btn:active { transform: scale(0.97); }

/* ── SUBMIT ── */
.bpw-submit-area {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bpw-gray-mid);
  text-align: center;
}
.bpw-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: var(--bpw-brand);
  color: var(--bpw-white);
  border: none;
  border-radius: var(--bpw-radius);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--bpw-transition), transform var(--bpw-transition);
}
.bpw-submit:hover { background: var(--bpw-brand-mid); }
.bpw-submit:active { transform: scale(0.97); }
.bpw-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.bpw-submit-note {
  margin-top: 10px;
  font-size: 12px;
  color: var(--bpw-muted);
}

/* ── SUCCESS ── */
.bpw-success {
  text-align: center;
  padding: 3rem 2rem;
}
.bpw-success-icon {
  width: 60px;
  height: 60px;
  background: var(--bpw-brand-light);
  color: var(--bpw-brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 1rem;
}
.bpw-success h2 {
  color: var(--bpw-brand);
  font-size: 22px;
  margin-bottom: 0.75rem;
}
.bpw-success p { color: var(--bpw-muted); margin-bottom: 0.5rem; }

/* ── RESPONSIVE ── */

/* Tablet (≤768px) */
@media (max-width: 768px) {
  .bpw-wrap {
    font-size: 15px;
  }

  /* Steps: scroll horizontal en lugar de wrap caótico */
  .bpw-steps {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 1px;
    gap: 0;
  }
  .bpw-steps::-webkit-scrollbar { display: none; }
  .bpw-step {
    font-size: 12px;
    margin-right: 12px;
    padding: 8px 2px;
    flex-shrink: 0;
  }

  /* Grids de 2 columnas → 1 columna */
  .bpw-row,
  .bpw-row--ref {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Chips más grandes para dedos */
  .bpw-chip span {
    padding: 9px 16px;
    font-size: 14px;
  }
}

/* Mobile (≤480px) — ajustes más agresivos */
@media (max-width: 480px) {
  /* Padding lateral del wrapper reducido */
  .bpw-wrap {
    font-size: 15px;
  }

  /* Header de sección más compacto */
  .bpw-section-header {
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
  }
  .bpw-section-header h2 {
    font-size: 19px;
  }

  /* Inputs y selects: fuente mínimo 16px para evitar zoom en iOS */
  .bpw-wrap input[type="text"],
  .bpw-wrap input[type="email"],
  .bpw-wrap input[type="url"],
  .bpw-wrap input[type="tel"],
  .bpw-wrap input[type="number"],
  .bpw-wrap textarea,
  .bpw-wrap select {
    font-size: 16px;
    padding: 12px 13px;
  }
  .bpw-wrap select {
    padding-right: 36px;
  }

  /* Campos con menos espacio entre ellos */
  .bpw-field {
    margin-bottom: 1rem;
  }

  /* Chips en móvil: ancho completo para textos largos */
  .bpw-chips {
    gap: 6px;
  }
  .bpw-chip {
    width: 100%;
  }
  .bpw-chip span {
    display: block;
    width: 100%;
    padding: 11px 16px;
    font-size: 15px;
    border-radius: var(--bpw-radius);
    text-align: left;
  }
  .bpw-chip input:checked + span {
    padding-left: 14px;
    border-left: 3px solid var(--bpw-brand);
  }

  /* Toggles: área táctil más generosa */
  .bpw-toggle-row {
    padding: 13px 14px;
    min-height: 48px;
  }
  .bpw-toggle-row span:first-child {
    font-size: 14px;
    line-height: 1.4;
  }
  .bpw-toggle-switch {
    width: 38px;
    height: 22px;
    border-radius: 11px;
  }
  .bpw-toggle-switch::after {
    width: 16px;
    height: 16px;
    top: 3px;
    left: 3px;
  }
  .bpw-toggle-row input:checked ~ .bpw-toggle-switch::after {
    left: 19px;
  }

  /* Botones de navegación: ancho completo */
  .bpw-nav {
    flex-direction: column-reverse;
    gap: 10px;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
  }
  .bpw-btn {
    width: 100%;
    text-align: center;
    padding: 13px 22px;
    font-size: 15px;
  }

  /* Botón enviar: ancho completo */
  .bpw-submit {
    width: 100%;
    justify-content: center;
    padding: 15px 24px;
    font-size: 16px;
  }

  /* Aviso de pre-llenado: texto más compacto */
  .bpw-prefill-notice {
    font-size: 13px;
    padding: 10px 12px;
    gap: 8px;
  }
  .bpw-prefill-notice__icon {
    display: none;
  }
}

/* ── PRE-FILL NOTICE ── */
.bpw-prefill-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bpw-accent-light);
  border: 1px solid #e0b97a;
  border-left: 4px solid var(--bpw-accent);
  border-radius: var(--bpw-radius);
  padding: 12px 16px;
  margin-bottom: 1.25rem;
  font-size: 14px;
  color: #6b4210;
}
.bpw-prefill-notice__icon {
  width: 22px;
  height: 22px;
  background: var(--bpw-accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.bpw-prefill-notice__close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  color: #6b4210;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.6;
  transition: opacity var(--bpw-transition);
}
.bpw-prefill-notice__close:hover { opacity: 1; }

/* ── PRE-FILLED FIELD HIGHLIGHT ── */
.bpw-wrap input.bpw-prefilled,
.bpw-wrap textarea.bpw-prefilled,
.bpw-wrap select.bpw-prefilled {
  background: var(--bpw-accent-light);
  border-color: #e0b97a;
}
.bpw-wrap input.bpw-prefilled:focus,
.bpw-wrap textarea.bpw-prefilled:focus,
.bpw-wrap select.bpw-prefilled:focus {
  background: var(--bpw-white);
  border-color: var(--bpw-brand);
  box-shadow: 0 0 0 3px rgba(26,58,42,0.1);
}

/* Oculta el botón Next Section de Uncode dentro de la página del formulario 
.bpw-wrap ~ .uncode-next-section,
.bpw-wrap ~ .next-section-button,
.bpw-wrap ~ .uncont ~ .uncode-next-section {
  display: none !important;
}*/

.vc_row > .bpw-nav,
.row-container > .bpw-nav {
  display: none !important;
}