/* A compact language control with a touch-friendly four-language sheet. */
.language-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
  flex-shrink: 0;
  color: #f2f2f6;
  border-color: #ffffff1f;
  box-shadow: inset 0 1px #ffffff1c, 0 5px 18px #0003;
}
.language-button > svg { width: 19px; height: 19px; }
.language-button > svg:last-child { width: 12px; height: 12px; opacity: .65; }
.language-button:hover, .language-button[aria-expanded=true] { background-color: #41434d; }
.language-button[aria-expanded=true] > svg:last-child { transform: rotate(180deg); }
.sheet.language-sheet { background: radial-gradient(ellipse at 0 0, #ffffff08, transparent 65%), #111216; }
.language-panel { padding: 29px 24px calc(25px + env(safe-area-inset-bottom)); }
.language-intro { padding-inline-end: 35px; }
.language-emblem { display: flex; align-items: center; width: 36px; height: 36px; color: #d6d7df; margin-bottom: 14px; }
.language-emblem svg { width: 29px; height: 29px; stroke-width: 1.25; }
.language-intro h2 { font-size: 32px; font-weight: 600; line-height: 1.15; letter-spacing: -.04em; }
.language-intro p { margin-top: 11px; color: #b8b9c4; font-size: 13px; line-height: 1.55; }
.language-options { display: grid; gap: 8px; margin-top: 24px; }
.language-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 67px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ffffff10;
  border-radius: 17px;
  text-align: start;
  background: #ffffff04;
}
.language-option:hover { background: #ffffff0b; border-color: #ffffff30; }
.language-option[aria-pressed=true] { background: linear-gradient(110deg, #e0000015, #ffffff06); border-color: #e000006b; }
.language-code { display: grid; place-items: center; width: 35px; height: 35px; flex-shrink: 0; border: 1px solid #ffffff12; border-radius: 11px; color: #a8abb7; font-size: 10px; letter-spacing: .055em; background: #ffffff03; }
.language-name { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: 4px; flex: 1; }
.language-name bdi { font-size: 16px; line-height: 1.25; font-weight: 550; }
.language-name small { font-size: 11px; line-height: 1.35; color: #aeb0bc; }
.language-status { width: 22px; height: 22px; border: 1px solid #ffffff26; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.language-status svg { width: 13px; height: 13px; opacity: 0; stroke-width: 2.5; }
.language-option[aria-pressed=true] .language-status { background: var(--red); border-color: #ef4b4b; }
.language-option[aria-pressed=true] .language-status svg { opacity: 1; }
.language-option[aria-pressed=true] .language-code { color: #faf9f6; }
.language-note { margin-top: 21px; font-size: 11px; line-height: 1.6; color: #9fa2ae; max-width: 37em; }
[dir=rtl] .language-intro h2 { letter-spacing: 0; }
@media (max-width:359px) {
  .top-actions { gap: 8px; }
  .language-button { gap: 6px; padding-inline: 10px; }
  .language-panel { padding-inline: 20px; padding-top: 23px; }
  .language-intro h2 { font-size: 29px; }
  .language-options { margin-top: 20px; }
  .language-option { min-height: 64px; }
}
@media (min-width:600px) {
  .sheet.language-sheet { width: 460px; max-width: calc(100% - 48px); inset: 0; height: fit-content; max-height: calc(100dvh - 48px); margin: auto; }
  .language-sheet .sheet-handle { display: none; }
  .language-panel { padding: 30px; }
  .language-intro h2 { font-size: 35px; }
  .language-intro p { font-size: 14px; }
  .language-option { min-height: 70px; }
}
@media (min-width:1000px) {
  .tv-mode .language-button { min-height: 60px; border-radius: 18px; padding-inline: 18px; gap: 11px; font-size: 17px; }
  .tv-mode .language-button > svg { width: 25px; height: 25px; }
  .tv-mode .language-button > svg:last-child { width: 16px; height: 16px; }
  .tv-mode .sheet.language-sheet { width: 600px; }
  .tv-mode .language-panel { padding: 40px; }
  .tv-mode .language-emblem svg { width: 36px; height: 36px; }
  .tv-mode .language-intro h2 { font-size: 45px; }
  .tv-mode .language-intro p { font-size: 19px; }
  .tv-mode .language-options { margin-top: 29px; gap: 13px; }
  .tv-mode .language-option { min-height: 86px; padding-inline: 20px; gap: 20px; }
  .tv-mode .language-name bdi { font-size: 23px; }
  .tv-mode .language-name small { font-size: 15px; }
  .tv-mode .language-code { width: 45px; height: 45px; font-size: 13px; }
  .tv-mode .language-status { width: 27px; height: 27px; }
  .tv-mode .language-note { font-size: 15px; }
}
