/* Global styles of the web site (the AdminUi has its own styles, see wwwroot/adminui). */

/* ******************************************************************************************* */
/* Color palette: use these variables instead of literal colors (also in BackgroundColor/TextColor parameters) */
:root {
    --lx-blue: #009FDD;          /* Limex brand blue: logo, accents, icons */
    --lx-blue-text: #0077B6;     /* blue for text and headings on white (contrast >= 4.5:1) */
    --lx-blue-section: #0077B6;  /* background of blue sections with white text */
    --lx-blue-dark: #065480;     /* page header, footer, dark sections */
    --lx-orange: #FF8000;        /* accent of the product pages */
    --lx-gray-bg: #F4F6F8;       /* light section background */
    --lx-text: #2B2F33;          /* body text */
    --lx-text-muted: #5F6B76;    /* secondary text, links */
    --lx-bg: #FFFFFF;            /* page and white sections */
    --lx-surface: #FFFFFF;       /* cards, buttons, notices */
    --lx-border: #C8CED4;        /* thin borders */
    --lx-green: #059F2F;         /* Green IT */
    --lx-green-bg: #E8F6EC;
    --lx-lxg-text: #235C86;      /* "Lx:G" lettering */

    /* spacing scale: use these steps instead of free values */
    --lx-space-xs: 8px;
    --lx-space-sm: 16px;
    --lx-space-md: 24px;
    --lx-space-lg: 48px;
    --lx-space-xl: 80px;

    /* cards (product areas, quotes, job offers) */
    --lx-radius: 12px;
    --lx-radius-sm: 8px;
    --lx-shadow-card: 0 1px 3px rgba(16, 24, 40, 0.08), 0 4px 12px rgba(16, 24, 40, 0.06);
    --lx-shadow-card-hover: 0 4px 8px rgba(16, 24, 40, 0.08), 0 12px 28px rgba(16, 24, 40, 0.12);
    --lx-transition: 0.2s ease;

    color-scheme: light dark; /* follows the operating system setting (light-dark() below, scrollbars, form controls) */
}

/* Dark mode: the colors that differ are defined with light-dark(light, dark). They follow color-scheme, i.e. the
   operating system setting, unless the visitor switches with the button in the page header (data-theme on <html>,
   see LimexDeHelper.toggleTheme in LimexDe.ts; kept for the browser session, rendered by App.razor). White text on blue sections stays as it is; logo images
   on white cards intentionally stay on white. Browsers without light-dark() keep the light colors above. */
