.currency-popover {
  appearance: none;
  position: relative;
  display: inline;
  padding: 0;
  border: 0;
  border-bottom: 1px dotted rgba(44, 74, 110, 0.58);
  background: transparent;
  color: #2c4a6e;
  cursor: help;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

.currency-popover:focus {
  outline: 2px solid rgba(44, 74, 110, 0.28);
  outline-offset: 2px;
  border-bottom-color: transparent;
  border-radius: 3px;
}

.currency-popover-panel {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  z-index: 40;
  min-width: max-content;
  max-width: min(16rem, calc(100vw - 2rem));
  padding: 0.42rem 0.55rem;
  border: 1px solid rgba(217, 211, 199, 0.92);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(31, 35, 56, 0.18);
  color: var(--text, #1f2338);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.28;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.18rem);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
  visibility: hidden;
  white-space: normal;
}

.currency-popover-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1px solid rgba(217, 211, 199, 0.92);
  border-bottom: 1px solid rgba(217, 211, 199, 0.92);
  background: #fff;
  transform: translate(-50%, -0.31rem) rotate(45deg);
}

.currency-popover:hover .currency-popover-panel,
.currency-popover:focus .currency-popover-panel {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

@media (max-width: 640px) {
  .currency-popover-panel {
    left: 0;
    min-width: 11rem;
    transform: translate(0, 0.18rem);
  }

  .currency-popover-panel::after {
    left: 1rem;
  }

  .currency-popover:hover .currency-popover-panel,
  .currency-popover:focus .currency-popover-panel {
    transform: translate(0, 0);
  }
}
