/* SUN visual layer. Official Zulip layout, actions and accessibility are retained. */
html:not(.dark-theme):not(.color-scheme-automatic) {
  --color-background: #f2f6f8;
  --color-background-navbar: #f9fbfc;
  --color-navbar-bottom-border: #dce6ec;
  --color-text-default: #263849;
  --color-text-message-default: #263849;
  --color-text-sidebar-row: #334b5b;
  --color-text-sidebar-base: #263849;
  --color-text-placeholder: #667785;
  --color-background-navigation-item-hover: #e3f0f1;
  --color-background-sidebar-action-hover: #dceef0;
  --color-navbar-icon: #0b7273;
  --color-outline-focus: #0b7273;
  --color-background-search: #fff;
  --color-message-list-border: #dce6ec;
  --color-background-stream-message-content: #fff;
}
@media (prefers-color-scheme: light) {
  html.color-scheme-automatic {
    --color-background: #f2f6f8;
    --color-background-navbar: #f9fbfc;
    --color-navbar-bottom-border: #dce6ec;
    --color-text-default: #263849;
    --color-text-message-default: #263849;
    --color-text-sidebar-row: #334b5b;
    --color-text-sidebar-base: #263849;
    --color-text-placeholder: #667785;
    --color-background-navigation-item-hover: #e3f0f1;
    --color-background-sidebar-action-hover: #dceef0;
    --color-navbar-icon: #0b7273;
    --color-outline-focus: #0b7273;
    --color-message-list-border: #dce6ec;
  }
}
body, input, textarea, button, select {
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", "Segoe UI", sans-serif;
}
h1, h2, h3 { font-family: DengXian, "Microsoft YaHei UI", "PingFang SC", sans-serif; }
#searchbox .navbar-search { border-radius: 9px; }
.message-feed .recipient_row { filter: none; }
.message-feed .recipient_row .message_row:last-of-type {
  box-shadow: 0 2px 5px rgb(30 63 81 / 3%);
}
#compose-container textarea { border-radius: 7px; }
:focus-visible { outline-offset: 2px; }
/* Preserve the native dark layout; improve composer and navigation definition. */
.dark-theme {
  --color-background: #202124;
  --color-text-default: #e8eaed;
  --color-text-message-default: #e8eaed;
  --color-text-placeholder: #aeb5c0;
  --color-outline-focus: #9b8fe0;
  --color-background-navbar: #24252b;
  --color-navbar-bottom-border: #393b47;
  --color-message-list-border: #414451;
}
.dark-theme #compose-textarea {
  border-color: #505465;
  border-radius: 8px;
  line-height: 1.6;
}
.dark-theme #compose-textarea:focus {
  border-color: #9b8fe0;
  box-shadow: 0 0 0 1px #9b8fe0;
}
.dark-theme #searchbox-input-container,
.dark-theme #left-sidebar-search input {
  border-radius: 7px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