@supports (color: light-dark(#fff, #000)) {
    :root {
        --lx-blue-text: light-dark(#0077B6, #6CC4F5);
        --lx-blue-section: light-dark(#0077B6, #0B5E91);
        --lx-blue-dark: light-dark(#065480, #08344F);
        --lx-orange: light-dark(#FF8000, #B95E0C);
        --lx-gray-bg: light-dark(#F4F6F8, #111A23);
        --lx-text: light-dark(#2B2F33, #E2E8EE);
        --lx-text-muted: light-dark(#5F6B76, #A2AFBB);
        --lx-bg: light-dark(#FFFFFF, #0B1219);
        --lx-surface: light-dark(#FFFFFF, #17222D);
        --lx-border: light-dark(#C8CED4, #2E3B48);
        --lx-green: light-dark(#059F2F, #45C674);
        --lx-green-bg: light-dark(#E8F6EC, #12301E);
        --lx-lxg-text: light-dark(#235C86, #7DB4E0);
        --lx-shadow-color: light-dark(rgba(16, 24, 40, 0.08), rgba(0, 0, 0, 0.45));
        --lx-shadow-card: 0 1px 3px var(--lx-shadow-color), 0 4px 12px var(--lx-shadow-color);
        --lx-shadow-card-hover: 0 4px 8px var(--lx-shadow-color), 0 12px 28px var(--lx-shadow-color);
    }
}

/* switched with the button in the page header */
:root[data-theme="light"] {
    color-scheme: light;
}

:root[data-theme="dark"] {
    color-scheme: dark;
}

/* ******************************************************************************************* */
/* Minimal reset (replaces Bootstrap's "reboot", Bootstrap is not used any more) */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    overflow: auto;
    overflow-x: hidden;
    /* rem base of the layout (paddings, header height, ...) */
    font-size: 20px !important;
    font-family: 'Roboto', arial !important;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
    font-size: 17px !important;
    line-height: 1.6;
    font-family: 'Roboto', arial !important;
    color: var(--lx-text);
    background-color: var(--lx-bg);
    hyphens: auto;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

p, ul, ol, dl, address {
    margin-top: 0;
    margin-bottom: 1rem;
}

ul, ol {
    padding-left: 2rem;
}

b, strong {
    font-weight: bolder;
}

img, svg, video {
    vertical-align: middle;
}

button {
    font: inherit;
    border-radius: 0;
}

/* images with width/height attributes (intrinsic size against layout shifts): CSS widths keep the aspect ratio.
   :where() = specificity 0, so heights set by classes or inline styles always win */
:where(img[width][height]) {
    height: auto;
}

/* ******************************************************************************************* */

a {
    color: var(--lx-text-muted);
    text-decoration: none;
}

/* section anchors of the home page (Home.razor): links like "/#Jobs" stop below the fixed page header */
[data-lx-section-anchor] {
    scroll-margin-top: 50px;
}

/* visible focus for keyboard users (not shown on mouse clicks) */
:focus-visible {
    outline: 3px solid var(--lx-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ******************************************************************************************* */
/* Button (ActionButton, "more information" of the job offers): outlined, filled dark blue on hover */
.lx-button {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.4rem 1.2rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--lx-blue-text);
    background-color: var(--lx-surface);
    border: 2px solid var(--lx-blue-section);
    border-radius: 999px;
    cursor: pointer;
    transition: background-color var(--lx-transition), color var(--lx-transition), border-color var(--lx-transition),
                box-shadow var(--lx-transition), transform var(--lx-transition);
}

    .lx-button:hover {
        color: white;
        background-color: var(--lx-blue-dark);
        border-color: var(--lx-blue-dark);
        box-shadow: 0 4px 12px rgba(16, 24, 40, 0.2);
        transform: translateY(-1px);
    }

    .lx-button:active {
        transform: translateY(0);
        box-shadow: none;
    }

/* filled: the main action (e.g. start area of the home page) */
.lx-button--primary {
    color: white;
    background-color: var(--lx-blue-section);
    border-color: var(--lx-blue-section);
}

/* filled white: the main action on dark backgrounds */
.lx-button--white {
    color: var(--lx-blue-dark);
    background-color: white;
    border-color: white;
}

    .lx-button--white:hover {
        color: white;
        background-color: transparent;
        border-color: white;
    }

/* outlined white: on images and dark backgrounds */
.lx-button--ghost {
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

    .lx-button--ghost:hover {
        color: var(--lx-blue-dark);
        background-color: white;
        border-color: white;
    }

/* "back to top" button (MainLayout.razor): bottom right, faded in after scrolling (data-visible, see LimexDe.ts) */
.lx-to-top {
    position: fixed;
    right: var(--lx-space-md);
    bottom: var(--lx-space-md);
    z-index: 900;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-color: rgba(6, 84, 128, 0.85);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity var(--lx-transition), transform var(--lx-transition), background-color var(--lx-transition);
}

    .lx-to-top[data-visible="true"] {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .lx-to-top:hover {
        color: white;
        background-color: var(--lx-blue-section);
    }

@media (max-width: 500px) {
    .lx-to-top {
        right: var(--lx-space-sm);
        bottom: var(--lx-space-sm);
    }
}

/* reduced motion (operating system setting): no lifting */
@media (prefers-reduced-motion: reduce) {
    .lx-button,
    .lx-button:hover {
        transition: none;
        transform: none;
    }
}

.text-danger {
    color: #B42318;
}

/* only for screen readers and search engines (e.g. the h1 of the home page, whose title is the logo image) */
.lx-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.HyphensNone {
    hyphens: none;
}

input {
    user-select: initial;
}

.whiteSvg {
    filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(200%) contrast(100%);
}

/* edit link of an editable text (TextEditLink.razor, only for logged in text editors): absolutely positioned without
   top/left, i.e. at its static position (where the text starts), so it takes no space and changes no layout -
   also not in flex/grid containers. Moved up and left, it sits as a badge at the top left corner of the text.
   !important on the layout properties: rules of the sections for links in texts (e.g. "position: relative" in the
   product cards) must never make it take space. */
.lx-textEdit {
    position: absolute !important;
    z-index: 950 !important;
    width: 26px !important;
    height: 26px !important;
    display: inline-grid !important;
    place-items: center;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    color: #0077B6;
    background-color: #FFFFFF;
    border: 2px solid #0077B6;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translate(-60%, -60%);
    opacity: 0.85;
    text-decoration: none;
    font-style: normal;
    line-height: 1;
    transition: opacity var(--lx-transition), transform var(--lx-transition), background-color var(--lx-transition), color var(--lx-transition);
}

    .lx-textEdit:hover,
    .lx-textEdit:focus-visible {
        opacity: 1;
        color: #FFFFFF;
        background-color: #0077B6;
        transform: translate(-60%, -60%) scale(1.15);
    }

/* legal pages (Impressum, PrivacyStatement): card on a light background */
.lx-legalPage {
    min-height: 100%;
    background-color: var(--lx-gray-bg);
}

.lx-legalMain {
    padding: 4.5rem var(--lx-space-sm) var(--lx-space-lg) var(--lx-space-sm);
}

.lx-legalCard {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--lx-space-md) var(--lx-space-lg) var(--lx-space-lg) var(--lx-space-lg);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--lx-text);
    background-color: var(--lx-surface);
    border-radius: var(--lx-radius);
    box-shadow: var(--lx-shadow-card);
}

@media (max-width: 600px) {
    .lx-legalCard {
        padding: var(--lx-space-sm);
    }
}

.limexDe-PrivacyStatement-caption {
    font-size: larger;
    margin: 5px 0 10px 0;
    color: var(--lx-blue-text);
}

@keyframes limexDe-NumberZoomAnimation {
    0% {
        opacity: 0.5;
        transform: scale(0.9, 0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1, 1);
    }
}

/* reduced motion (operating system setting): animations and transitions end immediately (slide shows show their
   first image, see the keyframes); count-up, smooth scrolling and the background video are handled in LimexDe.ts */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* "skip to content" link (MainLayout.razor): first focusable element, only visible with the keyboard focus */
.lx-skipLink {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 8px 16px;
    color: white;
    background-color: var(--lx-blue-dark);
    border-radius: var(--lx-radius-sm);
    transform: translateY(-200%);
}

    .lx-skipLink:focus {
        transform: none;
    }

/* pages of a job offer and of the news (JobPage.razor, NewsPage.razor, NotFoundPage.razor): card like the legal pages */
.lx-detailCard {
    font-size: 0.95rem;
}

.lx-detailBack {
    display: inline-block;
    margin-bottom: var(--lx-space-sm);
    font-size: 0.85rem;
    color: var(--lx-blue-text);
    text-decoration: none;
}

    .lx-detailBack:hover {
        text-decoration: underline;
    }

.lx-detailHead {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: var(--lx-space-sm);
    align-items: center;
    position: relative;
}

.lx-detailImage {
    width: 120px;
    height: 120px;
    border-radius: var(--lx-radius);
}

.lx-detailEyebrow {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--lx-text-muted);
}

.lx-detailTitle {
    margin: 4px 0 8px 0;
    font-family: Lato, arial;
    font-size: 1.6rem;
    line-height: 1.25;
    color: var(--lx-blue-text);
}

.lx-detailLead {
    margin: var(--lx-space-sm) 0 0 0;
    font-size: 1.05rem;
    color: var(--lx-text);
}

.lx-detailBody {
    margin-top: var(--lx-space-md);
}

    .lx-detailBody img {
        max-width: 100%;
        height: auto;
        border-radius: var(--lx-radius-sm);
    }

.lx-detailApply {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--lx-space-sm);
    margin-top: var(--lx-space-md);
    padding: var(--lx-space-sm);
    background-color: var(--lx-gray-bg);
    border-radius: var(--lx-radius);
}

.lx-newsList {
    margin: var(--lx-space-sm) 0 0 0;
    padding: 0;
    list-style: none;
}

    .lx-newsList li {
        position: relative;
        padding: var(--lx-space-sm) 0;
        border-top: 1px solid var(--lx-border, rgba(127, 127, 127, 0.25));
    }

    .lx-newsList time {
        font-size: 0.8rem;
        color: var(--lx-text-muted);
    }

    .lx-newsList h2 {
        margin: 2px 0 6px 0;
        font-family: Lato, arial;
        font-size: 1.15rem;
    }

        .lx-newsList h2 a {
            color: var(--lx-blue-text);
            text-decoration: none;
        }

            .lx-newsList h2 a:hover {
                text-decoration: underline;
            }

    .lx-newsList p {
        margin: 0;
        color: var(--lx-text-muted);
    }

@media (max-width: 600px) {
    .lx-detailHead {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .lx-detailImage {
        width: 72px;
        height: 72px;
    }
}
