.av-currency {
  position: relative;
  display: inline-block;
}

/* BOTÓN */
.av-currency .av-currency__boton {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: none;
  background-color: #ffffff;
  color: #1a2b49;
  font-size: 14px;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* LISTA DESPLEGABLE */
.av-currency__lista {
  position: absolute;
  z-index: 999;
  min-width: 100%;
  margin: 6px 0 0;
  padding: 6px 0;
  list-style: none;
  background-color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* Hacia arriba cuando debajo no cabe (lo decide el JS al abrirla) */
.av-currency__lista--arriba {
  top: auto;
  bottom: 100%;
  margin: 0 0 6px;
}

/* Abierta, todo lo que la contiene pasa al frente: con un z-index en un contenedor
   padre, que Elementor hereda a los de dentro, la tapaba la fila siguiente */
.elementor-element:has(.av-currency__boton[aria-expanded="true"]) {
  z-index: 1000 !important;
}

.av-currency__opcion {
  cursor: pointer;
  padding: 8px 14px;
  color: #1a2b49;
  text-align: left;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.av-currency__opcion:hover {
  background-color: #f4f4f4;
}

.av-currency__opcion--activa {
  font-weight: 600;
}

/* CHEVRON */
.av-currency__flecha {
  display: inline-flex;
  align-items: center;
  transition: transform 0.25s ease, opacity 0.2s ease;
  opacity: 0.7;
}

.av-currency__boton:hover .av-currency__flecha {
  opacity: 1;
}

.av-currency__boton[aria-expanded="true"] .av-currency__flecha {
  transform: rotate(180deg);
}

/* EN FILA: todas a la vista, sin desplegable (control "Layout") */
.av-currency--fila .av-currency__lista {
  position: static;
  z-index: auto;
  display: flex;
  /* Sin envolver: en un contenedor estrecho se apilarían, lo contrario de una fila */
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.av-currency--fila .av-currency__lista > li {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Son <button>: fuera el fondo, el borde y el relleno que les pone el tema o el kit */
.av-currency--fila .av-currency__opcion {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  padding: 2px 4px;
  border: 0;
  border-radius: 4px;
  background: none;
  box-shadow: none;
  color: #1a2b49;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
}

/* El tema pinta los botones al pasar o con foco (Hello: fondo y texto de color) */
.av-currency--fila .av-currency__opcion:hover,
.av-currency--fila .av-currency__opcion:focus {
  background: none;
  color: #1a2b49;
}

/* La actual no se elige. La negrita se repone: el `font: inherit` de arriba la quita */
.av-currency--fila .av-currency__opcion--activa {
  font-weight: 600;
  cursor: default;
}
