/* Floating language switcher styles */
.lang-switcher {
  position: fixed;
  left: 24px;
  /* fixed bottom instead of aligning with #scroll-top */
  bottom: 24px;
  z-index: 1050;
  font-family: inherit;
  display: inline-block;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #222;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  cursor: pointer;
  min-width: 72px;
  align-items: center;
}

.lang-toggle:focus {
  outline: 2px solid rgba(0,123,255,0.25);
  outline-offset: 2px;
}

.lang-flag { font-size: 18px; line-height: 1; }
.lang-code { font-weight: 600; font-size: 13px; }
.lang-caret { font-size: 12px; color: #666; }

.lang-list {
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  min-width: 140px;
  display: none;
  position: absolute;
  /* place above the button */
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

.lang-list li { padding: 0; }
.lang-list a { 
  color: #222; 
  text-decoration: none; 
  display: flex; 
  gap: 8px; 
  align-items: center; 
  padding: 8px 12px; 
  width: 100%; 
  box-sizing: border-box; 
}
.lang-list a:hover { background-color: #ff8a00; color: #fff; }
.item-flag { font-size: 16px; }

/* Menu is shown only when JS toggles the 'open' class on the container */

/* Show via JS-controlled class when opened */
.lang-switcher.open .lang-list { display: block; }

/* caret sizing */
.lang-caret.bi-caret-up-fill,
.lang-caret.bi-caret-down-fill { font-size: 12px; color: #666; }

/* Small screens: reduce size and position */
@media (max-width: 576px) {
  .lang-switcher { left: 12px; bottom: 80px; }
  .lang-toggle { padding: 8px 10px; }
}
