/* ============================================================
   LinguaSnap – Frontend Language Switcher Styles
   ============================================================ */

.linguasnap-switcher {
  display: inline-flex;
  align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

/* ---- Dropdown ---- */
.linguasnap-dropdown {
  position: relative;
}

.linguasnap-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #1c1c1e;
  transition: border-color .15s, box-shadow .15s;
  white-space: nowrap;
}

.linguasnap-dropdown-toggle:hover {
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0,113,227,.12);
}

.linguasnap-chevron {
  font-size: 10px;
  color: #aaa;
  transition: transform .2s;
}

.linguasnap-dropdown.is-open .linguasnap-chevron {
  transform: rotate(180deg);
}

.linguasnap-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  min-width: 140px;
  padding: 4px;
  list-style: none;
  margin: 0;
  z-index: 9999;
  display: none;
  animation: ls-fade-in .15s ease;
}

.linguasnap-dropdown.is-open .linguasnap-dropdown-menu {
  display: block;
}

.linguasnap-dropdown-menu li {
  margin: 0;
  padding: 0;
}

.linguasnap-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #1c1c1e;
  border-radius: 7px;
  text-align: left;
  transition: background .12s;
}

.linguasnap-option:hover {
  background: #f2f2f7;
}

.linguasnap-option.is-active {
  background: #e8f1fb;
  color: #0071e3;
  font-weight: 500;
}

/* ---- Buttons style ---- */
.linguasnap-buttons {
  display: flex;
  gap: 6px;
}

.linguasnap-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: #1c1c1e;
  transition: border-color .15s, background .15s;
  white-space: nowrap;
}

.linguasnap-btn:hover {
  border-color: #0071e3;
  background: #f5f9ff;
}

.linguasnap-btn.is-active {
  border-color: #0071e3;
  background: #e8f1fb;
  color: #0071e3;
  font-weight: 600;
}

/* ---- Toggle style ---- */
.linguasnap-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.linguasnap-toggle-label {
  font-size: 14px;
  color: #636366;
  cursor: pointer;
  transition: color .15s;
}

.linguasnap-toggle-label.is-active {
  color: #1c1c1e;
  font-weight: 600;
}

.linguasnap-toggle-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #d1d1d6;
  border: none;
  cursor: pointer;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

.linguasnap-toggle-track.is-on {
  background: #0071e3;
}

.linguasnap-toggle-thumb {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  pointer-events: none;
}

.linguasnap-toggle-track.is-on .linguasnap-toggle-thumb {
  left: 22px;
}

/* ---- Animation ---- */
@keyframes ls-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
