/* --------------------------------------------------------------------------
   Header. `.form-header`, `#orgH1` and `.display-4` are tenant hooks: 66/66.css styles
   `.form-header` and `.form-header .display-4`, so the heading keeps the display-4 class.

   `.form-logo` is deliberately absent from here as of Phase 2A: the new shell renders no tenant
   image, so the shell's own sizing rule for it was dead code. The `.form-logo` rules in
   65/71/72.css are now dead too — recorded as a finding rather than deleted, because D14 retains
   every legacy asset until all intended tenants run the new design, and those files still style
   the legacy shell.
   -------------------------------------------------------------------------- */
.inn-shell .form-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--k-gap);
    padding: var(--k-pad-side);
    border-bottom: 1px solid var(--c-border);
}


.inn-shell #orgH1 {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    font-size: 1.6rem;
    /* 400 per the prototype (Innmelding.dc.html:69). The heading is now the static form title, so
       it no longer has to compete with a logo for emphasis — the tenant badge carries that. */
    font-weight: 400;
    line-height: 1.2;
    color: var(--c-fg);
    overflow-wrap: anywhere;
}

/* The tenant identity slot at the end of the header row holds either the logo or the text badge.
   The prototype has only the badge; production prefers the logo when the tenant has one, so both
   live here and the badge doubles as the logo's fallback. `margin-left: auto` on each is what pins
   whichever one renders to the end of the row. */
.inn-shell .form-logo {
    flex: none;
    margin-left: auto;
    max-width: 34%;
    max-height: 72px;
    width: auto;
    height: auto;
}

/* The badge is hidden while a logo is expected. innmelding-design.js flips this to "0" if that
   logo fails to load, which is the only path that needs JavaScript — a tenant with no logo at all
   is decided server-side and renders the badge directly. */
.inn-shell .inn-tenant-badge[data-inn-fallback="1"] {
    display: none;
}

/* Tenant identity badge — master plan §6.1.1, from Innmelding.dc.html:71.

   `max-width`, `white-space`, `overflow` and `text-overflow` together are the contract, not
   styling: the prototype falls back to initials for names over 22 characters, and with no
   authoritative short-name column the ellipsis is what keeps a long tenant name from pushing the
   heading out of the header. `text-transform` rather than uppercasing in C# keeps the real name in
   the accessibility tree. */
.inn-shell .inn-tenant-badge {
    flex: none;
    margin: 0 0 0 auto;
    max-width: 34%;
    height: 36px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--k-brand);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

