/*
 * uxactly × shared design system (DesignSystemUIComponents, vendored in vendor/design-system).
 * Maps uxactly's brand onto the system's tokens for the regions that use its components ([data-ds-scope]),
 * and places the appearance menus. Light/dark/contrast come from the boot script's data-ds-theme and
 * data-ds-contrast on <html>; nothing here edits the design system itself.
 */
.Appearance[data-ds-scope] {
    --ds-brand-primary: #0552fe;
    --ds-brand-primary-dark: #86a8ff;
    --ds-font: EuclidFlex, sans-serif;
}
.Appearance[hidden] { display: none; }

/* header: icon-only trigger left of the burger, same centre line. It sits in the header's blend layer and
   uses the burger's pale yellow, which the difference blend turns navy on light pages */
.Appearance--header {
    position: absolute;
    top: -11px;      /* 44px button centred on the 52px burger at top: -15px */
    right: 41px;     /* the burger is 52px wide at right: -15px */
    z-index: 900;
}
.Appearance--header .ds-button { color: #ffffd9; }
:root[data-theme="dark"] .Appearance--header .ds-button { color: #e8ebff; } /* blend is off in dark mode */

/* footer: labelled trigger on the navy footer band */
.Appearance--footer { margin-top: 1rem; }
.Appearance--footer .ds-button { color: #fff; }

/* appearance menu, dressed like the site's own cards: [preview] label – the preview shows the mode, and the
   chosen one wears a bold brand-blue check badge on its corner that pops in when picked */
.Appearance__sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.Appearance .ds-menu {
    border-color: transparent;
    border-radius: 1.25rem;
    box-shadow: .1875rem .1875rem 1.25rem rgba(0, 0, 49, .16), 0 0 0 1px rgba(0, 0, 49, .04);
    padding: .5rem;
    min-inline-size: 15.5rem;
}
.Appearance .ds-menu[data-ds-icons] { --_icon-column: calc(2.75rem + var(--_gap) + .25rem); }
.Appearance .ds-menu-item { grid-template-columns: var(--_icon-column) minmax(0, 1fr); border-radius: .875rem; }
.Appearance .ds-menu-item > [data-ds-menu-label] { grid-area: 1 / 2; } /* Cancel lines up with the mode names */
.Appearance .ds-menu-item[role="menuitemradio"] { align-items: center; min-block-size: 3.5rem; }
.Appearance .ds-menu-item[role="menuitemradio"]:focus { background: rgba(5, 82, 254, .07); }
.Appearance .ds-menu-item > [data-ds-menu-icon] {
    grid-area: 1 / 1; inline-size: 2.75rem; block-size: 1.9375rem; margin: 0;
    border-radius: .375rem; box-shadow: 0 1px 3px rgba(0, 0, 49, .12);
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s;
}
.Appearance .ds-menu-item[role="menuitemradio"]:hover > [data-ds-menu-icon] { transform: rotate(-3deg) scale(1.04); }
.Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-icon] { box-shadow: 0 0 0 2px var(--ds-color-surface), 0 0 0 4px #0552fe; }
.Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-label] { font-weight: 700; }
.Appearance .ds-menu-item[role="menuitemradio"] > [data-ds-menu-check] {
    grid-area: 1 / 1; justify-self: start; align-self: center;
    box-sizing: border-box; inline-size: 1.375rem; block-size: 1.375rem; margin: 0;
    margin-inline-start: calc(2.75rem - .875rem);
    translate: 0 .75rem;
    padding: .1875rem; border-radius: 50%;
    background: #0552fe; color: #fff;
    stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; /* the system's fine check, drawn bold */
    box-shadow: 0 0 0 2px var(--ds-color-surface), 0 2px 6px rgba(5, 82, 254, .45);
    z-index: 1;
}
.Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-check] { animation: uxCheckPop .4s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes uxCheckPop { from { scale: .2; rotate: -40deg; opacity: 0; } to { scale: 1; rotate: 0deg; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .Appearance .ds-menu-item > [data-ds-menu-icon] { transition: none; }
    .Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-check] { animation: none; }
}
:root[data-theme="dark"] .Appearance .ds-menu { box-shadow: .1875rem .1875rem 1.25rem rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .Appearance .ds-menu-item[role="menuitemradio"]:focus { background: rgba(134, 168, 255, .1); }
:root[data-theme="dark"] .Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-icon] { box-shadow: 0 0 0 2px var(--ds-color-surface), 0 0 0 4px #4d7dff; }
:root[data-theme="dark"] .Appearance .ds-menu-item[role="menuitemradio"] > [data-ds-menu-check] { background: #4d7dff; }
:root[data-theme="contrast"] .Appearance .ds-menu { border-color: #000; box-shadow: none; }
:root[data-theme="contrast"] .Appearance .ds-menu-item[aria-checked="true"] > [data-ds-menu-icon] { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #000; }
:root[data-theme="contrast"] .Appearance .ds-menu-item[role="menuitemradio"] > [data-ds-menu-check] { background: #000; }
/* header trigger: no pressed square (the header's difference blend turned the system's light grey into black) */
.Appearance--header .ds-button { background: transparent !important; border-color: transparent !important; transition: transform .2s; }
.Appearance--header .ds-button:hover { transform: rotate(-12deg); }
.Appearance--header .ds-button[aria-expanded="true"] { transform: rotate(180deg); }
