/*
 * LSML language suggestion bar.
 *
 * Neutral by default. A theme restyles it by setting these custom properties
 * (on :root or any ancestor) instead of overriding selectors:
 * --lsml-suggest-bg, -fg, -muted, -accent, -accent-fg, -radius, -shadow.
 */
.lsml-suggest {
  position: fixed;
  left: 16px;
  right: 16px;
  z-index: 99990;
  box-sizing: border-box;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 48px 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--lsml-suggest-bg, #1f2330);
  color: var(--lsml-suggest-fg, #ffffff);
  border-radius: var(--lsml-suggest-radius, 14px);
  box-shadow: var(--lsml-suggest-shadow, 0 12px 32px rgba(15, 20, 30, 0.22));
  font: inherit;
  font-size: 15px;
  line-height: 1.45;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.lsml-suggest--bottom {
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  transform: translateY(calc(100% + 32px));
}

.lsml-suggest--top {
  top: calc(16px + env(safe-area-inset-top, 0px));
  transform: translateY(calc(-100% - 32px));
}

.lsml-suggest.is-visible {
  opacity: 1;
  transform: none;
}

.lsml-suggest__text {
  flex: 1 1 220px;
  margin: 0;
}

.lsml-suggest__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.lsml-suggest__switch {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--lsml-suggest-accent, #ffffff);
  color: var(--lsml-suggest-accent-fg, #1f2330);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.lsml-suggest__switch:hover,
.lsml-suggest__switch:focus-visible {
  text-decoration: underline;
}

.lsml-suggest__stay {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--lsml-suggest-muted, rgba(255, 255, 255, 0.75));
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.lsml-suggest__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--lsml-suggest-muted, rgba(255, 255, 255, 0.75));
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lsml-suggest__close:hover {
  color: var(--lsml-suggest-fg, #ffffff);
}

.lsml-suggest a:focus-visible,
.lsml-suggest button:focus-visible {
  outline: 2px solid var(--lsml-suggest-fg, #ffffff);
  outline-offset: 2px;
}

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