/* Shared language picker for the public Talvo pages. */
.language-selector {
  position: relative;
  flex: none;
  z-index: 2;
}

.language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ash, #a3a29a);
  cursor: pointer;
  font: 500 12px/1 var(--font-mono, monospace);
  letter-spacing: .08em;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.language-toggle:hover,
.language-selector.is-open .language-toggle,
.language-toggle:focus-visible {
  border-color: var(--hairline-strong, rgba(244, 243, 239, .17));
  background: rgba(244, 243, 239, .06);
  color: var(--pure, #f4f3ef);
  outline: none;
}

.language-toggle svg { width: 15px; height: 15px; flex: none; }
.language-toggle .language-chevron {
  width: 10px;
  height: 10px;
  margin-left: 1px;
  transition: transform .2s ease;
}
.language-selector.is-open .language-chevron { transform: rotate(180deg); }

.language-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 286px;
  max-width: calc(100vw - 20px);
  max-height: min(70vh, 560px);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--hairline-strong, rgba(244, 243, 239, .17));
  border-radius: 12px;
  background: rgba(22, 23, 20, .97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38), 0 0 0 1px rgba(0, 0, 0, .18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px) scale(.98);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease;
}

.language-selector.is-open .language-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.language-option {
  display: grid;
  grid-template-columns: 1fr auto 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 38px;
  padding: 8px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ash, #a3a29a);
  text-decoration: none;
  cursor: pointer;
  text-align: left;
  font: 400 13px/1.2 var(--font-sans, sans-serif);
  transition: color .16s ease, background .16s ease;
}
.language-option:hover,
.language-option:focus-visible,
.language-option.is-active {
  background: rgba(244, 243, 239, .08);
  color: var(--pure, #f4f3ef);
  outline: none;
}
.language-option .language-code {
  color: var(--fog, #77766e);
  font: 500 10px/1 var(--font-mono, monospace);
  letter-spacing: .1em;
}
.language-option.is-active .language-code { color: var(--green-bright, #2fc584); }
.language-option .language-check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--green-bright, #2fc584);
  opacity: 0;
}
.language-option.is-active .language-check { opacity: 1; }

.nav-utility {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.nav-cta .language-selector { margin-right: 2px; }

@media (max-width: 860px) {
  .nav-cta .language-toggle { padding-inline: 8px; }
  .nav-utility { gap: 9px; }
  .nav-utility .btn { padding: 11px 16px; font-size: 13px; }
}

@media (max-width: 480px) {
  .language-menu { right: -5px; }
  .language-toggle { min-height: 36px; padding-inline: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .language-toggle .language-chevron,
  .language-menu { transition: none; }
}

/* Dismissible "your browser suggests this language" banner — not an
   auto-redirect, per Google's guidance to let users choose explicitly. */
.locale-suggest {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 18px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  width: fit-content;
  max-width: 460px;
  margin: 0 auto;
  padding: 12px 12px 12px 18px;
  border: 1px solid var(--hairline-strong, rgba(244, 243, 239, .17));
  border-radius: 12px;
  background: rgba(22, 23, 20, .97);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .38), 0 0 0 1px rgba(0, 0, 0, .18);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: locale-suggest-in .3s ease both;
}

.locale-suggest-text {
  color: var(--ash, #a3a29a);
  font: 400 13px/1.4 var(--font-sans, sans-serif);
}

.locale-suggest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  margin-left: auto;
}

.locale-suggest-accept {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--green, #0e9f63);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  font: 600 12.5px/1 var(--font-sans, sans-serif);
  transition: background .16s ease;
}
.locale-suggest-accept:hover,
.locale-suggest-accept:focus-visible {
  background: var(--green-bright, #2fc584);
  outline: none;
}

.locale-suggest-dismiss {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--fog, #6e6d66);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: color .16s ease, background .16s ease;
}
.locale-suggest-dismiss:hover,
.locale-suggest-dismiss:focus-visible {
  background: rgba(244, 243, 239, .08);
  color: var(--pure, #f4f3ef);
  outline: none;
}

@keyframes locale-suggest-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .locale-suggest { animation: none; }
}
