/* The currency switch — a menu in the menu bar.
 *
 * It borrows the same tokens as every other control up there, so it reads as
 * part of the chrome rather than as something bolted on. Nothing new is
 * invented: same radius, same border, same shadow, same easing as the window
 * furniture everywhere else in August.
 */

.cur-wrap { position: relative; display: inline-flex; }

/* Wider than the icon buttons beside it because it holds three letters rather
   than a glyph, and letter-spacing on a 3-character label needs the room. */
.cur-btn {
  width: auto; padding: 0 .62rem; gap: .3rem;
  font-family: inherit;
}
.cur-code {
  font-size: .68rem; font-weight: 650; letter-spacing: .06em;
  color: var(--text-muted); transition: color .2s ease;
}
.cur-btn:hover .cur-code,
.cur-btn[aria-expanded="true"] .cur-code { color: var(--text); }

.cur-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  min-width: 208px; padding: 5px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow-float);
  animation: curDrop .18s cubic-bezier(.32,.72,.28,1);
}
@keyframes curDrop { from { opacity: 0; transform: translateY(-6px) scale(.97); } }
.cur-menu[hidden] { display: none; }

.cur-item {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .5rem .6rem; border: 0; border-radius: 9px;
  background: transparent; color: var(--text);
  font: inherit; font-size: .82rem; text-align: left; cursor: pointer;
  transition: background-color .14s ease;
}
.cur-item:hover, .cur-item:focus-visible { background: var(--surface-2); }
.cur-item.on { background: var(--accent-soft); }

.cur-item-code {
  font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  color: var(--text-muted); min-width: 2.4rem;
}
.cur-item.on .cur-item-code { color: var(--accent); }
.cur-item-name { flex: 1; min-width: 0; }
.cur-item-tick { color: var(--accent); font-size: .8rem; width: .9rem; text-align: right; }

/* On a narrow screen the menu bar is already fighting for room. The label
   stays — it is the only thing that says which currency you are looking at —
   but it gives up its padding first. */
@media (max-width: 560px) {
  .cur-btn { padding: 0 .42rem; }
  .cur-menu { min-width: 184px; }
}

@media (prefers-reduced-motion: reduce) {
  .cur-menu { animation: none; }
}
