/* ═══════════════════════════════════════════════════════════
   Stardew Valley Save Editor  ·  i18n.css
   Language switcher widget
   ═══════════════════════════════════════════════════════════ */

#lang-switcher {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 300;
}

#lang-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  background: rgba(16, 13, 7, 0.75);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border: 1.5px solid rgba(72, 54, 10, 0.55);
  border-radius: 99px;
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s;
  font-family: 'Press Start 2P', monospace;
}
#lang-btn:hover {
  border-color: rgba(232, 200, 74, 0.5);
  box-shadow: 0 0 14px rgba(232, 200, 74, 0.15);
}
#lang-btn.active {
  border-color: rgba(232, 200, 74, 0.6);
}

.lang-flag {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.lang-chevron {
  font-size: 7px;
  color: rgba(200, 168, 112, 0.7);
  transition: transform 0.25s;
  line-height: 1;
}
#lang-btn.active .lang-chevron { transform: rotate(180deg); }

/* ── Dropdown ────────────────────────────────────────────────── */
#lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(14, 11, 6, 0.92);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1.5px solid rgba(72, 54, 10, 0.55);
  border-radius: 10px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 130px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
}
#lang-dropdown.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--parchment2);
  transition: background 0.15s, color 0.15s;
  text-align: left;
  width: 100%;
}
.lang-option:hover {
  background: rgba(60, 122, 80, 0.25);
  color: var(--parchment);
}
.lang-option.selected {
  background: rgba(232, 200, 74, 0.1);
  color: var(--gold);
}
