/* =========================================================
   Dream Team Modern Bilingual Language Switcher (TH / EN)
   ========================================================= */
.dt-lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.1);
  height: 30px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.dark-mode .dt-lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.dt-lang-toggle:hover {
  border-color: rgba(37, 99, 235, 0.45);
}

.dt-lang-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  transition: transform 0.26s cubic-bezier(0.34, 1.45, 0.64, 1);
  pointer-events: none;
  z-index: 1;
}

.dt-lang-toggle[data-lang="en"] .dt-lang-slider {
  transform: translateX(100%);
}

.dt-lang-opt {
  position: relative;
  z-index: 2;
  width: 30px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #64748b;
  transition: color 0.2s ease;
  padding: 0 4px;
}

body.dark-mode .dt-lang-opt {
  color: #94a3b8;
}

.dt-lang-toggle[data-lang="th"] .dt-lang-opt[data-code="th"],
.dt-lang-toggle[data-lang="en"] .dt-lang-opt[data-code="en"] {
  color: #ffffff;
}

@media (max-width: 575.98px) {
  .dt-lang-toggle {
    height: 28px;
    padding: 2px;
  }
  .dt-lang-slider {
    top: 2px;
    left: 2px;
    width: calc(50% - 2px);
    height: calc(100% - 4px);
  }
  .dt-lang-opt {
    width: 24px;
    font-size: 0.62rem;
    padding: 0 2px;
  }
}

@media (max-width: 380px) {
  .dt-lang-toggle {
    height: 26px;
    padding: 2px;
  }
  .dt-lang-opt {
    width: 21px;
    font-size: 0.58rem;
    padding: 0 1px;
  }
}
