/* Standalone color tokens are inherited by FridayBoard views and dialogs. */
:root {
    --fb-paper: #fbfcfa;
    --fb-canvas: #f2f5f2;
    --fb-tint: #e8efea;
    --fb-line: #d4ded8;
    --fb-ink: #26383d;
    --fb-muted: #516368;
    --fb-accent: #2d665e;
    --fb-accent-hover: #22544d;
    --fb-focus: #296658;
    --ws-paper: var(--fb-paper);
    --ws-ink: var(--fb-ink);
    --ws-muted: var(--fb-muted);
    --ws-teal: var(--fb-accent);
    --ws-line: var(--fb-line);
    --ws-bg: var(--fb-canvas);
    --bs-tertiary-color: var(--fb-muted);
}
body { background: var(--fb-canvas); color: var(--fb-ink); }
.fridayboard-shell-header { align-items: center; background: #e3ece6; color: var(--fb-ink); display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; min-height: 3.5rem; padding: .6rem 1.2rem; }
.fridayboard-shell-header a { color: inherit; }
.fridayboard-account .btn-outline-light {
    --bs-btn-color: var(--fb-ink);
    --bs-btn-border-color: #687f75;
    --bs-btn-hover-color: var(--fb-ink);
    --bs-btn-hover-bg: #d3e1d9;
    --bs-btn-hover-border-color: #687f75;
    --bs-btn-active-color: var(--fb-ink);
    --bs-btn-active-bg: #cbdcd3;
    --bs-btn-active-border-color: #687f75;
}
.fridayboard-brand { font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.fridayboard-account, .ws-fridayboard-nav { align-items: center; display: flex; flex-wrap: wrap; gap: .8rem; }
.fridayboard-shell-view { min-width: 0; }
.ws-fridayboard-nav { background: var(--fb-paper); border-bottom: 1px solid var(--fb-line); padding: .6rem 1.2rem; }
.ws-fridayboard-nav a { color: var(--fb-accent); }
.ws-fridayboard-preferences, .ws-fridayboard-workspace > form { margin: .5rem 1.2rem; }
.fridayboard-login { background: var(--fb-paper); border: 1px solid var(--fb-line); border-radius: .75rem; margin: 3rem auto; max-width: min(26rem, calc(100% - 2rem)); padding: 1.5rem; }
.fridayboard-login input:not([type=hidden]) { display: block; width: 100%; }

.fridayboard-login .btn-primary {
    --bs-btn-bg: var(--fb-accent);
    --bs-btn-border-color: var(--fb-accent);
    --bs-btn-hover-bg: var(--fb-accent-hover);
    --bs-btn-hover-border-color: var(--fb-accent-hover);
}

.fridayboard-shell-header :is(a, button):focus-visible,
.ws-fridayboard-nav a:focus-visible {
    outline: 2px solid var(--fb-focus);
    outline-offset: 3px;
}

/* Keep the border's space on focus and draw the keyboard ring outside the field. */
:is(#fridayboard, .fridayboard-login) :is(
    input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=button], [type=submit], [type=reset]),
    textarea,
    select
):focus {
    border-color: transparent !important;
    box-shadow: none !important;
}
:is(#fridayboard, .fridayboard-login) :is(
    input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=button], [type=submit], [type=reset]),
    textarea,
    select
):focus-visible {
    outline: 2px solid var(--fb-focus) !important;
    outline-offset: 3px !important;
}


.ws-fridayboard-layout {
    display: grid;
    grid-template-columns: clamp(12rem, 19vw, 17rem) minmax(0, 1fr);
    align-items: stretch;
}
.ws-fridayboard-sidebar {
    min-width: 0;
    max-height: calc(100dvh - 8rem);
    overflow-y: auto;
    border-inline-end: 1px solid var(--fb-line);
    background: var(--fb-paper);
    padding: .875rem 1rem;
}
.ws-fridayboard-workspace { min-width: 0; }
.ws-fridayboard-workspace [data-fridayboard-host] > :is(.fb-dash, .fb-my-work) {
    padding-inline: clamp(.75rem, 2vw, 1.5rem);
}
.ws-fridayboard-shortcuts > summary { font-weight: 700; }
.ws-fridayboard-shortcuts summary { padding: .35rem .3rem; cursor: pointer; overflow-wrap: anywhere; }
.ws-fridayboard-shortcuts nav { padding-block: .35rem; }
.ws-sidebar-group > summary { color: var(--fb-muted); font-size: .875rem; font-weight: 600; }
.ws-sidebar-group ul { list-style: none; margin: 0; padding: 0; }
.ws-sidebar-group button {
    width: 100%;
    text-align: start;
    overflow-wrap: anywhere;
    border: 0;
    border-radius: .35rem;
    background: transparent;
    color: var(--fb-ink);
    padding: .375rem .5rem .375rem 1rem;
    font: inherit;
}
.ws-sidebar-group .ws-sidebar-subitems { padding-inline-start: 1.75rem; font-size: .875rem; }
.ws-sidebar-group button:hover,
.ws-sidebar-group button[aria-current="page"] { background: var(--fb-tint); }
.ws-sidebar-group button[aria-current="page"] { color: var(--fb-accent-hover); font-weight: 700; }
.ws-fridayboard-shortcuts :is(button, summary):focus-visible { outline: 2px solid var(--fb-focus); outline-offset: 2px; }
.ws-fridayboard-shortcuts nav > p { margin: .25rem .3rem; color: var(--fb-muted); font-size: .875rem; }

@media (max-width: 760px) {
    .ws-fridayboard-layout { grid-template-columns: minmax(0, 1fr); }
    .ws-fridayboard-sidebar {
        max-height: min(40dvh, 20rem);
        border-inline-end: 0;
        border-bottom: 1px solid var(--fb-line);
        padding-block: .5rem;
    }
}
