.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 150;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  transition: all var(--transition);
}

.dropdown-item:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.dropdown-item.danger:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.dropdown-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--fg-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.locale-dropdown-content {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.locale-section {
  display: grid;
  gap: 8px;
}

.locale-label {
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-list,
.currency-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-language-list,
.mobile-currency-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lang-btn,
.currency-btn {
  display: inline-flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition);
}

html.light .lang-btn,
html.light .currency-btn {
  background: rgba(0, 0, 0, 0.03);
}

.lang-btn:hover,
.currency-btn:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.08);
}

html.light .lang-btn:hover,
html.light .currency-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.lang-btn.active,
.currency-btn.active {
  border-color: var(--border-active);
  background: var(--accent-soft);
  color: var(--accent);
}

.mobile-language-list .lang-btn,
.mobile-currency-list .currency-btn {
  width: auto;
}

.lang-btn-compact {
  padding: 6px 10px;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.8rem;
}

html.light .lang-btn-compact {
  border-color: rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.04);
}

.mobile-locale-block {
  width: min(420px, 100%);
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: var(--shadow);
}

html.light .mobile-locale-block {
  background: rgba(255, 255, 255, 0.92);
}

.mobile-locale-label {
  margin-bottom: 8px;
  color: var(--fg-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}