/* EFR – application styles on top of the DevExpress Fluent theme.
   Concept, tokens and contrast figures: docs/ui-ux-konzept.md */

:root {
    /* SWMS brand (logo artwork only – never as text colour on white, 2.0:1) */
    --efr-brand-light: #a2c617;
    --efr-brand-dark: #94bb1b;
    /* SWMS green darkened for UI use: 4.8:1 on white (icons, focus ring, small accents) */
    --efr-accent: #5e7d0b;
    /* Read-only text: 8.2:1 on white, still a step quieter than editable text */
    --efr-text-readonly: #4a4f57;
}

html, body {
    height: 100%;
}

app {
    display: block;
    height: 100%;
}

/* Header: SWMS mark as a coloured image, product name in the neutral theme text colour
   (works on light and dark themes). Same pattern as the other SWMS XAF applications. */
.header-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    height: 28px;
    padding-left: 27px;
    background: url('../images/Logo.svg') left center / auto 28px no-repeat;
}

.header-logo::after {
    content: "EFR";
    color: var(--dxds-color-content-neutral-default-rest, currentColor);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
}

/* Splash: SWMS mark without the theme's colour disc, loading ring in SWMS green */
.loading-image-wrapper {
    background-color: transparent !important;
}

.loading-image {
    width: 48px;
    height: 72px;
}

.loading-floated-circle {
    border-top-color: var(--efr-brand-light) !important;
}

/* Keyboard focus must always be visible (WCAG 2.4.7). 2px ring in the darkened brand green, 4.8:1 on white. */
:focus-visible {
    outline: 2px solid var(--efr-accent);
    outline-offset: 2px;
}

/* XAF's "skip to main content" link removes the outline with a more specific rule. */
.xaf-skip-navigation-link:focus-visible {
    outline: 2px solid var(--efr-accent) !important;
    outline-offset: 2px;
}

/* Read-only values in detail views (computed duration, technical IDs, hashes).
   The theme draws disabled editors in #A8A9A8 (2.4:1 on white) – too faint for values people need to read. */
.dxbl-fl-item .dxbl-text-edit.dxbl-disabled .dxbl-text-edit-input {
    color: var(--efr-text-readonly);
    -webkit-text-fill-color: var(--efr-text-readonly);
}

/* Dark themes (XAF sets .dxbl-theme-dark on <body>): the EFR icons are rendered as <img>, so they cannot
   inherit the text colour. Invert them and rotate the hue back: the grey ink turns light grey,
   the SWMS green stays green. */
.dxbl-theme-dark img[src*="IImageService/Efr_"] {
    filter: invert(1) hue-rotate(180deg);
}

/* Column headers wrap instead of being cut off ("Bezeich..."). German compounds are hyphenated
   (the page language is set from the UI culture in _Host.cshtml). */
.dxbl-grid .dxbl-grid-header-content,
.dxbl-grid .dxbl-grid-header-content > span {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    hyphens: auto;
    overflow-wrap: break-word;
}

/* Narrow screens: keep list columns readable instead of squeezing them to a few pixels.
   The grid scrolls horizontally inside its own container; the page itself does not. */
@media (max-width: 768px) {
    .dxbl-grid .dxbl-grid-table {
        min-width: 720px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}
