/* A click keeps the existing border and hard shadow, without an extra ring.
   Text inputs can match :focus-visible even when focused by a pointer. */
html[data-ui-focus="pointer"] :focus,
html[data-ui-focus="pointer"] :is(
  .event-card, .friend-card, .profile-upload, .community-rich-field
):focus-within,
html[data-ui-focus="pointer"] .status-choice input:focus + span {
  outline: none !important;
}
html[data-ui-focus="pointer"] .community-rich-field:focus-within {
  box-shadow: none;
}
/* Form focus adds a shadow of its own; keep the field's resting appearance. */
html[data-ui-focus="pointer"] :is(.workspace, .event-dialog) :is(
  input:not([type="button"], [type="submit"], [type="reset"], [type="checkbox"],
    [type="radio"], [type="file"], [type="range"], [type="hidden"]),
  textarea, select
):focus {
  box-shadow: none;
}
html[data-ui-focus="pointer"] .workspace .feed-search input:focus {
  box-shadow: var(--press) var(--press) 0 var(--ink);
}

/* Keep native scrolling and hit testing; theme existing and future containers.
   Non-auto standard colors override Chromium's pseudo-element styling, so
   the detailed and standard implementations deliberately use separate paths. */
@supports selector(::-webkit-scrollbar) {
  *::-webkit-scrollbar {
    width: var(--ui-scrollbar-size);
    height: var(--ui-scrollbar-size);
    background: var(--ui-scrollbar-track);
  }
  *::-webkit-scrollbar-track {
    background: var(--ui-scrollbar-track);
    border-radius: 0;
  }
  *::-webkit-scrollbar-track:vertical {
    border-left: 2px solid var(--ink);
  }
  *::-webkit-scrollbar-track:horizontal {
    border-top: 2px solid var(--ink);
  }
  *::-webkit-scrollbar-thumb {
    min-height: 40px;
    min-width: 40px;
    border: 2px solid var(--ink);
    border-radius: 0;
    background: var(--ui-scrollbar-thumb);
  }
  *::-webkit-scrollbar-thumb:hover,
  *::-webkit-scrollbar-thumb:active {
    border-color: var(--ink);
    background: var(--ui-scrollbar-active);
  }
  *::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
  }
  *::-webkit-scrollbar-corner {
    background: var(--ui-scrollbar-track);
  }
}
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--ui-scrollbar-thumb) var(--ui-scrollbar-track);
  }
}
@media (forced-colors: active) {
  * {
    scrollbar-color: auto;
  }
}
