/* Comutator de limbă RO | IT — teme */
.rat-switcher {
  --bg: rgba(255, 255, 255, .92);
  --fg: #1f2937;
  --bd: rgba(17, 24, 39, .08);
  --abg: #111827;
  --afg: #fff;
  --sh: 0 10px 30px -8px rgba(0, 0, 0, .25);
  --blur: 0px;
  --ts: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  margin: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--bd);
  box-shadow: var(--sh);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.5);
  backdrop-filter: blur(var(--blur)) saturate(1.5);
  font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .02em;
  text-shadow: var(--ts);
  box-sizing: border-box;
  list-style: none;
}
.rat-switcher *, .rat-switcher *::before, .rat-switcher *::after { box-sizing: border-box; }

.rat-opt {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  padding: .62em 1em;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: inherit !important;
  text-decoration: none !important;
  line-height: 1;
  opacity: .82;
  cursor: pointer;
  transition: background .2s ease, opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.rat-opt:hover { opacity: 1; background: rgba(127, 127, 127, .18); }
.rat-opt:active { transform: scale(.96); }
.rat-opt:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.rat-opt.is-active {
  background: var(--abg);
  color: var(--afg) !important;
  opacity: 1;
  text-shadow: none;
  box-shadow: 0 2px 10px -2px rgba(0, 0, 0, .35);
}

.rat-flag {
  display: block;
  flex: none;
  width: 1.5em;
  height: 1.05em;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .14);
}
.rat-flag svg { display: block; width: 100%; height: 100%; }

/* Stiluri de afișare */
.rat-style-flags .rat-code { display: none; }
.rat-style-flags .rat-opt { padding: .5em; }
.rat-style-flags .rat-flag { width: 1.7em; height: 1.7em; border-radius: 50%; }
.rat-style-text .rat-flag { display: none; }
.rat-style-text .rat-opt { padding: .62em 1.1em; }

/* Mărimi */
.rat-size-s { font-size: 12px; }
.rat-size-m { font-size: 14px; }
.rat-size-l { font-size: 17px; }

/* Poziții flotante */
.rat-floating { position: fixed; z-index: 99999; }
.rat-pos-bottom-right { bottom: 20px; right: 20px; }
.rat-pos-bottom-left { bottom: 20px; left: 20px; }
.rat-pos-top-right { top: 20px; right: 20px; }
.rat-pos-top-left { top: 20px; left: 20px; }
body.admin-bar .rat-pos-top-right, body.admin-bar .rat-pos-top-left { top: 52px; }
@media (max-width: 600px) {
  .rat-pos-bottom-right, .rat-pos-bottom-left { bottom: 14px; }
  .rat-pos-bottom-right, .rat-pos-top-right { right: 14px; }
  .rat-pos-bottom-left, .rat-pos-top-left { left: 14px; }
}
.rat-menu-item { list-style: none; display: flex; align-items: center; }

/* ---------- Teme ---------- */
.rat-theme-glass {
  --bg: rgba(255, 255, 255, .16); --fg: #fff; --bd: rgba(255, 255, 255, .42);
  --abg: rgba(255, 255, 255, .34); --afg: #fff; --blur: 16px;
  --sh: 0 8px 32px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .38);
  --ts: 0 1px 2px rgba(0, 0, 0, .35);
}
.rat-theme-glass-dark {
  --bg: rgba(10, 14, 25, .38); --fg: #fff; --bd: rgba(255, 255, 255, .14);
  --abg: rgba(255, 255, 255, .22); --afg: #fff; --blur: 16px;
  --sh: 0 8px 32px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.rat-theme-clear-light, .rat-theme-clear-dark {
  --bg: transparent; --bd: transparent; --abg: transparent; --sh: none; --blur: 0px;
}
.rat-theme-clear-light { --fg: #fff; --afg: #fff; --ts: 0 1px 4px rgba(0, 0, 0, .5); }
.rat-theme-clear-dark { --fg: #111827; --afg: #111827; }
.rat-theme-clear-light .rat-opt.is-active,
.rat-theme-clear-dark .rat-opt.is-active {
  border-radius: 0; box-shadow: inset 0 -2px 0 currentColor; background: transparent;
}
.rat-theme-clear-light .rat-opt:hover,
.rat-theme-clear-dark .rat-opt:hover { background: transparent; }
.rat-theme-light { /* implicit */ }
.rat-theme-dark {
  --bg: #0f172a; --fg: #e2e8f0; --bd: rgba(255, 255, 255, .08); --abg: #f8fafc; --afg: #0f172a;
}
.rat-theme-gradient {
  --bg: rgba(255, 255, 255, .96); --fg: #4c1d95; --abg: linear-gradient(135deg, #7c3aed, #ec4899); --afg: #fff;
}
.rat-theme-ocean {
  --bg: #082f49; --fg: #bae6fd; --bd: rgba(125, 211, 252, .2);
  --abg: linear-gradient(135deg, #06b6d4, #3b82f6); --afg: #fff;
}
.rat-theme-sunset {
  --bg: #fff7ed; --fg: #9a3412; --bd: rgba(249, 115, 22, .25);
  --abg: linear-gradient(135deg, #f97316, #e11d48); --afg: #fff;
}
.rat-theme-neon {
  --bg: #0a0a14; --fg: #a5f3fc; --bd: #22d3ee; --abg: #22d3ee; --afg: #05060f;
  --sh: 0 0 18px rgba(34, 211, 238, .55), inset 0 0 12px rgba(34, 211, 238, .25);
}
.rat-theme-italia {
  --bg: #fff; --fg: #14532d; --bd: rgba(0, 0, 0, .08);
  --abg: linear-gradient(120deg, #009246 0%, #009246 45%, #ce2b37 100%); --afg: #fff;
}
.rat-theme-mint {
  --bg: #ecfdf5; --fg: #065f46; --bd: rgba(16, 185, 129, .25); --abg: #10b981; --afg: #fff;
}
.rat-opt.is-active { background: var(--abg); }
.rat-theme-clear-light .rat-opt.is-active, .rat-theme-clear-dark .rat-opt.is-active { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  .rat-opt { transition: none; }
}
