/* Language switcher (homepage + resource pages)
 * No borders, no heavy gray track — quiet type + soft selected fill only.
 * Theme follows data-orvia-resolved-theme (not OS prefers-color-scheme).
 */
.orvia-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.orvia-lang-switcher button,
.orvia-lang-switcher a.orvia-lang-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.3));
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.orvia-lang-switcher button:hover,
.orvia-lang-switcher a.orvia-lang-link:hover {
  color: var(--orvia-accent, rgb(255, 91, 3));
  background: transparent;
}

.orvia-lang-switcher button.active,
.orvia-lang-switcher a.orvia-lang-link.active,
.orvia-lang-switcher button[aria-pressed="true"] {
  background: rgba(0, 0, 0, 0.06);
  color: var(--orvia-text, rgba(0, 0, 0, 0.9));
}

.orvia-lang-switcher button:focus-visible,
.orvia-lang-switcher a.orvia-lang-link:focus-visible {
  outline: 2px solid var(--orvia-accent, rgb(255, 91, 3));
  outline-offset: 2px;
}

html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher {
  border: 0;
  background: transparent;
}

html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher button,
html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher a.orvia-lang-link {
  color: var(--orvia-text-muted, rgba(245, 247, 250, 0.46));
}

html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher button:hover,
html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher a.orvia-lang-link:hover {
  color: var(--orvia-accent, rgb(255, 126, 62));
  background: transparent;
}

html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher button.active,
html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher a.orvia-lang-link.active,
html[data-orvia-resolved-theme="dark"] .orvia-lang-switcher button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--orvia-text, rgba(245, 247, 250, 0.94));
}

/* Search trigger — resource pages only; no border, no hard fill */
.orvia-search-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.3));
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.orvia-search-trigger:hover {
  color: var(--orvia-text, rgba(0, 0, 0, 0.9));
  background: rgba(0, 0, 0, 0.04);
}

html[data-orvia-resolved-theme="dark"] .orvia-search-trigger {
  border: 0;
  background: transparent;
  color: var(--orvia-text-muted, rgba(245, 247, 250, 0.46));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-trigger:hover {
  color: var(--orvia-text, rgba(245, 247, 250, 0.94));
  background: rgba(255, 255, 255, 0.08);
}

/* Search overlay */
.orvia-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 20px 20px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.orvia-search-overlay.open {
  display: flex;
}

body.orvia-search-open {
  overflow: hidden;
}

.orvia-search-panel {
  width: min(640px, 100%);
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: var(--orvia-page, #fff);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.orvia-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--orvia-line, rgba(0, 0, 0, 0.08));
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.45));
}

.orvia-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--orvia-text, #111);
  font: inherit;
  font-size: 16px;
}

.orvia-search-input::placeholder {
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.35));
}

.orvia-search-close {
  appearance: none;
  border: 0;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.45));
  font: inherit;
  font-size: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

.orvia-search-hint {
  padding: 8px 16px;
  color: var(--orvia-text-muted, rgba(0, 0, 0, 0.4));
  font-size: 12px;
}

.orvia-search-results {
  list-style: none;
  margin: 0;
  padding: 0 8px 8px;
  overflow-y: auto;
}

.orvia-search-result a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

.orvia-search-result.active a {
  background: var(--orvia-control-active, rgba(0, 0, 0, 0.06));
}

.orvia-search-result-title {
  display: block;
  color: var(--orvia-text, #111);
  font-size: 14px;
  font-weight: 600;
}

.orvia-search-result-snippet {
  display: block;
  margin-top: 3px;
  color: var(--orvia-text-secondary, rgba(0, 0, 0, 0.5));
  font-size: 13px;
  line-height: 1.45;
}

.orvia-search-empty {
  padding: 24px 16px;
  margin: 0;
  color: var(--orvia-text-secondary, rgba(0, 0, 0, 0.5));
  font-size: 14px;
  text-align: center;
}

html[data-orvia-resolved-theme="dark"] .orvia-search-overlay {
  background: rgba(0, 0, 0, 0.6);
}

html[data-orvia-resolved-theme="dark"] .orvia-search-panel {
  background: var(--orvia-section, #1c1c1e);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

html[data-orvia-resolved-theme="dark"] .orvia-search-field {
  border-bottom-color: var(--orvia-line, rgba(255, 255, 255, 0.1));
  color: var(--orvia-text-muted, rgba(255, 255, 255, 0.5));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-input {
  color: var(--orvia-text, #f5f5f0);
}

html[data-orvia-resolved-theme="dark"] .orvia-search-input::placeholder {
  color: var(--orvia-text-muted, rgba(255, 255, 255, 0.35));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--orvia-text-muted, rgba(245, 247, 250, 0.55));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-hint {
  color: var(--orvia-text-muted, rgba(255, 255, 255, 0.45));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-result.active a {
  background: var(--orvia-control-active, rgba(255, 255, 255, 0.08));
}

html[data-orvia-resolved-theme="dark"] .orvia-search-result-title {
  color: var(--orvia-text, #f5f5f0);
}

html[data-orvia-resolved-theme="dark"] .orvia-search-result-snippet,
html[data-orvia-resolved-theme="dark"] .orvia-search-empty {
  color: var(--orvia-text-secondary, rgba(255, 255, 255, 0.55));
}
