/* Language switcher + hide Google Translate chrome */

.lang-switcher {
  position: relative;
  z-index: 40;
}

.lang-switcher-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 4px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: inherit;
}

.rl-home .lang-switcher-btn,
.rl-header .lang-switcher-btn {
  background: #111;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.lang-switcher-flag {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 1px;
  flex-shrink: 0;
}

.lang-switcher-code {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.lang-switcher-caret {
  width: 10px;
  height: 7px;
  opacity: 0.85;
}

.lang-switcher-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 88px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.lang-switcher-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #222;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-align: left;
}

.lang-switcher-option:last-child {
  border-bottom: 0;
}

.lang-switcher-option:hover,
.lang-switcher-option.active {
  background: #f5f5f5;
}

.lang-switcher-option img {
  width: 18px;
  height: 12px;
  object-fit: cover;
}

#google_translate_element,
.goog-te-banner-frame,
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-te-gadget,
.goog-logo-link,
.skiptranslate iframe.skiptranslate {
  display: none !important;
}

body {
  top: 0 !important;
}

.goog-te-spinner-pos,
.goog-te-menu-frame {
  display: none !important;
}
/* ---- Popup language picker (click button -> centered popup) ---- */

.lang-pop-wrap { position: relative; z-index: 60; }

.lang-pop-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: #111;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
}

.lang-pop-btn-flag {
  width: 20px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.lang-pop-caret { width: 10px; height: 7px; opacity: 0.8; }

.lang-pop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: langPopFade 0.15s ease-out;
}

.lang-pop-overlay[hidden] { display: none; }

@keyframes langPopFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lang-pop-panel {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  animation: langPopRise 0.18s ease-out;
}

@keyframes langPopRise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lang-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.lang-pop-title { font-size: 14px; font-weight: 600; color: #111; }

.lang-pop-close {
  border: 0;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0 4px;
}

.lang-pop-close:hover { color: #111; }

.lang-pop-grid {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.lang-pop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #222;
  font-size: 14px;
  transition: background 0.12s ease;
}

.lang-pop-item:hover { background: rgba(0, 0, 0, 0.06); }

.lang-pop-item.active { background: rgba(17, 17, 17, 0.08); font-weight: 600; }

.lang-pop-item img {
  width: 26px;
  height: 17px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex: 0 0 auto;
}

.lang-pop-name { flex: 1 1 auto; }

.lang-pop-check {
  color: #111;
  font-weight: 700;
  visibility: hidden;
}

.lang-pop-item.active .lang-pop-check { visibility: visible; }

@media (max-width: 380px) {
  .lang-pop-grid { grid-template-columns: 1fr; }
}
