/*
 * "Join Free" always within reach on phones and tablets (owner 17/11/2026).
 * A compact header button beside the ☰ menu at 48rem and narrower, where the desktop header Join Free is hidden
 * (home-page.css). The header is position: fixed, so it stays on screen while scrolling.
 * (No extra Join Free buttons in the home page body: the owner removed them on review, 17/11/2026.)
 * Plain file, no build; loaded after home-page.css with a version stamp in both public layouts.
 */

.nt-site-header__join-mobile {
    display: none;
}

@media (max-width: 48rem) {
    .nt-site-header .nt-site-header__join-mobile {
        display: inline-flex;
        flex: 0 0 auto;
        min-height: 2.75rem;
        padding: 0.375rem 0.875rem;
        color: var(--nt-color-surface);
        font-size: 0.9375rem;
        line-height: 1.2;
        white-space: nowrap;
        box-shadow: var(--nt-shadow-sm);
    }

    .nt-site-header .nt-site-header__join-mobile:hover {
        color: var(--nt-color-surface);
    }

    /* Farsi: the RTL home page makes every .nt-button 1.1875rem and 3.375rem tall; the header copy stays compact. */
    html[lang="fa"] .nt-site-header .nt-site-header__join-mobile,
    html[dir="rtl"] body.nt-home-page .nt-site-header .nt-site-header__join-mobile {
        min-height: 2.75rem;
        padding: 0.25rem 0.875rem;
        font-size: 1rem;
        font-weight: 700;
        line-height: 1.5;
        unicode-bidi: plaintext;
    }

    .nt-site-header__actions:has(.nt-site-header__join-mobile) {
        min-width: 0;
        gap: var(--nt-space-2);
    }
}

/* Small phones: the logo gives up only the width the button and the menu need (full size again from about 380px). */
@media (max-width: 25rem) {
    .nt-site-header:has(.nt-site-header__join-mobile) .nt-site-header__brand img {
        width: clamp(5.5rem, calc(100vw - 14rem), 9.875rem);
    }

    .nt-site-header .nt-site-header__join-mobile,
    html[lang="fa"] .nt-site-header .nt-site-header__join-mobile,
    html[dir="rtl"] body.nt-home-page .nt-site-header .nt-site-header__join-mobile {
        padding-inline: 0.75rem;
    }
}

/* Very narrow (below 312px, e.g. a phone at 200% zoom): logo and ☰ on the first row, the button across a second row. */
@media (max-width: 19.5rem) {
    :root:has(.nt-site-header__join-mobile) {
        --nt-public-header-height: 7.0625rem;
    }

    .nt-site-header:has(.nt-site-header__join-mobile) .nt-site-header__inner {
        grid-template-columns: minmax(0, 1fr) auto;
        align-content: center;
        min-height: 7rem;
        gap: var(--nt-space-2);
        padding-block: var(--nt-space-2);
    }

    .nt-site-header:has(.nt-site-header__join-mobile) .nt-site-header__actions {
        display: contents;
    }

    .nt-site-header:has(.nt-site-header__join-mobile) .nt-site-header__brand img {
        width: clamp(5.5rem, calc(100vw - 6rem), 9.875rem);
    }

    .nt-site-header:has(.nt-site-header__join-mobile) .nt-mobile-menu {
        grid-row: 1;
        grid-column: 2;
    }

    .nt-site-header .nt-site-header__join-mobile {
        grid-row: 2;
        grid-column: 1 / -1;
        width: 100%;
    }
}
