/* ============================================================
   Surf China — the language menu: this page in English, Spanish, French, Portuguese, Russian and Japanese.
   One menu on every page that has one: the site nav's, the homepage's and the booking pages' headers.
   tools/stamp_nav.py writes its markup (the reference page's) into each page and links this file right
   after fonts.css, so a page's own styles still place it. tools/build_i18n.py points each link at the
   page's twin; the page's own carries aria-current="true".

   Drawn like the nav's own dropdowns: a globe, the language's code and a caret, no outline. A phone
   shows the globe and the code alone.
   ============================================================ */
.lang-menu { position: relative; flex: none; }
.lang-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: 40px; min-width: 40px; justify-content: center; padding: 0 0.55rem; border-radius: 980px;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.04em; color: var(--charcoal); white-space: nowrap;
  transition: background-color 0.2s, opacity 0.2s;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: '\25BE'; font-size: 0.6rem; transition: rotate 0.25s cubic-bezier(0.77, 0, 0.175, 1); }
.lang-menu[open] summary::after { rotate: 180deg; }
.lang-menu summary:hover { opacity: 0.7; }
.lang-menu[open] summary { background: rgba(0,0,0,0.05); opacity: 1; }
.lang-menu summary:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; }
.lang-globe { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; }
/* the code beside the globe, its capitals centred on it: text-box trims the line to them */
.lang-now { font-weight: 600; line-height: 1; text-box: trim-both cap alphabetic; }
@supports not (text-box: trim-both cap alphabetic) { .lang-now { position: relative; top: 0.07em; } }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 168px; padding: 0.4rem 0;
  background: var(--white); border: 1px solid rgba(0,0,0,0.08); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12); z-index: 1001;
}
.lang-list a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.62rem 1.2rem;
  font-family: 'Inter', sans-serif; font-size: 0.92rem; font-weight: 500; letter-spacing: 0;
  text-transform: none; color: var(--charcoal); text-decoration: none;
}
.lang-list a:hover { background: var(--sand); }
.lang-list a[aria-current="true"] { color: var(--ocean); font-weight: 600; }
.lang-list a[aria-current="true"]::after { content: '\2713'; font-size: 0.85rem; }
@media (max-width: 480px) {
  .lang-menu summary { padding: 0 0.3rem; gap: 0.25rem; font-size: 0.72rem; }
  .lang-menu summary::after { display: none; }
}
