/*
    askELAH global styles. The brand tokens match assets/brand/README.md; keep the two in step.
    Component styles live next to each component, in its .razor.css file.
*/

/* Quicksand Bold, SIL Open Font License 1.1 (see fonts/Quicksand-OFL.txt). Open Sans, Apache License 2.0. */
@font-face {
    font-family: "Quicksand";
    font-weight: 700;
    font-display: swap;
    src: url("fonts/Quicksand-Bold.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-weight: 400;
    font-display: swap;
    src: url("fonts/OpenSans-Regular.ttf") format("truetype");
}

@font-face {
    font-family: "Open Sans";
    font-weight: 600;
    font-display: swap;
    src: url("fonts/OpenSans-Semibold.ttf") format("truetype");
}

:root {
    /* itspurelove.com brand palette: black, white, gray, and red. */
    --elah-background: #0E0E10;
    --elah-surface: #1C1C1F;
    --elah-outline: #3A3A40;
    --elah-text: #F5F5F5;
    --elah-muted: #9A9AA0;
    --elah-red: #ED1C24;

    --elah-font: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --elah-font-wordmark: "Quicksand", var(--elah-font);

    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    /* Phones with notches and home indicators: keep content inside the safe area. */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    background: var(--elah-background);
    color: var(--elah-text);
    font-family: var(--elah-font);
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* The phone app's host page and the web app's root element both fill the screen. */
#app {
    height: 100%;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
    touch-action: manipulation;
}

/* A visible focus ring for keyboard users, and none for taps and clicks. */
:focus-visible {
    outline: 2px solid var(--elah-text);
    outline-offset: 3px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* Read by screen readers, hidden on screen. */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* The web host's error page, shown outside Development. */
.error-page {
    display: grid;
    place-content: center;
    height: 100%;
    padding: 24px;
    text-align: center;
}

.error-page-id {
    color: var(--elah-muted);
    font-size: 13px;
}

/* Shown in place of a component that failed to render. */
.blazor-error-boundary {
    padding: 16px;
    background: var(--elah-surface);
    color: var(--elah-text);
}

    .blazor-error-boundary::after {
        content: "Something went wrong.";
    }
