/* The only custom CSS in /_base/. */

/* Quasar has no drag-to-resize drawer. */
.b-drawer-resize {
  position: absolute;
  top: 0;
  right: -3px;
  width: 6px;
  height: 100%;
  cursor: col-resize;
  z-index: 10;
}

/*
 * Foregrounds for Quasar's coloured fills. m3-tokens' bridge re-points
 * --q-primary etc. at M3 roles but Quasar still pairs every `color="x"`
 * with text-white, and dark mode's roles are light: white on them is
 * about 1.7:1. Pair each fill with its M3 on-* role instead. These are
 * class rules, so var() resolves on the element and follows dark mode.
 */
.bg-primary.text-white { color: var(--md-sys-color-on-primary) !important; }
.bg-secondary.text-white { color: var(--md-sys-color-on-secondary) !important; }
.bg-accent.text-white { color: var(--md-sys-color-on-tertiary) !important; }
.bg-negative.text-white { color: var(--md-sys-color-on-error) !important; }

/*
 * positive/info/warning have no M3 role and are light-ish in both modes,
 * so they take dark text in both: on-surface in light mode, the inverse
 * in dark mode.
 */
.bg-positive.text-white,
.bg-info.text-white,
.bg-warning.text-white { color: var(--md-sys-color-on-surface) !important; }
.body--dark .bg-positive.text-white,
.body--dark .bg-info.text-white,
.body--dark .bg-warning.text-white { color: var(--md-sys-color-inverse-on-surface) !important; }

/* Quasar hard-codes the timeline dot icon white; surface contrasts with
   a filled dot in both modes. */
.q-timeline__dot .q-icon { color: var(--md-sys-color-surface); }

/*
 * m3-tokens fades captions, overlines, side sections and list headers
 * with color-mix(currentColor 70%). Chromium keeps the colour that
 * mix resolved to when the page loaded: switching dark -> light (the
 * settings toggle, or the OS in auto mode) left them white on a light
 * page, even after a style recalc. Mixing from the on-surface token
 * instead follows the switch. The cost: inside a filled container these
 * no longer take that container's on-* colour.
 */
.q-item__label--caption,
.q-item__label--overline,
.q-item__section--side:not(.q-item__section--avatar),
.q-item__label--header {
  color: color-mix(in srgb, var(--md-sys-color-on-surface) 70%, transparent);
}
