/* The fonts are the same as the ones of the ASP.NET Core home page, Open Sans and Space Grotesk (SIL Open Font License, see fonts/LICENSE-FONTS.txt). */
@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/open-sans-latin-400.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/open-sans-latin-600.woff2") format("woff2");
}

@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/open-sans-latin-700.woff2") format("woff2");
}

@font-face {
    font-family: "Space Grotesk";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/space-grotesk-latin-700.woff2") format("woff2");
}

/* The color mode follows the system by default. The "data-theme" attribute of the root element overrides it. */
:root {
    color-scheme: light dark;

    --bg: light-dark(#fafafa, #1f1f1f);
    --bg-2: light-dark(#ffffff, #292929);
    --bg-code: light-dark(#f7f2f8, #252526);
    --text: light-dark(#141414, #f5f5f5);
    --muted: light-dark(#5a5a5a, #b8b8b8);
    --border: light-dark(rgb(0 0 0 / 12%), rgb(255 255 255 / 16%));
    --primary: light-dark(#682a7b, #cfa0de);
    --primary-hover: light-dark(#571f69, #d9b3e5);
    --primary-active: light-dark(#431851, #e4c8ec);
    --on-primary: light-dark(#ffffff, #141414);
    --tint: light-dark(rgb(104 42 123 / 8%), rgb(207 160 222 / 14%));
    --g1: light-dark(#682a7b, #c08ad3);
    --g2: light-dark(#c9318a, #ec7fb8);
    --gradient: linear-gradient(128.87deg, var(--g1) 14.05%, var(--g2) 89.3%);
    --error: light-dark(#b3261e, #f2b8b5);
    --success: light-dark(#1b6e3a, #8fd6a5);

    --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --font-heading: "Space Grotesk", Helvetica, Arial, sans-serif;
    --font-mono: Consolas, Menlo, Monaco, "Courier New", monospace;
}

/* The color tokens are registered as colors, so that the browser can animate them when the color mode changes.
   Every color on the page comes from these tokens, so the whole page fades instead of flashing.
   The colors of code blocks are registered in code.css. */
@property --bg { syntax: "<color>"; inherits: true; initial-value: #fafafa; }
@property --bg-2 { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --bg-code { syntax: "<color>"; inherits: true; initial-value: #f7f2f8; }
@property --text { syntax: "<color>"; inherits: true; initial-value: #141414; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #5a5a5a; }
@property --border { syntax: "<color>"; inherits: true; initial-value: rgb(0 0 0 / 12%); }
@property --primary { syntax: "<color>"; inherits: true; initial-value: #682a7b; }
@property --primary-hover { syntax: "<color>"; inherits: true; initial-value: #571f69; }
@property --primary-active { syntax: "<color>"; inherits: true; initial-value: #431851; }
@property --on-primary { syntax: "<color>"; inherits: true; initial-value: #ffffff; }
@property --tint { syntax: "<color>"; inherits: true; initial-value: rgb(104 42 123 / 8%); }
@property --g1 { syntax: "<color>"; inherits: true; initial-value: #682a7b; }
@property --g2 { syntax: "<color>"; inherits: true; initial-value: #c9318a; }
@property --error { syntax: "<color>"; inherits: true; initial-value: #b3261e; }
@property --success { syntax: "<color>"; inherits: true; initial-value: #1b6e3a; }

:root {
    transition:
        --bg .2s ease, --bg-2 .2s ease, --bg-code .2s ease, --text .2s ease, --muted .2s ease, --border .2s ease,
        --primary .2s ease, --primary-hover .2s ease, --primary-active .2s ease, --on-primary .2s ease,
        --tint .2s ease, --g1 .2s ease, --g2 .2s ease, --error .2s ease, --success .2s ease,
        --code-text .2s ease, --code-comment .2s ease, --code-keyword .2s ease, --code-string .2s ease, --code-number .2s ease,
        --code-function .2s ease, --code-type .2s ease, --code-variable .2s ease, --code-operator .2s ease;
}

@media (prefers-reduced-motion: reduce) {
    :root {
        transition: none;
    }
}

:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .75rem;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }

h1:focus {
    outline: none;
}

p { margin: 0 0 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

code {
    font-family: var(--font-mono);
    font-size: .925em;
}

:not(pre) > code {
    padding: .1em .35em;
    border-radius: .25rem;
    background: var(--tint);
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.lead {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 46rem;
}

.gradient-text {
    background: var(--gradient);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: .65rem 1.4rem;
    border: 1px solid transparent;
    border-radius: .25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease-in-out, border-color .15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--on-primary);
}

.btn-primary:active {
    background: var(--primary-active);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--tint);
    color: var(--primary);
}

.btn-small {
    padding: .3rem .9rem;
    font-size: .9rem;
}

/* A glow that comes and goes on the buttons that a query waits for the user to choose from. */
.btn-awaiting {
    animation: btn-awaiting 2s ease-in-out infinite;
}

@keyframes btn-awaiting {
    50% {
        box-shadow: 0 0 .6rem .2rem var(--primary);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-awaiting {
        animation: none;
        box-shadow: 0 0 .4rem .1rem var(--primary);
    }
}

/* The controls are disabled until the app starts. */
button:disabled,
textarea:disabled {
    cursor: progress;
    opacity: .6;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* The documents written in Markdown. */
.markdown-body h1 { font-size: 2.25rem; margin-bottom: 1.25rem; }
.markdown-body h2 { font-size: 1.6rem; margin-top: 2.5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.markdown-body h3 { font-size: 1.2rem; margin-top: 1.75rem; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5rem; margin: 0 0 1rem; }
.markdown-body li { margin-bottom: .25rem; }

.markdown-body table {
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    display: block;
    overflow-x: auto;
}

.markdown-body th, .markdown-body td {
    border: 1px solid var(--border);
    padding: .4rem .75rem;
    text-align: left;
    vertical-align: top;
}

.markdown-body th {
    background: var(--tint);
}

.markdown-body blockquote {
    margin: 0 0 1rem;
    padding: .5rem 1rem;
    border-left: 4px solid var(--primary);
    background: var(--tint);
}

.markdown-body blockquote p:last-child {
    margin-bottom: 0;
}

.loading {
    display: grid;
    place-items: center;
    min-height: 100vh;
    color: var(--muted);
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 0 0 0;
    padding: .6rem 1.25rem;
    background: #fff3cd;
    color: #664d03;
    box-shadow: 0 -1px 2px rgb(0 0 0 / 20%);
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: .75rem;
    top: .5rem;
    cursor: pointer;
}

@media (max-width: 767px) {
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.6rem; }
    .section { padding: 3rem 0; }
}
