/* One local SVG family: no emoji rendering, icon fonts, CDN or extra requests. */
.ui-icon { display: inline-block; flex: 0 0 auto; vertical-align: -.15em; pointer-events: none; }
.nav-icon > .ui-icon { display: block; width: 20px; height: 20px; }
.app-icon > .ui-icon { width: 24px; height: 24px; }
.quick-create > .ui-icon { margin-inline-end: 4px; }
/* Django also uses the old eye in filter-count and inline-view link backgrounds. */
#container :is(.viewlink, .inlineviewlink, .hidelink) {
  display: inline-flex; align-items: center; gap: 7px;
  padding-inline-start: 0; background-image: none;
}
#container :is(.viewlink, .inlineviewlink, .hidelink)::before {
  content: ""; display: inline-block; flex: 0 0 16px; width: 16px; height: 16px;
  background-color: currentColor;
  --ui-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3h7v7m0-7L10 14m-2-9H5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-3'/%3E%3C/svg%3E");
  -webkit-mask: var(--ui-link-icon) center / contain no-repeat;
  mask: var(--ui-link-icon) center / contain no-repeat;
}
#changelist-filter .viewlink::before {
  --ui-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M4 20V10m8 10V4m8 16v-7'/%3E%3C/svg%3E");
}
#container .hidelink::before {
  --ui-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Cpath d='M8 12h8'/%3E%3C/svg%3E");
}
#changelist-filter-extra-actions :is(.viewlink, .hidelink) {
  box-sizing: border-box; min-height: 44px; padding: 8px 12px;
  border: 1px solid #d8dfeb; border-radius: 9px; background-color: #f7f9fc;
  color: #00035b; font-size: 12px; line-height: 1.4; text-transform: none;
}
#content .related-widget-wrapper > .related-widget-wrapper-link:has(> .ui-icon) {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 36px; width: 36px; height: 38px; margin: 0; padding: 8px;
  border: 1px solid #d8dfeb; border-radius: 9px; background: #f7f9fc;
  color: #00035b; opacity: 1; filter: none; text-decoration: none;
}
#content .related-widget-wrapper > .related-widget-wrapper-link:not([href]):has(> .ui-icon) { opacity: .4; }
#content .related-widget-wrapper > .related-widget-wrapper-link[href]:has(> .ui-icon):hover { background: #eaf0fa; border-color: #8b9cbd; }
#content .related-widget-wrapper > .delete-related:has(> .ui-icon) { color: #a31b35; }
#content .related-widget-wrapper > .related-widget-wrapper-link:has(> .ui-icon):focus-visible { outline: 2px solid #00035b; outline-offset: 3px; }
@media (max-width: 1024px), (pointer: coarse) {
  #content .related-widget-wrapper > .related-widget-wrapper-link:has(> .ui-icon) {
    flex-basis: 44px; width: 44px; height: 44px; padding: 12px;
  }
}
@media (forced-colors: active) {
  #changelist-filter-extra-actions :is(.viewlink, .hidelink) { color: LinkText; border-color: ButtonText; background-color: Canvas; }
  #content .related-widget-wrapper > .related-widget-wrapper-link:has(> .ui-icon) { color: LinkText; border-color: ButtonText; background: Canvas; }
}
