/* Shared, theme-aware form controls for every Luna page and community view. */
:root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not(.settings-search-input),
:root body textarea,
:root body select {
  color: var(--text);
  background-color: color-mix(in srgb, var(--panel) 60%, var(--bg));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line));
  border-radius: 12px;
  box-shadow: inset 0 1px 0 #ffffff08;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

:root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not(.settings-search-input):hover,
:root body textarea:hover,
:root body select:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
}

:root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not(.settings-search-input):focus-visible,
:root body textarea:focus-visible,
:root body select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), 0 0 24px color-mix(in srgb, var(--accent) 12%, transparent);
}

:root body input::placeholder,
:root body textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
  opacity: 1;
}

:root body textarea { line-height: 1.55; }

:root body input[type=checkbox],
:root body input[type=radio] { accent-color: var(--accent); }

.social-mention-picker {
  position: absolute;
  z-index: 8;
  left: 18px;
  bottom: calc(100% - 12px);
  width: min(320px, calc(100% - 36px));
  max-height: 230px;
  overflow: auto;
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 93%, var(--bg));
  box-shadow: 0 16px 42px #0008;
  backdrop-filter: blur(18px);
}

.social-mention-picker[hidden] { display: none; }
.social-mention-option { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text); text-align: left; font-size: 12px; }
.social-mention-option:hover, .social-mention-option:focus-visible { background: color-mix(in srgb, var(--accent) 15%, transparent); }
.social-mention-link { color: var(--accent); font-weight: 700; text-decoration: none; }
.social-mention-link:hover { text-decoration: underline; }
.social-compose { position: relative; }

@media (max-width: 700px) {
  :root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not(.settings-search-input),
  :root body select { min-height: 44px; }
  .social-mention-picker { left: 10px; bottom: calc(100% - 8px); width: min(340px, calc(100% - 20px)); }
}

@media (prefers-reduced-motion: reduce) {
  :root body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not(.settings-search-input),
  :root body textarea,
  :root body select { transition: none; }
}
