/* K360 Corporate Product Design Manual v2.0 - the global parts of it that MudBlazor's theme
   (Components/ITKSignTheme.cs) can't express. */

/* Public Sans, self-hosted (Kap. 5.2: no font requests to third parties). Variable font, one file
   per subset covers every weight; licence in fonts/PublicSans-OFL.txt. */
@font-face {
    font-family: "Public Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("fonts/public-sans-latin-wght-normal.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: "Public Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url("fonts/public-sans-latin-ext-wght-normal.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;
}

/* Focus ring (Kap. 6.6): 2 px surface inside, 2 px brand-600 (theme Tertiary) outside, so it shows
   on every surface, a blue button included. Only :focus-visible - a mouse click leaves no ring.
   Plain (not :where) selectors on purpose: they must outrank MudBlazor's own box-shadow rules
   (e.g. .mud-button-filled). tabindex="-1" is excluded: those are programmatic focus targets
   such as an opened dialog, which would otherwise get a ring around the whole thing. */
:root {
    --k-fokus: 0 0 0 2px var(--mud-palette-surface), 0 0 0 4px var(--mud-palette-tertiary);
    --k-kurve: cubic-bezier(.2, .9, .3, 1); /* every transition (Kap. 6.5): no bounce, <= 200 ms */
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: none;
    box-shadow: var(--k-fokus);
}

@media (prefers-reduced-motion: reduce) {
    /* Transitions only ("Wege", Kap. 6.5) - a spinner keeps turning, it shows a wait. */
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
    }

    /* The reconnect dialog's entrance is decoration, not a wait indicator. */
    #components-reconnect-modal,
    #components-reconnect-modal[open],
    #components-reconnect-modal::backdrop {
        animation-duration: 0.01ms !important;
        animation-delay: 0s !important;
    }
}

/* Radius set (Kap. 6.3): 7 px buttons/inputs (theme default), 10 px cards, panels and menus,
   12 px dialogs. */
.mud-paper:not(.mud-paper-square) {
    border-radius: 10px;
}

.mud-dialog:not(.mud-dialog-fullscreen) {
    border-radius: 12px;
}

/* Dialogs are level 2 (MudBlazor hard-codes a Material shadow there instead of an elevation var). */
.mud-dialog {
    box-shadow: var(--mud-elevation-24);
}

/* Chips: 8 px (Kap. 6.3) instead of MudBlazor's 12 px. */
.mud-chip {
    border-radius: 8px;
}

/* No uppercase anywhere (Kap. 5.3) - MudBlazor hard-codes it on tabs, outside the theme. */
.mud-tab {
    text-transform: none;
    letter-spacing: normal;
}

/* Status alerts: the status colour as text on a faint tint of itself (Kap. 4.4), instead of
   MudBlazor's derived "-darken"/"-hover" pair. Palette variables, so the dark theme's status
   colours apply there; light mode lands at ~6:1, close to the manual's #166534 on #E7F4E9 etc. */
.mud-alert-text-success { color: var(--mud-palette-success); background-color: color-mix(in srgb, var(--mud-palette-success) 10%, var(--mud-palette-surface)); }
.mud-alert-text-warning { color: var(--mud-palette-warning); background-color: color-mix(in srgb, var(--mud-palette-warning) 10%, var(--mud-palette-surface)); }
.mud-alert-text-error { color: var(--mud-palette-error); background-color: color-mix(in srgb, var(--mud-palette-error) 10%, var(--mud-palette-surface)); }
.mud-alert-text-info { color: var(--mud-palette-info); background-color: color-mix(in srgb, var(--mud-palette-info) 10%, var(--mud-palette-surface)); }

.mud-alert-text-success .mud-alert-icon,
.mud-alert-text-warning .mud-alert-icon,
.mud-alert-text-error .mud-alert-icon,
.mud-alert-text-info .mud-alert-icon {
    color: inherit;
}

/* Structure through edge and space, not shadow (Kap. 6.4/9.1): cards in the content area get a
   1 px edge on top of the soft level-1 shadow. */
