/* ==========================================================================
   LANGUAGE SWITCHER BAR — GameLuma-inspired top bar
   @since 5.35.0
   ========================================================================== */

.fcn-language-switcher {
  background: var(--ls-bg, #1a1a2e);
  width: 100%;
  z-index: 1000;
  position: relative;
  font-size: 12px;
  line-height: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fcn-language-switcher__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 6px 16px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Language Item
   -------------------------------------------------------------------------- */

.fcn-language-switcher__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
  font-weight: 500;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.02em;
}

.fcn-language-switcher__item:hover,
.fcn-language-switcher__item:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.fcn-language-switcher__item._active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Flag Icon
   -------------------------------------------------------------------------- */

.fcn-language-switcher__flag {
  width: 16px;
  height: 11px;
  border-radius: 1px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   Language Name
   -------------------------------------------------------------------------- */

.fcn-language-switcher__name {
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .fcn-language-switcher__inner {
    gap: 1px;
    padding: 5px 8px;
  }
  .fcn-language-switcher__item {
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (max-width: 400px) {
  .fcn-language-switcher__name {
    display: none;
  }
  /* Always show name for active language */
  .fcn-language-switcher__item._active .fcn-language-switcher__name {
    display: inline;
  }
  .fcn-language-switcher__item {
    padding: 4px 6px;
    gap: 3px;
  }
}
