/* === BLOQUE ROOT === */
.hhselect {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  border: 2px solid #005b85;
  border-radius: 8px;
  background-color: #004f78;
  color: #fff;
  padding: 1rem;
  gap: 1rem;
}

.hhselect-border {
  border: 2px solid #005b85;
}
.hhselect-bg-blue {
  background-color: #004f78;
  border-color: #004f78;
}
.hhselect--inline {
  flex-direction: row;
}
.hhselect--invert {
  color: #fff;
}

/* === ICONO LADO IZQUIERDO === */
.hhselect__img-wrap {
  flex: 0 0 auto;
  width: 72px;
  min-width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hhselect__img {
  width: 56px;
  height: auto;
  object-fit: contain;
}

/* === BODY === */
.hhselect__body {
  flex: 1 1 auto;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.hhselect__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: currentColor;
}
.hhselect__title--white {
  color: #fff;
}

/* === CONTROLES === */
.hhselect__ctrl {
  display: flex;
  flex-direction: column;
  position: relative;
  max-width: 320px;
}

/* pastilla visible (valor actual) */
.hhselect__current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;

  background: #fff;
  color: #004f78;
  border: 2px solid #004f78;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: .6rem 1rem;
  cursor: pointer;
  width: 100%;
  text-align: center;
}

.hhselect__arrow {
  font-size: .9rem;
  line-height: 1;
}

/* lista desplegable */
.hhselect__list {
  list-style: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + .4rem);
  margin: 0;
  padding: .5rem 0;
  background: #fff;
  border: 2px solid #004f78;
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  z-index: 999;
}
.hhselect__option {
  padding: .6rem 1rem;
  font-size: .95rem;
  line-height: 1.3;
  color: #004f78;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid #cfd9df;
}
.hhselect__option:last-child {
  border-bottom: 0;
}
.hhselect__option.is-selected,
.hhselect__option:hover {
  background: #004f78;
  color: #fff;
}

/* util común que ya usás */
.d-none {
  display: none !important;
}


/* === Combo dentro de hhcount ================================== */

.hhselect__ctrl {
  position: relative;
  max-width: 260px; /* que no se te vaya gigante */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Botón visible con la opción elegida */
.hhselect__current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;

  background: #fff;
  color: var(--hh-azul);
  border: 2px solid var(--hh-azul);
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: .6rem 1rem;
  cursor: pointer;
  min-width: 220px;
  text-align: center;
}

.hhselect__arrow {
  font-size: .9rem;
  line-height: 1;
}

/* Lista desplegable */
.hhselect__list {
  list-style: none;
  position: absolute;
  right: 0;             /* anclado al borde derecho como tu ctrl */
  top: calc(100% + .4rem);
  margin: 0;
  padding: .5rem 0;
  background: #fff;
  border: 2px solid var(--hh-azul);
  border-radius: 12px;
  max-height: 240px;
  overflow-y: auto;
  min-width: 220px;
  z-index: 999;
}

.hhselect__option {
  padding: .6rem 1rem;
  font-size: .95rem;
  line-height: 1.3;
  color: var(--hh-azul);
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid #cfd9df;
  text-align: center;
}
.hhselect__option:last-child {
  border-bottom: 0;
}

.hhselect__option.is-selected,
.hhselect__option:hover {
  background: var(--hh-azul);
  color: #fff;
}

/* Mobile: que no rompa el stack column que hace tu media query */
@media (max-width:768px){
  .hhselect__ctrl {
    align-items: center;
    max-width: 100%;
    width: 100%;
  }
  .hhselect__current {
    width: 100%;
    min-width: 0;
  }
  .hhselect__list {
    right: 50%;
    transform: translateX(50%);
    min-width: 200px;
  }
}

.d-none { display:none !important; }


/* el combo necesita que el dropdown pueda “salir” del bloque */
.hhcount--inline.hhcount--dropdown {
  overflow: visible;
  position: relative; /* importante para que el absolute del ul se ancle acá */
}


.hhselect__ctrl {
  position: relative;
  /* ya lo teníamos */
  /* z-index: 9; /*que gane frente al resto */
}

.hhselect__list {
  position: absolute;
  z-index: 9999; /* bien arriba de todo */
}


@media (max-width: 768px) {
  /* --- Ajuste ancho lista en mobile --- */
  .hhselect__list {
    left: 0;
    right: 0;
    transform: none;
    width: 100%;       /* igual al botón */
    min-width: 0;
  }

  .hhselect__current {
    width: 100%;
  }

  .hhselect__ctrl {
    width: 100%;
    align-items: stretch;
  }
}


.hhselect__list {
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}


.hhselect__current {
  display: flex;
  align-items: center;
  justify-content: center; /* centramos todo el contenido */
  position: relative;
}

.hhselect__arrow {
  position: absolute;
  right: 1rem; /* deja la flecha fija a la derecha */
}


/* ===== VARIANTE INVERTIDA (fondo blanco, bordes azules) ===== */

.hhselect__current--invert {
  background: #fff;
  color: var(--hh-azul);
  border: 2px solid var(--hh-azul);
}

.hhselect__current--invert:hover {
  background: var(--hh-azul);
  color: #fff;
}

.hhselect__list--invert {
  background: #fff;
  border: 2px solid var(--hh-azul);
}

.hhselect__list--invert .hhselect__option {
  color: var(--hh-azul);
  background: #fff;
}

.hhselect__list--invert .hhselect__option.is-selected,
.hhselect__list--invert .hhselect__option:hover {
  background: var(--hh-azul);
  color: #fff;
}

/* Ajustes opcionales */
.hhcount__title__invert {
  color: var(--hh-azul);
}

.hhcount--invert .hhcount__img-wrap {
  background: transparent !important;
}




.hhselect__list {
  z-index: 99999 !important;
}

