/* ==========================================================================
   LanguageSelection.css — Language dropdown (details/summary)
   --------------------------------------------------------------------------
      Contents: Base/reset • Trigger button • Flag avatar • Dropdown menu • Responsive
   Markup expectation: <details class="lang"><summary>...</summary><div class="lang-menu">...</div></details>.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Base / reset
   -------------------------------------------------------------------------- */

.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.lang summary {
  list-style: none;
}

.lang summary::-webkit-details-marker {
  display: none;
}

/* --------------------------------------------------------------------------
   Trigger
   -------------------------------------------------------------------------- */

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  border: none;
  background: #ffffff;
  color: #404040;

  border-radius: 999px;
  padding: 10px 14px;

  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 14px;

  cursor: pointer;
  user-select: none;
}

.lang-chev {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #404040;
  opacity: 0.85;
}

.lang[open] .lang-chev {
  transform: rotate(180deg);
  transform-origin: center;
}

.lang-code {
  letter-spacing: 0.5px;
}

/* --------------------------------------------------------------------------
   Flag avatar
   -------------------------------------------------------------------------- */

.flag-circle {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.flag-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --------------------------------------------------------------------------
   Dropdown menu
   -------------------------------------------------------------------------- */

.lang-menu {
  display: none;

  position: absolute;
  top: calc(100% + 10px);
  right: 0;

  min-width: 180px;
  padding: 8px;

  background: rgba(0, 0, 0, 0.70);
  border-radius: 14px;

  box-shadow: 0px 10px 26px rgba(0, 0, 0, 0.18);
  z-index: 9999;
}

.lang[open] .lang-menu {
  display: block;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 10px;
  border-radius: 12px;

  text-decoration: none;
  background: transparent;
  border: none;

  color: #ffffff;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-align: left;
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lang-name {
  line-height: 1.1;
}


/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
  .lang-trigger {
    padding: 12px 16px;
    font-size: 16px;
    gap: 12px;
  }

  .flag-circle {
    width: 34px;
    height: 34px;
  }

  .lang-menu {
    right: 50%;
    transform: translateX(50%);
    min-width: 220px;
  }

  .lang-option {
    padding: 12px 12px;
    font-size: 16px;
  }
}