.mud-main-content .mud-paper.mud-elevation-1 {
    border: 1px solid var(--mud-palette-lines-default);
}

/* Header (Kopfzeile): light, separated from the content by a line instead of a shadow. Drawn as
   an inset shadow, not a border, so the bar keeps its 56 px the drawer and content are offset by. */
.mud-appbar {
    box-shadow: inset 0 -1px 0 var(--mud-palette-lines-default);
}

/* Navigation drawer = the manual's Rail: always dark (theme), hover #223143, the active entry as
   a brand-600 pad with white text (5.38:1) - MudBlazor's default (primary text on a faint tint)
   would be unreadable on the dark rail. !important because MudBlazor's own active rules come in
   hover/focus/active variants with up to seven classes of specificity. */
@media (hover: hover) and (pointer: fine) {
    .mud-drawer .mud-nav-link:hover:not(.mud-nav-link-disabled) {
        background-color: #223143 !important;
    }
}

/* The drawer scrolls (overflow clips), so the focus ring goes inside the full-width entries, in
   rail colours: rail inside, d-brand-600 outside (#0F6CBD would be only 2.78:1 on the rail). */
.mud-drawer .mud-nav-link:focus-visible {
    box-shadow: inset 0 0 0 2px #1B2836, inset 0 0 0 4px #5CA8DC;
}

.mud-drawer .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    background-color: #0F6CBD !important;
    color: #FFFFFF !important;
}

/* Buttons are flat - no Material elevation (Kap. 8.1: no gloss, no 3D edge); on keyboard focus
   the manual's ring replaces MudBlazor's focus shadow. */
.mud-button-filled,
.mud-button-filled:hover,
.mud-button-filled:active {
    box-shadow: none;
}

.mud-button-root:focus-visible {
    box-shadow: var(--k-fokus);
}

/* Figures line up in tables and key-figure tiles (Kap. 5.3). */
.mud-table,
.stat-tile {
    font-variant-numeric: tabular-nums;
}

h1:focus {
    outline: none;
}

/* MudBlazor reserves a 36px start-margin on an icon-less MudMenuItem's text whenever the same
   menu also has an item with an icon (to align with it) - the account menu's disabled username
   row has no such sibling requirement, so center its text and let it use the full row instead.
   This can't be a component-scoped .razor.css rule: MudMenu portals its popover content into
   MudPopoverProvider (rendered elsewhere under <body>), so it's never a DOM descendant of
   whatever scoped element MainLayout itself renders. !important is needed to outrank MudBlazor's
   own more specific ":has()"-based selector. */
.username-menu-item .mud-menu-item-text {
    margin-inline-start: 0 !important;
    text-align: center;
    width: 100%;
}
/* Version link pinned to the bottom of the navigation drawer (MainLayout.razor). Global, not
   scoped: the elements are rendered by MudNavMenu/MudNavLink, not by MainLayout itself. */
.drawer-footer {
    margin-top: auto;
    border-top: 1px solid #2A343E; /* d-linie: the rail is dark in both modes */
}

.drawer-footer .version-link {
    position: relative;
}

.drawer-footer .version-link .mud-nav-link-text,
.drawer-footer .version-link .mud-nav-link-icon {
    color: var(--mud-palette-drawer-icon);
}

.drawer-footer .version-link .mud-nav-link-text {
    font-size: 0.8125rem;
}

.drawer-footer .version-link.has-unseen .mud-nav-link-icon {
    color: var(--mud-palette-drawer-text);
}

/* Unseen-releases dot on the icon - stays visible in the collapsed mini drawer too. Zirben accent,
   the manual's marker for "neu / ungelesen" (Kap. 4.1); its dark-surface variant, since the rail
   is dark in both modes. */
.drawer-footer .version-link.has-unseen::after {
    content: "";
    position: absolute;
    left: 30px;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #F2A66E;
    box-shadow: 0 0 0 2px var(--mud-palette-drawer-background);
    pointer-events: none;
}

/* WhatsNewDialog body - global, since MudDialog renders the content element itself (CSS isolation
   would not reach it). */
.whats-new-content {
    max-height: 60vh;
    overflow-y: auto;
}
