:root {
  --lw-bg: rgba(255, 255, 255, 0.65);
  --lw-border: rgba(255, 255, 255, 0.45);
  --lw-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
  --lw-radius: 14px;
  --lw-accent: #2563eb;
  --lw-text: #111827;
  --lw-muted: #6b7280;
}

/* container */
.lang-widget {
  position: fixed;
  bottom: 18px;
  left: 18px;
  width: 100px;
  z-index: 9999;
  font-family: system-ui, -apple-system, "Segoe UI", Inter, Arial, sans-serif;
}

/* buton limbă curentă */
.current-lang {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px;
  background: var(--lw-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--lw-border);
  border-radius: var(--lw-radius);
  box-shadow: var(--lw-shadow);
  cursor: pointer;
  user-select: none;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* hover */
.current-lang:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, 0.25),
    0 22px 45px rgba(0, 0, 0, 0.28);
}

/* săgeată dropdown */
.current-lang::after {
  content: "▾";
  position: absolute;
  right: 10px;
  bottom: 6px;
  font-size: 14px;
  color: var(--lw-muted);
  opacity: 0.8;
  animation: dropdownHint 2.2s ease-in-out infinite;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.lang-widget.open .current-lang::after {
  transform: rotate(180deg);
  opacity: 1;
  animation: none;
}

/* flag */
.lang-widget img {
  width: 34px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* cod limbă */
.lang-widget span {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--lw-text);
}

/* listă opțiuni */
.lang-options {
  position: absolute;
  bottom: 75px;
  left: 0;
  width: 100%;
  padding: 6px;
  margin: 0;
  list-style: none;

  background: var(--lw-bg);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--lw-border);
  border-radius: var(--lw-radius);
  box-shadow: var(--lw-shadow);

  opacity: 0;
  transform: translateY(10px) scale(0.95);
  pointer-events: none;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* open */
.lang-widget.open .lang-options {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* item */
.lang-options li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lang-options li:hover {
  background: rgba(37, 99, 235, 0.15);
  transform: translateX(2px);
}

/* animație săgeată */
@keyframes dropdownHint {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(4px); opacity: 1; }
}

/* motion safe */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
