/* brand.css — product logo slot and family lock-up (TASK-UXA-002/003; UXA-001..005).
   Tokens only, logical properties only. The scheme can follow the system, so the light and the on-dark image are both rendered and
   switched here by html[data-scheme]. Default files are the WORK / DRONE by TOT vector marks (UXA Q-3, Figma page "13 · Brand marks"):
   colour on light, white on dark and high-contrast dark, drawn black in high-contrast light; a client logo without an on-dark file
   keeps the mono fallback (drawn white). */

.hrms-shell-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px;
    min-inline-size: 0;
}

.hrms-shell-brand__link {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    min-inline-size: 44px;
    border-radius: 8px;
}

.hrms-shell-brand__link:focus-visible {
    outline: 2px solid var(--hrms-color-border-focus);
    outline-offset: 2px;
}

.hrms-shell-brand__logo {
    display: block;
    block-size: auto;
    inline-size: 140px;
    max-inline-size: 100%;
}

.hrms-shell-brand__mini {
    display: block;
    block-size: 32px;
    inline-size: 32px;
}

.hrms-shell-brand--compact {
    align-items: center;
    padding-inline: 8px;
}

.hrms-shell-brand__logo--org {
    inline-size: auto;
    max-block-size: 40px;
}

.hrms-shell-brand__logo--dark,
.hrms-family-lockup__img--dark,
.login-logo__img--dark {
    display: none;
}

:root[data-scheme="dark"] .hrms-shell-brand__logo--light,
:root[data-scheme="dark"] .hrms-family-lockup__img--light,
:root[data-scheme="dark"] .login-logo__img--light {
    display: none;
}

:root[data-scheme="dark"] .hrms-shell-brand__logo--dark,
:root[data-scheme="dark"] .hrms-family-lockup__img--dark,
:root[data-scheme="dark"] .login-logo__img--dark {
    display: block;
}

:root[data-scheme="dark"] .hrms-shell-brand__logo--mono,
:root[data-scheme="dark"] .login-logo__img--mono {
    filter: brightness(0) invert(1);
}

/* High contrast light: the colour marks become the one-colour (black) form; high contrast dark already shows the white files. */
:root[data-contrast="high"]:not([data-scheme="dark"]) .hrms-shell-brand__logo--light:not(.hrms-shell-brand__logo--org),
:root[data-contrast="high"]:not([data-scheme="dark"]) .hrms-family-lockup__img--light,
:root[data-contrast="high"]:not([data-scheme="dark"]) .login-logo__img--light {
    filter: brightness(0);
}

/* ---------- DRONE by TOT lock-up ---------- */
.hrms-family-lockup {
    display: flex;
    align-items: center;
}

/* RW-11: no display here - the light/dark pair is switched by the --light/--dark rules above (a later single-class display:block would
   show both marks side by side). */
.hrms-family-lockup__img {
    block-size: auto;
    inline-size: 140px;
    max-inline-size: 100%;
}

.hrms-family-lockup__img--light {
    display: block;
}

.hrms-family-lockup--menufooter {
    padding: 12px 16px;
    border-block-start: 1px solid var(--hrms-color-border-subtle);
}

/* TASK-UXA-152 (G19-02): with the menu in the top region (X5 Horizon) the lock-up shares the menu row at its inline end instead of
   forming its own block under it. */
.hrms-shell__top:has(> .hrms-family-lockup--menufooter) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.hrms-shell__top:has(> .hrms-family-lockup--menufooter) > * {
    grid-column: 1 / -1;
}

.hrms-shell__top:has(> .hrms-family-lockup--menufooter) > .hrms-menu {
    grid-column: 1;
}

.hrms-shell__top > .hrms-family-lockup--menufooter {
    grid-column: 2;
    padding-block: 0;
    padding-inline: 0 16px;
    border-block-start: 0;
}

.hrms-shell__top > .hrms-family-lockup--menufooter .hrms-family-lockup__img {
    inline-size: 96px;
}

.hrms-family-lockup--underlogo .hrms-family-lockup__img {
    inline-size: 112px;
}

/* Login: small "powered by" footer line below the form. */
.hrms-family-lockup--login {
    margin-block-start: 24px;
    gap: 8px;
    justify-content: center;
}

.hrms-family-lockup__label {
    font-size: 12px;
    color: var(--hrms-color-text-muted);
}

.hrms-family-lockup--login .hrms-family-lockup__img {
    inline-size: 90px;
}

/* ---------- Login logo: the wordmark at its own aspect ratio ---------- */
.login-logo {
    flex-direction: column;
    align-items: flex-start;
}

.login-logo__img {
    block-size: auto;
    inline-size: 200px;
    max-inline-size: 100%;
}

.login-logo__img--light {
    display: block;
}

/* ---------- Top bar slot ---------- */
.hrms-topbar__brand--slot .hrms-shell-brand {
    padding: 0;
}

.hrms-topbar__brand--slot .hrms-shell-brand__logo {
    inline-size: 120px;
}

.hrms-topbar__brand--slot .hrms-family-lockup {
    display: none;
}

/* Phones: the drawer carries the logo; the top bar keeps room for the menu button, search and tools. */
@media (max-width: 767px) {
    .hrms-topbar__brand--slot {
        display: none;
    }
}

/* The aside now holds the logo above the menu: the whole column scrolls when the menu is taller than the viewport. */
.hrms-shell__nav:has(> .hrms-shell-brand) {
    overflow-y: auto;
}
