*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    direction: rtl;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 80px;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text);
    background: var(--color-background);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

    button:disabled {
        cursor: not-allowed;
        opacity: .6;
    }

button,
input,
select,
textarea {
    outline-offset: 3px;
}

:focus-visible {
    outline: 2px solid var(--color-primary);
}

/* Keep route announcements for assistive technology without outlining headings. */
:is(h1, h2)[tabindex="-1"]:focus {
    outline: none;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    vertical-align: middle;
}

::selection {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

/* Blazor Error UI */

#blazor-error-ui {
    display: none;
    position: fixed;
    inset-inline: 16px;
    bottom: 16px;
    padding: 16px;
    z-index: 9999;
    background: #fff1f2;
    color: #991b1b;
    border: 1px solid #fecdd3;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

    #blazor-error-ui .reload {
        margin-inline-start: 12px;
        font-weight: 700;
        text-decoration: underline;
    }

    #blazor-error-ui .dismiss {
        position: absolute;
        top: 8px;
        left: 12px;
        cursor: pointer;
    }

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
