/*
 * Storefront base: the two web faces, element defaults, the type per language, the focus ring, the skip
 * link, reduced motion, and the few utilities Bootstrap 5.3.8 lacks.
 *
 * Written with logical properties only, so one file serves both reading directions on top of the
 * direction's own Bootstrap build. Nothing here names a physical side.
 */

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../../fonts/dmsans/dm-sans-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
                   U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "DM Sans";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../../fonts/dmsans/dm-sans-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
                   U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
                   U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "IRANYekanX";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/iranyekanx/IRANYekanX-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "IRANYekanX";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../../fonts/iranyekanx/IRANYekanX-Bold.woff2") format("woff2");
}

:root {
    --sf-font: var(--sf-font-latin);
    --sf-leading: var(--sf-leading-latin);
}

:root:lang(fa) {
    --sf-font: var(--sf-font-persian);
    --sf-leading: var(--sf-leading-persian);
}

.sf-shell,
.sf-shell button,
.sf-shell input,
.sf-shell select {
    font-family: var(--sf-font);
}

/* A word in the other language — the language switcher names each language in itself — declares its language,
   and the declared language, not the page around it, chooses the face. */
.sf-shell [lang|="fa"] {
    font-family: var(--sf-font-persian);
}

.sf-shell [lang|="en"] {
    font-family: var(--sf-font-latin);
}

.sf-shell {
    color: var(--sf-ink);
    font-size: var(--sf-text-body);
    line-height: var(--sf-leading);
}

.sf-shell a {
    color: inherit;
    text-decoration: none;
    transition: color var(--sf-transition);
}

.sf-shell a:hover {
    color: var(--sf-accent-ink);
}

/* Only colour changes animate. A transition on everything, as theme templates give every button, also delays an
   inherited visibility, so a control inside a panel that has just opened could not take focus yet. */
.sf-shell button {
    transition: color var(--sf-transition), background-color var(--sf-transition);
}

.sf-shell ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Persian has no italic and no capitals; nothing borrowed from a Latin design may impose either. */
:lang(fa) .sf-shell em,
:lang(fa) .sf-shell i {
    font-style: normal;
}

/* Departure 6: every interactive control shows where the keyboard is, whatever the template did. */
/* A target focused only by script (tabindex="-1", such as the page heading Blazor focuses after each
   navigation) cannot be reached from the keyboard, so it is not ringed. */
.sf-shell [tabindex="-1"]:focus {
    outline: none;
}

.sf-shell :is(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: var(--sf-focus-width) solid var(--sf-focus);
    outline-offset: var(--sf-focus-offset);
}

.sf-on-bar :is(a, button, input, select, summary):focus-visible {
    outline-color: var(--sf-focus-on-bar);
}

.sf-skip-link {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    z-index: 1100;
    padding: 0.75rem 1rem;
    background: var(--sf-bar);
    color: var(--sf-on-bar);
    font-weight: 700;
    transform: translateY(-120%);
}

.sf-skip-link:focus {
    transform: none;
    color: var(--sf-on-bar);
    outline: var(--sf-focus-width) solid var(--sf-focus-on-bar);
    outline-offset: calc(var(--sf-focus-width) * -2);
}

.sf-container {
    width: 100%;
    max-width: var(--sf-container-max);
    margin-inline: auto;
    padding-inline: var(--sf-gutter);
}

.sf-icon {
    display: inline-block;
    flex: none;
    width: 1.125rem;
    height: 1.125rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* An icon that names a direction (a chevron, an arrow) points the way the page reads. */
[dir="rtl"] .sf-icon-directional {
    transform: scaleX(-1);
}

/* Departure 9: no movement for a reader who has asked the system for none. */
@media (prefers-reduced-motion: reduce) {
    .sf-shell *,
    .sf-shell *::before,
    .sf-shell *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
