/* /Components/Layout/CampaignBanner.razor.rz.scp.css */
/* The campaign bar (2026-11-12). Fixed above the navbar, one line, the site's gold on the dark
   ground so it reads as part of the shop rather than an advert pasted onto it. Its height is
   --campaign-banner-h, set in MainLayout.razor.css together with the navbar's new place, so the
   two cannot drift apart. It takes the notch padding the navbar gives up. */
.campaign-banner[b-dlspbs0trg] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 201;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) 0.85rem 0;
    height: calc(var(--campaign-banner-h, 32px) + env(safe-area-inset-top));
    background: linear-gradient(180deg, var(--accent-soft), var(--accent) 60%, var(--accent-strong));
    color: #1a1510;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
}

/* One line, whatever the owner types: on a 375 px phone a long line ends in "…" rather than
   wrapping and pushing the navbar down over the page. The admin field is capped at 90 characters
   for the same reason, and the admin preview warns that a phone shows less. */
.campaign-banner-text[b-dlspbs0trg] {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* The short line on a phone, the full one from 480 px — the breakpoint the navbar uses. Hidden
   with display:none, so a screen reader reads only the line that is on screen. */
.campaign-banner-text--full[b-dlspbs0trg] {
    display: none;
}

@media (min-width: 480px) {
    .campaign-banner-text--full[b-dlspbs0trg] {
        display: inline;
    }

    .campaign-banner-text--short[b-dlspbs0trg] {
        display: none;
    }
}

.campaign-banner:hover .campaign-banner-text[b-dlspbs0trg],
.campaign-banner:focus-visible .campaign-banner-text[b-dlspbs0trg] {
    text-decoration: underline;
}

@media (min-width: 720px) {
    .campaign-banner[b-dlspbs0trg] {
        font-size: 0.9rem;
    }
}
/* /Components/Layout/MainLayout.razor.rz.scp.css */
.memo-app[b-ekpqaag8ho] {
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ---- Navbar ----
   Mobile-first: the compact sizes below are what a 375 px phone gets, so the
   logo plus the widest right-hand side (name + menu + "Log ud") still fits.
   The roomier desktop values live in the min-width: 480px block further down. */
.navbar[b-ekpqaag8ho] {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.85rem;
    height: 54px;
    padding-top: env(safe-area-inset-top);
    height: calc(54px + env(safe-area-inset-top));
    background: rgba(20, 18, 16, 0.72);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border-bottom: 1px solid var(--border);
}

.navbar-logo[b-ekpqaag8ho] {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-decoration: none;
    transition: opacity 0.2s;
    /* Last line of defence: if the buttons ever grow past what the compact
       sizes account for, the logo gives way instead of pushing the page wide. */
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.navbar-logo:hover[b-ekpqaag8ho] {
    opacity: 0.8;
    text-decoration: none;
}

.navbar-right[b-ekpqaag8ho] {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.navbar-username[b-ekpqaag8ho] {
    font-size: 0.8rem;
    color: var(--text-secondary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: none;
}

.navbar-btn[b-ekpqaag8ho] {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.navbar-btn--login[b-ekpqaag8ho] {
    background: linear-gradient(180deg, var(--accent-soft), var(--accent) 60%, var(--accent-strong));
    color: #241d12;
    box-shadow: 0 2px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.navbar-btn--login:hover[b-ekpqaag8ho] {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4), 0 0 16px var(--accent-glow);
}

.navbar-btn--logout[b-ekpqaag8ho] {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
}

.navbar-btn--logout:hover[b-ekpqaag8ho] {
    background: rgba(245,241,234,0.06);
    color: var(--text-primary);
}

.navbar-btn--admin[b-ekpqaag8ho] {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-focus);
}

.navbar-btn--admin:hover[b-ekpqaag8ho] { background: var(--accent-glow); }

/* A signed-in bar carries "Min konto" and "Log ud" (or the admin/print-shop
   equivalents), and on a phone those need the room the full-size wordmark takes
   -- together they measure 419px of content in a 375px bar. Shrink the logo only
   when they are actually present, so signed-out visitors, which is nearly every
   first view, still get it at full size. */
@media (max-width: 479px) {
    .navbar:has(.navbar-btn--logout) .navbar-logo[b-ekpqaag8ho] {
        font-size: 1.15rem;
        letter-spacing: 0.08em;
    }
}

/* Roomier spacing once the viewport can pay for it. */
@media (min-width: 480px) {
    .navbar[b-ekpqaag8ho] { gap: 0.75rem; padding-left: 1.25rem; padding-right: 1.25rem; }
    .navbar-right[b-ekpqaag8ho] { gap: 0.75rem; }
    .navbar-btn[b-ekpqaag8ho] { padding: 0.45rem 1.1rem; }
}

/* The user name is the first thing to go: between 480 and 720px it would
   crowd the buttons off the bar. */
@media (min-width: 720px) {
    .navbar-username[b-ekpqaag8ho] { display: block; }
}

/* Dropdown menus (native <details>): admin hub and user account */
.admin-menu[b-ekpqaag8ho] {
    position: relative;
}

.admin-menu > summary[b-ekpqaag8ho] {
    list-style: none;
    user-select: none;
}

.admin-menu > summary[b-ekpqaag8ho]::-webkit-details-marker { display: none; }
.admin-menu > summary[b-ekpqaag8ho]::marker { content: ""; }

.admin-menu-panel[b-ekpqaag8ho] {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 180px;
    padding: 0.4rem;
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
    z-index: 300;
}

.admin-menu-item[b-ekpqaag8ho] {
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.admin-menu-item:hover[b-ekpqaag8ho] {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    text-decoration: none;
}

/* Push page content below fixed navbar */
.navbar-spacer[b-ekpqaag8ho] {
    height: var(--top-chrome);
}

/* ---- Campaign bar (the owner's "BLACK NOVEMBER" request of 2026-11-12) ----
   The bar sits above the navbar, fixed like it, and takes the notch padding the navbar would
   otherwise have: the navbar drops by the bar's height and loses its own safe-area padding, and
   --top-chrome grows by the same 32px, so the spacer and every sticky header below follow without
   knowing the bar exists. The bar's own look is in CampaignBanner.razor.css. */
.memo-app.has-campaign-banner[b-ekpqaag8ho] {
    --campaign-banner-h: 32px;
    --top-chrome: calc(54px + var(--campaign-banner-h) + env(safe-area-inset-top));
}

.memo-app.has-campaign-banner .navbar[b-ekpqaag8ho] {
    top: calc(var(--campaign-banner-h) + env(safe-area-inset-top));
    padding-top: 0;
    height: 54px;
}

/* Error UI (#blazor-error-ui) is styled globally in wwwroot/app.css so it
   survives enhanced navigation — see note there. */

.navbar-logout-form[b-ekpqaag8ho] {
    margin: 0;
}

/* The DA/EN switch (2026-09-30). Deliberately quieter than every button beside it -- no pill, no
   border, small type -- because it is for the few who need it, and a phone's bar was already
   counting pixels before it arrived (see the 419px note above). */
.navbar-lang-form[b-ekpqaag8ho] {
    margin: 0;
}

.navbar-lang[b-ekpqaag8ho] {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem 0.2rem;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    opacity: 0.7;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s, color 0.2s;
}

.navbar-lang:hover[b-ekpqaag8ho],
.navbar-lang:focus-visible[b-ekpqaag8ho] {
    opacity: 1;
    color: var(--text-primary);
}

.navbar-lang-current[b-ekpqaag8ho] {
    color: var(--accent);
}

/* The basket's bag (2026-11-12). [hidden] until App.razor's script has counted the basket. */
.navbar-cart[b-ekpqaag8ho] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 999px;
}

.navbar-cart[hidden][b-ekpqaag8ho] {
    display: none;
}

.navbar-cart:hover[b-ekpqaag8ho],
.navbar-cart:focus-visible[b-ekpqaag8ho] {
    background: var(--bg-card-hover);
}

.navbar-cart-count[b-ekpqaag8ho] {
    position: absolute;
    top: 0.05rem;
    right: 0.05rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--bg-primary);
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
}

.navbar-lang-sep[b-ekpqaag8ho] {
    opacity: 0.5;
}

/* The menu's "Log ud" is for phones only (see below); a wider screen has the button in the bar. */
.navbar-logout-form--menu[b-ekpqaag8ho] {
    display: none;
    margin: 0;
}

.admin-menu-button[b-ekpqaag8ho] {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}

/* A phone, measured 2026-09-30. "DA / EN" is 51px, and the bar had none to spare: a signed-out
   320px bar cut the wordmark by 31px, a signed-in 390px bar cut it to "MemoMi...". So the bar
   shows only the code you can switch to.

   Signed in, the switch used to go into the account menu. Since 2026-10-09 it stays in the bar,
   as the owner asked, and "Log ud" is what moves into the menu instead -- every signed-in bar but
   the print shop's has one (see MainLayout.razor). */
@media (max-width: 479px) {
    .navbar-lang-sep[b-ekpqaag8ho],
    .navbar-lang-current[b-ekpqaag8ho] {
        display: none;
    }
}

/* Further up than the phone rule above, and measured (2026-10-09): from 480px the bar is the
   roomy one -- full-size wordmark, "DA / EN", wider padding -- and with "Min konto" and "Log ud"
   beside it the wordmark was cut to "MemoMind..." until 515px (35px short at 480; the admin bar 11px
   short). That band is a large phone held sideways. Below 560px "Log ud" therefore stays in the
   menu, and the bar fits at every width. */
@media (max-width: 559px) {
    .navbar-logout-form--with-menu[b-ekpqaag8ho] {
        display: none;
    }

    .navbar-logout-form--menu[b-ekpqaag8ho] {
        display: block;
    }
}

/* The narrowest phones still came up 6px short signed out in Danish ("Log ind" is wider than
   "Log in"), and the switch cannot get smaller without dropping below a comfortable tap target --
   so there, and only there, the wordmark gives a little instead. Signed out only: a signed-in bar
   already shrinks it further (the 479px rule near the top). */
@media (max-width: 359px) {
    .navbar:not(:has(.navbar-btn--logout)):has(.navbar-lang-form) .navbar-logo[b-ekpqaag8ho] {
        font-size: 1.3rem;
        letter-spacing: 0.1em;
    }

    /* The print shop's bar has no menu to take "Log ud", and "Trykkeri" + "Log ud" + the switch cut
       the wordmark by 40px at 320 (measured 2026-10-09; it fits from 360). There, and only for
       them, the switch goes -- the print shop works in Danish, and /tryk never shows it anyway. */
    .navbar:has(.navbar-logout-form:not(.navbar-logout-form--with-menu)) .navbar-lang-form[b-ekpqaag8ho] {
        display: none;
    }
}
