/* ================= Huella Hídrica – Sí/No compact ================= */
:root {
  --hh-si: #6abf5a;
  --hh-no: #e36461;
  --hh-azul: #02558b;
  --hh-gray: #9a9a9a;
  --hh-bg: #f7f8fa;
  --hh-ring: rgba(2, 85, 139, .12);
}

/* Contenedor base */
.hhq {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  max-width: 820px;
  /* evita crecer a todo el ancho en desktop */
  margin-inline: auto;
}

.hhq-border {
  border: 2px solid #02558b;
}

.hhq-border-gray {
  border: 2px solid #9a9a9a;
}

/* Fila flexible: pregunta a la izquierda, controles a la derecha (desktop) */
.hhq__row {
  display: grid;
  gap: 12px;
  align-items: center;
}

@media (min-width: 768px) {
  .hhq__row {
    grid-template-columns: 1fr auto;
  }
}

.hhq__title {
  margin: 0;
  font-weight: 700;
  color: var(--hh-azul);
  font-size: 1.05rem;
}

.hhq__title_white {
  margin: 0;
  font-weight: 700;
  color: #FFF;
  font-size: 1.05rem;
}

/* Grupo común a ambas variantes */
.hhq__group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* ---------- Variante A: Pill compacto (como tu imagen) ---------- */
.hhq--pills .hhq__btn {
  appearance: none;
  border-radius: 999px;
  padding: 8px 16px;
  min-width: 110px;
  /* no se hacen gigantes */
  max-width: 160px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: box-shadow .2s, transform .04s, border-color .2s, color .2s, background .2s;
}

.hhq__btn-bg {
  background-color: #01395e;
}

.hhq__btn_color {
  border: 2px solid #02558b;
  color: #02558b;
  background: #fff;
}

.hhq__btn_invert {
  border: 2px solid #01395e;
  color: #FFF;
  background: #02558b;
}

.hhq--pills .hhq__btn:focus {
  outline: none;
  box-shadow: 0 0 0 5px var(--hh-ring);
}

.hhq--pills .hhq__btn:active {
  transform: scale(.98);
}

.hhq--pills .hhq__btn[data-value="si"].is-selected {
  background: var(--hh-si);
  color: #fff;
  border-color: var(--hh-si);
}

.hhq--pills .hhq__btn[data-value="no"].is-selected {
  background: var(--hh-no);
  color: #fff;
  border-color: var(--hh-no);
}

/* ---------- Variante B: Segmento compacto (switch horizontal) ---------- */
.hhq--segment .hhq__segment {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 2px solid #02558b;
  border-radius: 999px;
  overflow: hidden;
}

.hhq--segment .hhq__seg-btn {
  background: #fff;
  border: 0;
  padding: 8px 18px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 120px;
  max-width: 160px;
  color: #02558b;
}

.hhq--segment .hhq__seg-btn+.hhq__seg-btn {
  border-left: 1px solid var(--hh-gray);
}

.hhq--segment .hhq__seg-btn[data-value="si"].is-selected {
  background: var(--hh-si);
  color: #fff;
}

.hhq--segment .hhq__seg-btn[data-value="no"].is-selected {
  background: var(--hh-no);
  color: #fff;
}

/* ===== Layout horizontal con imagen pegada al borde ===== */
.hhq--inline {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  /* img | texto | botones */
  align-items: center;
  padding: 0;
  overflow: hidden;
}

.hhq__img-wrap {
  width: 100px;
  height: 100%;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid #02558b;
  /* opcional */
}

.hhq__img {
  width: 70%;
  height: auto;
  max-width: 120px;
  margin: 5px;
  object-fit: contain;
  display: block;
}

.hhq__body {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 16px;
}

.hhq__title {
  margin: 0;
  font-weight: 700;
  color: #02558b;
  font-size: 1rem;
  white-space: nowrap;
}

.hhq__group {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .hhq--inline {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 12px 16px;
  }

  .hhq__img-wrap {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #02558b;
    padding: 12px 0;
  }

  .hhq__body {
    flex-direction: column;
    gap: 10px;
    padding: 12px;
  }
}


/* ===== Versiones invertidas ("negativas") para hhq ===== */
.hhq--inline.hhq--invert {
  background: #02558b;
  border-color: #02558b;
}

.hhq--inline.hhq--invert .hhq__img-wrap {
  background: rgba(255, 255, 255, .08);
  /*border-right: 2px solid rgba(255,255,255,.3);*/
}

