/* ============================================================
   BARREL · Cuestionario /vender-mi-casa
   Vanilla CSS, sin dependencias, respeta tokens de la web.
   ============================================================ */

.bq {
  --bq-marina: #0E1F3D;
  --bq-cielo: #B6DCEC;
  --bq-sol: #F1B33C;
  --bq-brasa: #E66B2C;
  --bq-sal: #FAF7F0;
  --bq-white: #ffffff;
  --bq-line: rgba(14, 31, 61, 0.10);
  --bq-radius: 14px;

  max-width: 620px;
  margin: 32px auto 0;
  padding: 0;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  color: var(--bq-marina);
}

.bq * { box-sizing: border-box; }

.bq__card {
  background: var(--bq-white);
  border: 1px solid var(--bq-line);
  border-radius: var(--bq-radius);
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(14, 31, 61, 0.06);
}

/* --- Progreso --- */
.bq__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.bq__progress-track {
  flex: 1;
  height: 4px;
  background: var(--bq-line);
  border-radius: 2px;
  overflow: hidden;
}
.bq__progress-bar {
  height: 100%;
  background: var(--bq-sol);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.bq__progress-text {
  font-size: 11px;
  color: rgba(14, 31, 61, 0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

/* --- Volver --- */
.bq__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bq-white);
  border: 1.5px solid var(--bq-line);
  border-radius: 999px;
  color: var(--bq-marina);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 14px;
  margin: 0 0 16px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.bq__back:hover { border-color: var(--bq-marina); }
.bq__back:hover { color: var(--bq-marina); }
.bq__back[hidden] { display: none; }

/* --- Pregunta --- */
.bq__question {
  font-family: 'Bricolage Grotesque', 'Poppins', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--bq-marina);
  margin: 0 0 8px;
}
.bq__helper {
  font-size: 14px;
  color: rgba(14, 31, 61, 0.65);
  line-height: 1.5;
  margin: 0 0 20px;
}

/* --- Opciones --- */
.bq__options {
  display: grid;
  gap: 10px;
}
.bq__options--grid-2x2 { grid-template-columns: 1fr 1fr; }
.bq__options--stack { grid-template-columns: 1fr; }

.bq__option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 16px 18px;
  background: var(--bq-white);
  border: 1.5px solid var(--bq-line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--bq-marina);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bq__option:hover {
  border-color: var(--bq-sol);
  background: rgba(241, 179, 60, 0.05);
  transform: translateY(-1px);
}
.bq__option:active { transform: translateY(0); }
.bq__option-emoji {
  font-size: 22px;
  line-height: 1;
}
.bq__option-label {
  flex: 1;
}
.bq__option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}
.bq__option-sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(14, 31, 61, 0.6);
}

/* --- Campo de texto genérico --- */
.bq__field { margin-bottom: 16px; }
.bq__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(14, 31, 61, 0.75);
  margin-bottom: 6px;
}
.bq__input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--bq-line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--bq-marina);
  background: var(--bq-white);
  transition: border-color 0.15s;
}
.bq__input:focus {
  outline: none;
  border-color: var(--bq-sol);
}

/* --- Autocomplete ubicación --- */
.bq__autocomplete { position: relative; }
.bq__suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bq-white);
  border: 1px solid var(--bq-line);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(14, 31, 61, 0.10);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
}
.bq__suggestion {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  color: var(--bq-marina);
  cursor: pointer;
  border-bottom: 1px solid var(--bq-line);
}
.bq__suggestion:last-child { border-bottom: none; }
.bq__suggestion:hover,
.bq__suggestion[aria-selected="true"] { background: rgba(182, 220, 236, 0.35); }
.bq__suggestion-main { display: block; font-weight: 500; }
.bq__suggestion-sub {
  display: block;
  font-size: 12px;
  color: rgba(14, 31, 61, 0.55);
  margin-top: 2px;
}
.bq__suggestions-loading {
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(14, 31, 61, 0.5);
}

/* --- Contacto: selector país + tel --- */
.bq__tel {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--bq-line);
  border-radius: 10px;
  background: var(--bq-white);
  overflow: hidden;
  transition: border-color 0.15s;
}
.bq__tel:focus-within { border-color: var(--bq-sol); }
.bq__tel-country {
  padding: 14px 10px 14px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--bq-marina);
  background: rgba(182, 220, 236, 0.18);
  border: none;
  border-right: 1px solid var(--bq-line);
  cursor: pointer;
  max-width: 180px;
  min-width: 130px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%230E1F3D' d='M0 0l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.bq__tel-country:focus { outline: none; }
.bq__tel-input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--bq-marina);
  min-width: 0;
}
.bq__tel-input:focus { outline: none; }

/* --- Honeypot: totalmente invisible al ojo humano pero VISIBLE al DOM
       (los bots rellenan todos los inputs, un usuario real no lo verá) --- */
.bq__honeypot-wrap {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.bq__honeypot {
  opacity: 0;
  height: 1px;
  width: 1px;
}

/* --- Botones acción --- */
.bq__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}
.bq__submit,
.bq__next {
  padding: 14px 28px;
  background: var(--bq-sol);
  color: var(--bq-marina);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.bq__submit:hover:not(:disabled),
.bq__next:hover:not(:disabled) {
  background: #D59D2C;
  transform: translateY(-1px);
}
.bq__submit:disabled,
.bq__next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.bq__submit-arrow { margin-left: 6px; }

.bq__error {
  background: rgba(230, 107, 44, 0.1);
  border: 1px solid rgba(230, 107, 44, 0.35);
  color: var(--bq-brasa);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
}

.bq__legal {
  font-size: 12px;
  color: rgba(14, 31, 61, 0.55);
  line-height: 1.5;
  margin: 20px 0 0;
}
.bq__legal a { color: var(--bq-brasa); text-decoration: underline; }

/* --- Pantalla de éxito --- */
.bq__success {
  text-align: center;
  padding: 20px 8px;
}
.bq__success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--bq-sol);
  border-radius: 50%;
  color: var(--bq-marina);
  font-size: 32px;
  margin: 0 auto 20px;
}
.bq__success-title {
  font-family: 'Bricolage Grotesque', 'Poppins', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
  color: var(--bq-marina);
}
.bq__success-title em {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--bq-brasa);
}
.bq__success-text {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(14, 31, 61, 0.75);
  margin: 0 0 12px;
}

/* --- Responsive --- */
@media (max-width: 520px) {
  .bq { margin: 24px 12px 0; }
  .bq__card { padding: 22px 18px; }
  .bq__question { font-size: 19px; }
  .bq__option { min-height: 60px; font-size: 14px; padding: 14px 14px; }
  .bq__options--grid-2x2 { grid-template-columns: 1fr; }
  .bq__success-title { font-size: 22px; }
}
