/* V49 SHELL (agent "shell") -- scoped layout rules of the V49 shell packages (V49-06 / 08 / 20 / 22 / 24 / 27). Loaded by
   Views/Shared/_V49ShellAssets.cshtml (once per request). Every selector starts with .pb49- / [data-pb49-...] or an id of a view this
   workstream owns; colours = the EXISTING tokens of pb-tokens.css (Light / System / Dark resolved there), logical properties only
   (RTL / LTR mirror by themselves), no fixed height on anything that holds text, 48px targets for new standalone controls. */

/* ------------------------------------------------------------------ 1. V49-08 scroll strips (seller tabs): edge buttons */
[data-pb49-scroller] { display: flex; align-items: stretch; gap: 4px; }
[data-pb49-scroller] > [data-pb49-scroller-strip] { flex: 1 1 auto; min-inline-size: 0; }
.pb49-scroll-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
    inline-size: 48px; min-block-size: 48px; margin: 0; padding: 0;
    border: 1px solid var(--pb-color-border, #D9DEE7); border-radius: 10px;
    background: var(--pb-surface, #FFFFFF); color: var(--pb-text-primary, #171A1F); cursor: pointer;
}
.pb49-scroll-btn[hidden] { display: none; }
.pb49-scroll-btn:disabled { opacity: .45; cursor: default; }
.pb49-scroll-btn:hover:not(:disabled) { background: var(--pb-surface-hover, #F2F4F7); }
.pb49-scroll-btn:focus-visible { outline: 3px solid var(--pb-focus, #0065BD); outline-offset: 2px; }
.pb49-scroll-btn svg { inline-size: 20px; block-size: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .pb49-scroll-btn svg { transform: scaleX(-1); }
/* the V46 fading edge stays the hint next to the buttons: it moves inside them while they are shown */
.pb-seller-nav-wrap[data-pb49-overflow="1"]::before { inset-inline-start: 52px; }
.pb-seller-nav-wrap[data-pb49-overflow="1"]::after { inset-inline-end: 52px; }
.pb-seller-nav-wrap[data-pb49-scroller] .pb-seller-nav { margin-block: var(--pb-space-3, 12px) var(--pb-space-4, 16px); }
@media (forced-colors: active) { .pb49-scroll-btn { border-color: ButtonText; } }

/* ------------------------------------------------------------------ 2. V49-06 ready product: the buy box as the one bottom region */
/* the product page is the query container of the V48 action bar (its sticky rule applies only while the page content is < 600px) */
.pb49-buyhost { container: pb49buy / inline-size; }
.pb49-buy { flex-wrap: wrap; }
.pb49-buy > form, .pb49-buy > p { flex: 1 1 100%; margin-block: 0; }
.pb49-buy > .pb-buyer-tiny { margin-block-start: 4px; }
@container (max-width: 599.98px) {
    .pb-buyer-product .pb49-buy.pb48-actionbar[data-pb48-mode="sticky"] {
        position: sticky; inset-block-end: 0; z-index: 40;
        border-radius: 12px 12px 0 0;
        padding-block-end: calc(12px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -6px 12px -10px rgba(0, 0, 0, .35);
    }
}
[data-pb48-bottomnav="1"] .pb-buyer-product .pb49-buy.pb48-actionbar { position: static; box-shadow: none; }

/* ------------------------------------------------------------------ 3. V49-06 free file: the one action right under the name */
.pb49-free-primary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-block: 12px 16px; }
.pb49-free-primary > .pb-btn { min-block-size: 48px; }

/* ------------------------------------------------------------------ 4. V49-06 model page: room for the fixed phone CTA bar (V25) */
@media (max-width: 767.98px) {
    #main-content:has(.pb-model-details-actions #pbRequestPrintCta:not([hidden])),
    #main-content:has(.pb-model-details-actions #pbPfGetCta:not(.pb-btn-outline):not([hidden])) {
        padding-block-end: calc(var(--pb-h-button-primary, 52px) + 32px + env(safe-area-inset-bottom, 0px));
    }
}

/* ------------------------------------------------------------------ 5. V49-27 Requests/Create (Regular) */
#pbRequestDefine .pb49-req-blocker { margin-block: 8px 16px; }
#pbRequestDefine .pb49-req-blocker__line { margin: 0; }
#pbRequestDefine .pb49-req-blocker__more { margin-block-start: 4px; }
#pbRequestDefine .pb49-req-blocker__more > summary { display: inline-flex; align-items: center; min-block-size: 48px; cursor: pointer; font-weight: 600; }
#pbRequestDefine .pb49-req-blocker__more > summary:focus-visible { outline: 3px solid var(--pb-focus, #0065BD); outline-offset: 2px; }
#pbRequestDefine .pb49-req-blocker__more > p { margin: 0 0 4px; }
#pbRequestDefine .pb49-req-options__label { margin: 0 0 8px; font-weight: 600; }
/* one column on a phone, equal columns when three fit; stretch = the same height in a row, the height itself follows the text */
#pbRequestDefine .pb49-req-options { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 640px) {
    #pbRequestDefine .pb49-req-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
}
#pbRequestDefine .pb49-req-option {
    display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; box-sizing: border-box;
    min-block-size: 48px; margin: 0; padding: 12px 16px; border-radius: 12px;
    font-size: var(--pb-text-body, 1rem); line-height: 1.45; color: var(--pb-text-primary, #171A1F); text-decoration: none; cursor: pointer;
}
#pbRequestDefine .pb49-req-option__sub { display: block; font-size: var(--pb-text-compact, .875rem); }
/* V49-22: keyboard focus (a ring outside the card) is distinct from the selection (the filled inner border of .pb-path-active) */
#pbRequestDefine a.pb49-req-option:focus-visible,
#pbRequestDefine .pb49-req-option:has(input:focus-visible) { outline: 3px solid var(--pb-focus, #0065BD); outline-offset: 3px; }
#pbRequestDefine .pb49-req-option.pb-path-active { border-width: 2px; }
/* the one bottom region: publish + the secondary save draft share one row when they fit and wrap (200% text) when they do not */
#pbRequestDefine .pb-r920-actions.pb48-actionbar > .pb-btn { inline-size: auto; flex: 1 1 8em; }
#pbRequestDefine .pb49-req-back { margin-block: 8px 0; }
#pbRequestDefine .pb49-req-back a { display: inline-flex; align-items: center; min-block-size: 48px; }

/* ------------------------------------------------------------------ 6. V49-20 admin filters: persistent labels */
.pb49-filter-label { display: inline-block; margin-inline-end: 4px; font-size: var(--pb-text-compact, .875rem); font-weight: 600; color: var(--pb-text-primary, #171A1F); }

/* ------------------------------------------------------------------ 7. V49-24 Simple: secondary filters in one disclosure */
.pb49-filters { margin: 0 0 var(--pb-space-4, 16px); }
.pb49-filters__summary { display: inline-flex; align-items: center; gap: 8px; min-block-size: 48px; padding-inline: 12px; border: 1px solid var(--pb-color-border, #D9DEE7); border-radius: 10px; cursor: pointer; font-weight: 600; list-style: none; }
.pb49-filters__summary::-webkit-details-marker { display: none; }
.pb49-filters__summary::after { content: ""; inline-size: 8px; block-size: 8px; border-inline-end: 2px solid currentColor; border-block-end: 2px solid currentColor; transform: rotate(45deg); margin-block-start: -4px; }
.pb49-filters[open] > .pb49-filters__summary::after { transform: rotate(-135deg); margin-block-start: 4px; }
.pb49-filters__summary:focus-visible { outline: 3px solid var(--pb-focus, #0065BD); outline-offset: 2px; }
.pb49-filters[open] > .pb-shop-chips { margin-block-start: 12px; }