.hhq--inline.hhq--invert .hhq__title {
  color: #fff;
}

.hhq--inline.hhq--invert .hhq__btn {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
  transition: all .2s ease;
}

/*
.hhq--inline.hhq--invert .hhq__btn:hover {
  background: #fff;
  color: #02558b;
}
*/

/* Botones por defecto en hhq--invert (fondo azul) */
.hhq--inline.hhq--invert .hhq__btn {
  background: #fff;
  color: #02558b;
  border: 2px solid #fff;
  transition: all .2s ease;
}

/* Hover según valor */
/*
.hhq--inline.hhq--invert .hhq__btn[data-value="si"]:hover {
  background: var(--hh-si);
  border-color: var(--hh-si);
  color: #fff;
}

.hhq--inline.hhq--invert .hhq__btn[data-value="no"]:hover {
  background: var(--hh-no);
  border-color: var(--hh-no);
  color: #fff;
}*/

/* Estados seleccionados */
.hhq--inline.hhq--invert .hhq__btn[data-value="si"].is-selected {
  background: var(--hh-si);
  color: #fff;
  border-color: var(--hh-si);
}

.hhq--inline.hhq--invert .hhq__btn[data-value="no"].is-selected {
  background: var(--hh-no);
  color: #fff;
  border-color: var(--hh-no);
}

/* Focus accesible */
.hhq--inline.hhq--invert .hhq__btn:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .25);
}

/* Permitir que el texto se parta y no empuje la imagen */
.hhq__body {
  min-width: 0;
}

/* importante en flex */
.hhq__title,
.hhq__title_white {
  white-space: normal;
  /* deja de forzar una sola línea */
  overflow-wrap: anywhere;
  /* parte palabras largas si hace falta */
  line-height: 1.25;
}

/* Mantener una sola línea sólo en desktop si lo querés así */
@media (min-width: 768px) {

  .hhq__title,
  .hhq__title_white {
    white-space: nowrap;
  }
}

/* Ajustes específicos para mobile: centrado y no descentrar la imagen */
@media (max-width: 767.98px) {
  .hhq--inline {
    grid-template-columns: 1fr;
  }

  /* ya lo usás */
  .hhq__img-wrap {
    padding: 16px 0;
  }

  /* alto consistente para el bloque de imagen */
  /*.hhq__img { max-width: 72px; }    */
  /* tamaño cómodo en móvil */
  .hhq__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 12px;
  }

  .hhq__group {
    justify-content: center;
    flex-wrap: wrap;
    /* si no entra, cae a segunda línea */
    gap: 8px 12px;
  }
}


/* === Botonera Sí/No compacta y autoajustable === */
.hhq__group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hhq--pills .hhq__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 1 auto;
  /* se achican si hay poco espacio */
  min-width: 80px;
  /* ancho mínimo cómodo */
  max-width: 120px;
  /* evita que se estiren demasiado */
  padding: 6px 14px;
  font-size: 0.95rem;
  line-height: 1.2;
}

/* mobile: centrado y ajuste total */
@media (max-width: 767.98px) {
  .hhq__group {
    justify-content: center;
  }

  .hhq--pills .hhq__btn {
    min-width: 70px;
    max-width: 100px;
    padding: 6px 12px;
  }
}

/* === Restaurar estilo de botones HHQ === */
.hhq__group {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hhq__btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  border: 2px solid #02558b;
  background: #fff;
  color: #02558b;
  font-weight: 700;
  padding: 8px 16px;
  min-width: 100px;
  max-width: 160px;
  text-transform: capitalize;
  transition: all .2s ease;
}

.hhq__btn:hover,
.hhq__btn:focus {
  background: #02558b;
  color: #fff;
}

.hhq__btn.is-selected {
  background: #6abf5a;
  border-color: #6abf5a;
  color: #fff;
}

/* Versión invertida (fondo azul) */
.hhq--invert .hhq__btn {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}

.hhq--invert .hhq__btn:hover,
.hhq--invert .hhq__btn:focus {
  background: #fff;
  color: #02558b;
}

.hhq--invert .hhq__btn.is-selected {
  background: #6abf5a;
  border-color: #6abf5a;
  color: #fff;
}

/* Responsive */
@media (max-width: 767.98px) {
  .hhq__group {
    justify-content: center;
  }

  .hhq__btn {
    min-width: 80px;
    max-width: 120px;
    padding: 6px 12px;
  }
}

