/* The language picker, shared by the app, the website and the tax guide (langmenu.js). Colours follow the page's
   tokens where it has them (the app's light and dark themes) and fall back to the light palette elsewhere. */
.lang-menu { position: relative; flex: none; font-family: inherit; }
.lang-trigger { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px 0 11px;
  border: 1px solid var(--border, #E7E5EC); border-radius: 12px; background: var(--surface, #FFFFFF); color: var(--ink, #10053F);
  cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 500; transition: border-color .15s, box-shadow .15s; }
.lang-trigger:hover { border-color: var(--faint, #7E7889); }
/* (the transparent outline shows only in the system's high-contrast colours, which drop the border's colour and the shadow) */
.lang-trigger:focus-visible, .lang-menu.open .lang-trigger { outline: 2px solid transparent; outline-offset: 2px;
  border-color: var(--accent, #1F6FB5); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #1F6FB5) 18%, transparent); }
.lang-menu .chevron { width: 7px; height: 7px; border-right: 1.6px solid var(--muted, #6B6478); border-bottom: 1.6px solid var(--muted, #6B6478);
  transform: translateY(-2px) rotate(45deg); transition: transform .2s; margin-left: 2px; }
.lang-menu.open .chevron { transform: translateY(1px) rotate(225deg); }
.lang-menu .flag { width: 20px; height: 14px; border-radius: 2px; object-fit: cover; flex: none; }
.lang-list { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; min-width: 220px; padding: 6px;
  background: var(--surface, #FFFFFF); border: 1px solid var(--border, #E7E5EC); border-radius: 12px;
  box-shadow: 0 12px 32px rgb(16 5 63 / .14), 0 2px 6px rgb(16 5 63 / .06);
  display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.98); transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s; }
.lang-menu.open .lang-list { opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease, transform .16s ease; }
.lang-option { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: none; border-radius: 9px;
  background: transparent; color: var(--ink, #10053F); cursor: pointer; text-align: left; text-decoration: none;
  font-family: inherit; transition: background .12s; }
.lang-option:hover, .lang-option:focus-visible { background: var(--surface-2, #F7F6F9); outline: none; }
.lang-option[aria-selected="true"] { background: var(--accent-soft, #E3F2FF); }
/* the option the arrow keys are on, plainly marked: the light grey alone barely shows (1.1:1), and the chosen option,
   where the list opens, keeps its own tint */
.lang-option:focus-visible { outline: 2px solid var(--accent, #1F6FB5); outline-offset: -2px; }
.lang-option .flag { width: 28px; height: 20px; border-radius: 2px; }
.lang-names { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.lang-native { font-size: 14px; font-weight: 600; }
.lang-local { font-size: 12px; color: var(--muted, #6B6478); }
.lang-check { width: 16px; color: var(--accent, #1F6FB5); font-weight: 700; text-align: center; }

/* On a dark header (website, guide) the button sits on the navy bar; the list stays light. */
.lang-menu.on-dark .lang-trigger { background: transparent; border-color: rgb(255 255 255 / .22); color: #FFFFFF; }
.lang-menu.on-dark .lang-trigger:hover { border-color: #75C8FF; color: #75C8FF; }
.lang-menu.on-dark .chevron { border-color: rgb(255 255 255 / .75); }
.lang-menu.on-dark .lang-trigger:hover .chevron { border-color: #75C8FF; }
.lang-menu.on-dark .lang-trigger:focus-visible, .lang-menu.on-dark.open .lang-trigger { border-color: #75C8FF;
  box-shadow: 0 0 0 3px rgb(117 200 255 / .3); }

/* Compact (the app's top bar, drawn as its other controls: 41 high, a 1px border, radius 8): the short name ("ქარ") and
   the chevron, no flag. */
.lang-menu.compact .lang-trigger { height: 41px; gap: 12px; padding: 0 13px 0 14px; border-width: 1px;
  border-color: var(--control-border, #87829F); border-radius: 8px; font-size: 15px; font-weight: 500; }
.lang-menu.compact .lang-trigger:hover { border-color: var(--muted, #6B6478); }
.lang-menu.compact .lang-trigger:focus-visible, .lang-menu.compact.open .lang-trigger { border-color: var(--accent, #1F6FB5);
  box-shadow: none; outline: 2px solid var(--accent, #1F6FB5); outline-offset: 2px; }
.lang-menu.compact .chevron { width: 8px; height: 8px; border-width: 0 2px 2px 0; border-color: var(--ink, #10053F); margin-left: 0; }
.lang-menu.compact.on-dark .lang-trigger { border-color: rgb(255 255 255 / .28); }
.lang-menu.compact.on-dark .lang-trigger:hover { border-color: #75C8FF; }
.lang-menu.compact.on-dark .lang-trigger:focus-visible, .lang-menu.compact.on-dark.open .lang-trigger { border-color: #75C8FF;
  outline-color: #75C8FF; }
.lang-menu.compact.on-dark .chevron { border-color: rgb(255 255 255 / .85); }

@media (max-width: 520px) { .lang-menu:not(.compact) .lang-current { display: none; } }

/* The website's pills on its navy header and footer (landing.html, with .on-dark): .lang-pill is the header's (164x50,
   2px white border), .lang-pill.sm the footer's (130x33, 1px border); .lang-up opens the list upwards. The language's
   name stays on phones too. */
.lang-menu.lang-pill .lang-trigger { height: 50px; min-width: 164px; padding: 0 20px 0 13px; gap: 10px; border: 2px solid #FFFFFF;
  border-radius: 14px; font-size: 14px; font-weight: 600; }
.lang-menu.lang-pill .lang-trigger .flag { width: 28px; height: 20px; }
.lang-menu.lang-pill .lang-current { display: inline; }
.lang-menu.lang-pill .chevron { width: 8px; height: 8px; margin-left: auto; border-width: 0 2px 2px 0; border-color: #FFFFFF; }
.lang-menu.lang-pill .lang-trigger:hover { border-color: #75C8FF; color: #75C8FF; }
.lang-menu.lang-pill .lang-trigger:hover .chevron { border-color: #75C8FF; }
.lang-menu.lang-pill.sm .lang-trigger { height: 33px; min-width: 130px; padding: 0 13px 0 11px; gap: 7px; border-width: 1px;
  border-radius: 17px; font-size: 12px; }
.lang-menu.lang-pill.sm .lang-trigger .flag { width: 20px; height: 14px; }
/* the footer's pill takes a finger 41 high (an invisible margin above and below what is drawn) */
.lang-menu.lang-pill.sm .lang-trigger { position: relative; }
.lang-menu.lang-pill.sm .lang-trigger::before { content: ""; position: absolute; inset: -4px 0; }
.lang-menu.lang-pill.sm .chevron { width: 6px; height: 6px; border-width: 0 1.5px 1.5px 0; }
.lang-menu.lang-up .lang-list { top: auto; bottom: calc(100% + 8px); transform-origin: bottom right; }
/* the website's lists mark it in navy */
.lang-menu.lang-pill .lang-option:focus-visible { outline-color: #10053F; }

/* reduced motion: the list appears and goes without sliding (the app's own rule covers it there; the website, the guide
   and the privacy page have only this one) */
@media (prefers-reduced-motion: reduce) {
  .lang-menu .lang-list, .lang-menu.open .lang-list { transform: none; transition: none; }
  .lang-menu .chevron, .lang-trigger { transition: none; }
}
