/* Icons: inline SVG sprite (templates/backend/include/icons.html).
   Linked after theme.css. Strokes follow currentColor, so an icon takes the
   colour of the text around it. */

.ds-icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ds-icon {
    display: inline-block;
    flex: none;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    color: inherit;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}
.ds-icon--sm { width: 14px; height: 14px; }
.ds-icon--md { width: 18px; height: 18px; }
.ds-icon--lg { width: 20px; height: 20px; }
.ds-icon--xl { width: 40px; height: 40px; }
/* Scale with the surrounding font size instead of a fixed box. */
.ds-icon--em { width: 1em; height: 1em; }

/* ---------- Spans still written as Material Symbols ----------
   static/js/icons.js draws the sprite icon inside each
   <span class="material-symbols-outlined">name</span> and marks it with
   data-icon. These rules keep the span at the glyph's old box (1em square at
   the font size its context sets, 24px by default) and hide the ligature
   text until then, so no "expand_more" ever flashes. :where() keeps them at
   zero specificity: any page rule that sizes the span still wins. */
:where(.material-symbols-outlined) {
    display: inline-block;
    width: 1em;
    height: 1em;
    font-size: 24px;
    font-style: normal;
    font-weight: normal;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    direction: ltr;
}
.material-symbols-outlined:not([data-icon]) { overflow: hidden; color: transparent !important; }
.material-symbols-outlined > .ds-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: top;
}
/* The pwa.js "Install app" entry sits beside sprite icons in the menu. */
.profile-dropdown .material-symbols-outlined { font-size: 16px; }

/* ---------- Placement ---------- */

/* Rails and bottom bar. */
.sidebar .nav-item .nav-link .ds-icon { opacity: 0.85; }
.sidebar .nav-item .nav-link.active .ds-icon,
.sidebar .nav-item .nav-link:hover .ds-icon { opacity: 1; }
.mobile-sidebar .nav-item .nav-link .ds-icon { width: 20px; height: 20px; }
.mobile-sidebar .morebtn { display: inline-flex; align-items: center; justify-content: center; }
.close-sign .ds-icon { width: 20px; height: 20px; }
.scroll-to-top .ds-icon { width: 18px; height: 18px; }

/* Top bar and menus. */
.topbar .icon-btn .ds-icon,
.topbar .nav-link .ds-icon,
.icon-btn > .ds-icon { width: 18px; height: 18px; }
.client-logout .ds-icon { width: 14px; height: 14px; }
.profile-dropdown .dropdown-item .ds-icon { color: var(--ds-text-muted); }
.profile-dropdown .dropdown-item:hover .ds-icon { color: var(--ds-text); }

/* Dashboard tool tiles, offers, empty states and section choosers. */
.ds-tool__icon .ds-icon { width: 18px; height: 18px; }
.ds-empty__icon { width: 28px; height: 28px; color: var(--ds-text-faint); }
.ds-choice__icon { width: 20px; height: 20px; color: var(--ds-text-muted); }
.ds-choice--soon .ds-choice__icon { color: var(--ds-text-faint); }

/* Lists that used FontAwesome's fa-ul / fa-li for their bullets. */
.fa-ul { margin-left: 2em; padding-left: 0; list-style: none; }
.fa-ul > li { position: relative; }
.fa-li { position: absolute; left: -2em; width: 2em; text-align: center; line-height: inherit; }
