/**
 * END-JS9 — Endelea Currency Library (shared selector)
 */

.ed-currency-field {
  position: relative;
  width: 100%;
}

.ed-currency-display {
  width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.ed-currency-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  min-width: 280px;
  max-height: 240px;
  overflow-y: auto;
}

.ed-currency-field--stacked {
  min-width: 7.5rem;
  min-height: 42px;
  cursor: pointer;
}

.ed-currency-field--stacked .ed-currency-face {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 2px 4px 2px 0;
  pointer-events: none;
}

.ed-currency-field--stacked .ed-currency-face-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-width: 0;
}

.ed-currency-field--stacked .ed-currency-chevron {
  flex-shrink: 0;
  width: 0;
  height: 0;
  margin-right: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ed-navy-soft, #5c6673);
  opacity: 0.7;
}

.ed-currency-field--stacked:hover .ed-currency-chevron {
  opacity: 1;
}

.ed-currency-field--stacked .ed-currency-code {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ed-navy, #0F1F33);
}

.ed-currency-field--stacked .ed-currency-name {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ed-text-muted, #7D8794);
}

.ed-currency-field--stacked .ed-currency-display {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 8px 10px;
  opacity: 0;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--ed-radius-sm, 6px);
}

.ed-currency-field--stacked .ed-currency-display:hover {
  border-color: var(--ed-border, #E5DFD4);
}

.ed-currency-field--stacked .ed-currency-display:focus,
.ed-currency-field--stacked .ed-currency-display:focus-visible {
  opacity: 1;
  background: var(--ed-white, #fff);
  border-color: var(--ed-navy, #0F1F33);
  box-shadow: 0 0 0 3px rgba(15, 31, 51, 0.08);
  cursor: text;
}

.ed-currency-field--stacked:focus-within .ed-currency-face {
  opacity: 0;
}

.ed-currency-field--stacked:focus-within .ed-currency-chevron {
  opacity: 0;
}
