/* Afranga redesign · Design tweaks drawer. Author: Georgi.
   One black button at the bottom right opens a drawer on the right with every option for the pages and their sections.
   The drawer is tool chrome, not part of the design: it has its own size base, so it stays the same when the page beside it is scaled. */

.rd-btn, .rd { font: 500 14px/1.3 "Onest", system-ui, sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: 0; text-align: left; box-sizing: border-box; }
.rd *, .rd *::before, .rd *::after { box-sizing: border-box; }

.rd-btn { position: fixed; right: 1.5em; bottom: 1.5em; z-index: 9000; display: inline-flex; align-items: center; gap: .625em; height: 3.25em; padding: 0 1.375em 0 1.125em; border: 0; border-radius: 99em; background: #141414; color: #fff; font-weight: 600; cursor: pointer; box-shadow: 0 .5em 2em rgba(20, 20, 20, .25); }
.rd-btn svg { width: 1.25em; height: 1.25em; }
.rd-btn:focus-visible { outline: 2px solid #141414; outline-offset: 3px; }
.is-rd-open .rd-btn { display: none; }

.rd { position: fixed; top: 0; right: 0; bottom: 0; z-index: 9001; display: none; flex-direction: column; width: 24em; max-width: 100vw; background: #141414; color: #fff; }
.is-rd-open .rd { display: flex; }
.rd__head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 1.25em 1.25em 1em 1.5em; border-bottom: 1px solid #2a2a2a; }
.rd__title { font-size: 1.125em; font-weight: 700; }
.rd__close { width: 2.5em; height: 2.5em; padding: 0; border: 0; border-radius: 50%; background: #2a2a2a; color: #fff; display: grid; place-items: center; cursor: pointer; }
.rd__close svg { width: 1em; height: 1em; }
.rd__body { flex: 1; overflow-y: auto; padding: 0 1.5em 2em; overscroll-behavior: contain; }

.rd__group { padding: 1.25em 0; border-bottom: 1px solid #2a2a2a; }
.rd__group:last-child { border-bottom: 0; }
.rd__group[hidden], .rd__ctl[hidden] { display: none; }
.rd__group-title { margin: 0 0 .75em; font-size: .8125em; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8c8c8c; }
.rd__group-title--sec { display: flex; align-items: center; justify-content: space-between; text-transform: none; letter-spacing: 0; font-size: 1em; color: #fff; }
.rd__goto { padding: .25em 0; border: 0; background: none; color: #8c8c8c; font: inherit; font-size: .8125em; font-weight: 500; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

.rd__ctl + .rd__ctl { margin-top: .875em; }
.rd__ctl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1em; margin-bottom: .4375em; }
.rd__label { color: #a3a3a3; font-size: .875em; }
.rd__now { color: #d4d4d4; font-size: .8125em; text-align: right; }

/* a row of small buttons: letters or numbers */
.rd__seg { display: flex; flex-wrap: wrap; gap: .125em; padding: .1875em; background: #2a2a2a; border-radius: 1.25em; }
.rd__opt { flex: 1 0 2.25em; min-width: 2.25em; height: 2.25em; padding: 0 .5em; border: 0; border-radius: 99em; background: none; color: #d4d4d4; font: inherit; font-variant-numeric: tabular-nums; cursor: pointer; }
.rd__opt.is-on { background: #fff; color: #141414; font-weight: 700; }

/* a list of named rows: pages, layouts, colours */
.rd__list { display: grid; gap: .25em; }
.rd__row { display: flex; align-items: center; gap: .75em; width: 100%; min-height: 2.75em; padding: .5em .875em; border: 0; border-radius: .75em; background: #1f1f1f; color: #d4d4d4; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.rd__row.is-on { background: #fff; color: #141414; font-weight: 600; }
.rd__row-n { flex: none; width: 1.5em; color: #8c8c8c; font-variant-numeric: tabular-nums; }
.rd__row.is-on .rd__row-n { color: #141414; }
.rd__swatch { flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .25); }
.rd__row.is-on .rd__swatch { box-shadow: 0 0 0 1px rgba(20, 20, 20, .2); }

.rd__reset { margin-top: .75em; padding: .25em 0; border: 0; background: none; color: #8c8c8c; font: inherit; font-size: .8125em; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.rd__opt:focus-visible, .rd__row:focus-visible, .rd__close:focus-visible, .rd__goto:focus-visible, .rd__reset:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* the page moves aside and is scaled to the room that is left, so nothing hides under the drawer */
.is-rd-open body { margin-right: var(--rd-w, 0px); }
.is-rd-open .hm { font-size: calc(16px * var(--rd-scale, 1)); }
