/* ═══════════════════════════════════════════════════════════
   Split frame + site header — the funnel/auth page shell

   A full-page frame for the onboarding funnel and auth pages, modelled on
   One.com / Fortnox login screens: a capplon.se-matching site header on
   top, then a split body — content on the LEFT, a full-bleed brand image
   filling the RIGHT half. The image pane hides on mobile (content goes
   full width), and a --full modifier drops it on wide steps that need the
   whole width (e.g. the configurator).

   Page shape:
     <div class="tn-split">
       <header class="tn-site-header">…logo left, nav/CTA right…</header>
       <div class="tn-split-body">
         <div class="tn-split-panes">
           <div class="tn-split-content"><div class="tn-split-inner">…steps + card…</div></div>
           <div class="tn-split-media" style="background-image:url(...)"></div>
         </div>
       </div>
     </div>
   The header spans full width (matches capplon.se); the split is below it.
   ═══════════════════════════════════════════════════════════ */

.tn-split {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--tn-bg-page);
}

/* ── Site header — matches capplon.se: clean white bar, logo left,
   nav + a blue "Kontakt"-style pill CTA right, no border/shadow. ── */
.tn-site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tn-space-md);
    flex-shrink: 0;
    height: 72px;
    padding: 0 var(--tn-page-pad-x);
    background: var(--tn-bg-card);
}

.tn-site-header-logo {
    display: block;
    height: 30px;
    width: auto;
}

.tn-site-header-nav {
    display: flex;
    align-items: center;
    gap: var(--tn-space-lg);
}

.tn-site-header-link {
    color: var(--tn-text-primary);
    font-size: var(--tn-font-size-base);
    font-weight: 500;
    text-decoration: none;
    transition: color var(--tn-transition);
}

.tn-site-header-link:hover {
    color: var(--tn-brand-blue);
}

/* The capplon.se "Kontakt" pill — brand blue, rounded. Confined to the site
   header so product UI stays teal. */
.tn-site-header-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: 24px;
    background: var(--tn-brand-blue);
    color: #fff;
    font-size: var(--tn-font-size-base);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: filter var(--tn-transition);
}

.tn-site-header-cta:hover {
    filter: brightness(1.08);
    color: #fff;
}

/* ── Site header on phones ──
   The nav's desktop gap and the CTA's generous pill padding overflow a
   narrow bar, so tighten both and shrink the header. Nav links carrying
   .tn-site-header-link--desktop drop out entirely — on a marketing header
   those collapse behind a menu button, and the CTA is the one action worth
   keeping visible at this width. */
@media (max-width: 640px) {
    .tn-site-header {
        height: 60px;
        gap: var(--tn-space-sm);
    }

    .tn-site-header-logo {
        height: 24px;
    }

    .tn-site-header-nav {
        gap: var(--tn-space-md);
    }

    .tn-site-header-link--desktop {
        display: none;
    }

    .tn-site-header-cta {
        padding: 8px 14px;
        font-size: var(--tn-font-size-sm);
    }
}

/* ── Split body ── */
.tn-split-body {
    flex: 1;
    display: flex;
    min-height: 0;
}

.tn-split-panes {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 0;
}

/* Left — content (steps, card). Scrolls independently if tall. */
.tn-split-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: var(--tn-space-xl) var(--tn-page-pad-x);
    overflow-y: auto;
}

/* Cap + centre the content column so the card isn't stretched full-half */
.tn-split-inner {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

/* Right — full-bleed brand image (set background-image on this element) */
.tn-split-media {
    min-width: 0;
    background-color: var(--tn-primary);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ── Full-width modifier — drop the image pane for steps that need the
   whole width (e.g. the configurator). Content spans full width; wrap it
   in a wider .tn-split-inner or your own container. ── */
.tn-split--full .tn-split-media {
    display: none;
}

.tn-split--full .tn-split-panes {
    grid-template-columns: 1fr;
}

.tn-split--full .tn-split-content {
    justify-content: flex-start;
    padding-left: 0;
    padding-right: 0;
}

/* --full is for WIDE content (e.g. the configurator's roles | cart layout),
   so lift the narrow 460px inner cap: centre + gutter at a generous max so
   it breathes without stretching edge-to-edge on ultra-wide. */
.tn-split--full .tn-split-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--tn-page-pad-x);
}

/* ── Mobile — single column, image hidden, content full width ── */
@media (max-width: 900px) {
    .tn-split-panes {
        grid-template-columns: 1fr;
    }

    .tn-split-media {
        display: none;
    }
}
