/* r601: the PC dock — the seller and buyer panels' tab row, as a floating glass
   dock at the bottom of the screen (after zincwolf.app's nav). pc-dock.js builds
   it from the page's own .tabs[data-bnav] row and only proxies clicks to those
   tabs, so switchTab, the badges and the phone bar (≤640px, theme.css) are
   untouched. Above 640px the row itself is hidden and the dock takes its place. */
.pcd { display: none; }
@media (min-width: 640.02px) {
    body.has-pcdock .content-area > .tabs-wrap { display: none; }
    /* room to scroll the last of the page out from under the dock: the dark
       footer grows by the dock's height, so the page still ends on the footer */
    body.has-pcdock #footer { padding-bottom: 112px; }
    body.has-pcdock:not(:has(#footer)) { padding-bottom: 96px; }

    .pcd {
        --pcd-h: 52px; --pcd-item: 40px;
        --pcd-out: cubic-bezier(.23, 1, .32, 1);      /* enter / exit: strong ease-out */
        --pcd-move: cubic-bezier(.77, 0, .175, 1);    /* moving across the screen: strong ease-in-out */
        position: fixed; inset: auto 0 max(20px, calc(env(safe-area-inset-bottom, 0px) + 10px));
        width: fit-content; margin-inline: auto;   /* only as wide as the bar: the tone samples what is under it */
        z-index: 1400; display: flex; justify-content: center; align-items: center; gap: 6px;
        pointer-events: none;
        transition: opacity .25s var(--pcd-out), translate .25s var(--pcd-out);
    }
    .pcd > * { pointer-events: auto; }

    /* at home: in the tab row's place between the stat cards and the content —
       part of the page, so the glass is nearly solid (nothing behind it to blur) */
    .pcd-home { display: flex; justify-content: center; height: 52px; margin-bottom: 24px; }
    .pcd.is-home { position: relative; inset: auto; padding: 0; z-index: 5; }
    .pcd.is-home .pcd-glass::before { opacity: 0.5; }
    .pcd.is-home .pcd-glass, .pcd.is-home.tone-dark > * > .pcd-glass {
        background: rgba(255, 255, 255, .58); -webkit-backdrop-filter: blur(5px) saturate(180%); backdrop-filter: blur(5px) saturate(180%);
        border-color: rgba(255, 255, 255, 0.55);
        box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 6px 20px -10px rgba(31, 41, 55, .18), inset 0 1px 0 #fff;
    }
    .pcd.is-home .pcd-me .pcd-glass { box-shadow: 0 0 0 .5px rgba(0, 0, 0, .08), 0 6px 20px -10px rgba(31, 41, 55, .18); }

    .pcd.is-hidden { opacity: 0; translate: 0 16px; transition-duration: .2s; }
    .pcd.is-hidden * { pointer-events: none !important; }

    /* glass: the phone bar's (theme.css .has-bnav .bnav, r391–r395) — solid white
       where the browser cannot blur, else 20% white over a light blur with the
       colour lifted, a sheen falling on the top, a lit rim and, in Chromium, the
       lens that bends the page along the edge (app.js bdLens) */
    .pcd-glass {
        position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(255, 255, 255, 0.55);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.9),
            inset 0 -1px 0 rgba(255, 255, 255, 0.35),
            inset 0 0 0 0.5px rgba(31, 41, 55, 0.06),
            0 10px 30px rgba(31, 41, 55, 0.16),
            0 2px 6px rgba(31, 41, 55, 0.08);
        transition: background-color .4s var(--pcd-out), box-shadow .4s var(--pcd-out),
                    border-color .25s, -webkit-backdrop-filter .4s, backdrop-filter .4s;
    }
    .pcd-glass::before {
        content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.12) 34%, rgba(255, 255, 255, 0) 55%),
            radial-gradient(120% 70% at 50% 125%, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 70%);
        box-shadow:
            inset 1.5px 1.5px 1px -0.5px rgba(255, 255, 255, 0.95),
            inset -1.5px -1.5px 1px -0.5px rgba(255, 255, 255, 0.55),
            inset 0 0 0 1px rgba(255, 255, 255, 0.35),
            inset 0 0 18px rgba(255, 255, 255, 0.25);
        transition: opacity .25s;
    }
    @supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
        .pcd-glass {
            background: rgba(255, 255, 255, 0.2);
            -webkit-backdrop-filter: blur(6px) saturate(200%) brightness(1.08);
            backdrop-filter: blur(6px) saturate(200%) brightness(1.08);
        }
        .pcd:not(.is-home) .pcd-pill > .pcd-glass.lens {
            backdrop-filter: url(#bnavLens) blur(2.5px) saturate(200%) brightness(1.08);
        }
        .pcd.tone-busy > * > .pcd-glass { background: rgba(255, 255, 255, 0.62); }
        .pcd.tone-dark > * > .pcd-glass { background: rgba(17, 24, 39, 0.55); }
        .pcd.tone-dark.tone-busy > * > .pcd-glass { background: rgba(17, 24, 39, 0.66); }
        /* «بیشتر» opens as light glass whatever is behind, like the phone's sheet */
        .pcd-panel .pcd-glass { background: rgba(255, 255, 255, 0.92); }
    }
    /* over something dark (the footer, a dark button) it turns to dark glass
       with light icons, as the phone bar does (app.js bdBarTone) */
    .pcd.tone-dark { --ic-acc: #fcd34d; }
    .pcd.tone-dark > * > .pcd-glass {
        border-color: rgba(255, 255, 255, 0.12);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.22),
            inset 0 0 0 0.5px rgba(255, 255, 255, 0.1),
            0 10px 30px rgba(0, 0, 0, 0.32),
            0 2px 6px rgba(0, 0, 0, 0.18);
    }
    .pcd.tone-dark > * > .pcd-glass::before { opacity: 0.4; }
    .pcd.tone-dark :is(.pcd-pill, .pcd-more) > .pcd-it {
        color: #e5e7eb; text-shadow: 0 0 6px rgba(0, 0, 0, 0.5), 0 0 2px rgba(0, 0, 0, 0.5);
    }
    .pcd.tone-dark :is(.pcd-pill, .pcd-more) > .pcd-it:is([aria-current], [aria-expanded="true"]) { background: rgba(255, 255, 255, 0.16); color: #fff; }
    .pcd.tone-dark .pcd-pill > :is(.pcd-it, .pcd-more > .pcd-it, .pcd-main) .pcd-badge { box-shadow: 0 0 0 2px rgba(17, 24, 39, .9); }
    .pcd-pill, .pcd-me {
        position: relative; isolation: isolate; height: var(--pcd-h); border-radius: 999px;
        display: flex; align-items: center;
    }
    .pcd-pill { gap: 2px; padding: 0 6px; }

    .pcd-it {
        position: relative; height: var(--pcd-item); padding: 0 12px 0 14px; border: 0; border-radius: 999px;
        background: transparent; display: inline-flex; align-items: center; gap: 7px;
        font: inherit; font-size: 13.5px; font-weight: 600; line-height: 1; white-space: nowrap;
        color: var(--dark-primary, #1f2937); cursor: pointer;
        transition: background-color .15s ease, color .15s ease, transform .16s var(--pcd-out);
    }
    .pcd-it:active { transform: scale(.97); }
    .pcd-it[aria-current], .pcd-it[aria-expanded="true"] { background: rgba(31, 41, 55, .08); color: var(--dark-primary, #1f2937); font-weight: 700; }
    .pcd-it:focus-visible, .pcd-main:focus-visible, .pcd-me:focus-visible, .pcd-panel button:focus-visible {
        outline: 2px solid var(--gold-primary, #f5b800); outline-offset: 2px;
    }

    /* the page's own Freehand icons, drawn as the tab row draws them */
    .pcd .ic { display: inline-flex; line-height: 0; }
    .pcd .ic svg { width: 20px; height: 20px; }
    .pcd .ic .icu { width: 20px; height: 20px; margin: 0; vertical-align: 0; }
    /* hover only where there is a real pointer: a tap on a touch screen would
       leave these stuck on (iPads and touch laptops above 640px get the dock) */
    @media (hover: hover) and (pointer: fine) {
        .pcd-it:hover { background: rgba(31, 41, 55, .055); }
        .pcd.tone-dark :is(.pcd-pill, .pcd-more) > .pcd-it:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
        .pcd-main:hover { background: var(--gold-light, #fcd34d); }
        .pcd-panel button:hover { background: rgba(31, 41, 55, .055); }
        .pcd-me:hover .pcd-tip { opacity: 1; translate: -50% 0; transition-delay: .4s; }
        .pcd.tips-warm .pcd-me:hover .pcd-tip { transition-delay: 0s; }
    }
    /* r607: the icons' pen-trace hover is gone; dock-motion.css moves them instead */

    .pcd-badge {
        position: absolute; top: -3px; inset-inline-end: -3px; min-width: 18px; height: 18px; padding: .18em 5px 0;
        box-sizing: border-box; border-radius: 999px; background: var(--red-primary, #ef4444); color: #fff;
        font-size: 11px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
        box-shadow: 0 0 0 2px #fff; pointer-events: none;
    }
    .pcd-badge[hidden] { display: none; }
    /* r662 (owner): in the dock a count is a red dot, as on the phone bar; the «بیشتر» list keeps its numbers */
    .pcd-pill .pcd-it > .pcd-badge, .pcd-pill .pcd-more > .pcd-it > .pcd-badge, .pcd-pill .pcd-main > .pcd-badge {
        top: 5px; inset-inline-end: 6px; min-width: 0; width: 9px; height: 9px; padding: 0; font-size: 0; color: transparent; overflow: hidden;
    }

    /* the one solid action — gold, like zincwolf's blue Buy */
    .pcd-main {
        position: relative; height: var(--pcd-item); margin-inline-end: 4px; padding: 0 16px 0 18px; border: 0; border-radius: 999px;
        background: var(--gold-primary, #f5b800); color: var(--dark-primary, #1f2937);
        display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1;
        white-space: nowrap; cursor: pointer; --ic-acc: currentColor;
        transition: background-color .15s ease, transform .16s var(--pcd-out), box-shadow .2s ease;
    }
    .pcd-main:active { transform: scale(.97); }

    /* «بیشتر» — the tabs that do not fit, in a glass panel above the dock */
    .pcd-more { position: relative; display: flex; }
    .pcd-panel {
        position: absolute; bottom: calc(100% + 16px); inset-inline-end: -6px; width: 240px; padding: 8px;
        border-radius: 22px; isolation: isolate;
        opacity: 0; translate: 0 8px; scale: .97; transform-origin: bottom left; visibility: hidden;
        transition: opacity .15s var(--pcd-out), translate .15s var(--pcd-out), scale .15s var(--pcd-out), visibility 0s .15s;
    }
    [dir="ltr"] .pcd-panel { transform-origin: bottom right; }
    .pcd-panel .pcd-glass { background: rgba(255, 255, 255, .96); }
    .pcd-more.open .pcd-panel { opacity: 1; translate: 0 0; scale: 1; visibility: visible; transition-duration: .2s; transition-delay: 0s; }
    .pcd-panel button {
        position: relative; width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0;
        border-radius: 14px; background: transparent; font: inherit; font-size: 14px; font-weight: 500;
        color: var(--dark-primary, #1f2937); cursor: pointer; text-align: start;
        transition: background-color .15s ease, transform .16s var(--pcd-out);
    }
    .pcd-panel button:active { transform: scale(.98); }
    .pcd-panel button[aria-current] { background: rgba(31, 41, 55, .08); font-weight: 700; }
    .pcd-panel .pcd-badge { position: static; margin-inline-start: auto; box-shadow: none; }

    /* the person — the seller's shop picture / the buyer's avatar */
    .pcd-me { width: var(--pcd-h); justify-content: center; padding: 0; border: 0; background: transparent; cursor: pointer; }
    .pcd-me img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; background: #fff;
        transition: box-shadow .2s ease, transform .16s var(--pcd-out); }
    .pcd-me:active img { transform: scale(.97); }
    .pcd-me[aria-current] img { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--gold-primary, #f5b800); }

    /* a name above an icon-only button (narrow PC widths, and the picture) */
    .pcd-tip {
        position: absolute; bottom: calc(100% + 12px); left: 50%; translate: -50% 4px; padding: 4px 10px; border-radius: 8px;
        background: rgba(31, 41, 55, .92); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.6; white-space: nowrap;
        opacity: 0; pointer-events: none; transition: opacity .125s var(--pcd-out), translate .125s var(--pcd-out);
    }
    .pcd-me:focus-visible .pcd-tip { opacity: 1; translate: -50% 0; }
    .pcd.tips-warm .pcd-tip { transition-duration: 0s; }
    .pcd-it .pcd-tip { display: none; }
}
/* narrower PCs and tablets: the bar's labels give way to icons with a name on
   hover below 840px */
@media (min-width: 640.02px) and (max-width: 839px) {
    .pcd :is(.pcd-pill, .pcd-more) > .pcd-it .pcd-lbl { display: none; }
    .pcd :is(.pcd-pill, .pcd-more) > .pcd-it { width: var(--pcd-item); padding: 0; justify-content: center; }
    .pcd .pcd-it .pcd-tip { display: block; }
    .pcd .pcd-it:focus-visible .pcd-tip { opacity: 1; translate: -50% 0; }
}
@media (min-width: 640.02px) and (max-width: 839px) and (hover: hover) and (pointer: fine) {
    .pcd .pcd-it:hover .pcd-tip { opacity: 1; translate: -50% 0; transition-delay: .4s; }
    .pcd.tips-warm .pcd-it:hover .pcd-tip { transition-delay: 0s; }
}
/* reduce motion: keep the fades, drop the movement */
@media (min-width: 640.02px) and (prefers-reduced-motion: reduce) {
    .pcd.is-hidden { translate: 0 0; }
    .pcd-panel { translate: 0 0; scale: 1; }
    .pcd-tip { translate: -50% 0 !important; }
    .pcd-it:active, .pcd-main:active, .pcd-panel button:active, .pcd-me:active img { transform: none; }
}
/* less transparency asked for: solid bars, no blur, no lens; more contrast: a
   clear edge too (the lens is set inline by liquid-glass.js, hence !important) */
@media (min-width: 640.02px) and (prefers-reduced-transparency: reduce) {
    .pcd .pcd-glass { background: rgba(255, 255, 255, .97) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
    .pcd.tone-dark:not(.is-home) > * > .pcd-glass { background: rgba(31, 41, 55, .97) !important; }
    .pcd .pcd-glass::before { opacity: .3; }
}
@media (min-width: 640.02px) and (prefers-contrast: more) {
    .pcd .pcd-glass { background: rgba(255, 255, 255, .98) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
        border: 1px solid rgba(31, 41, 55, .45); }
    .pcd.tone-dark:not(.is-home) > * > .pcd-glass { background: rgba(17, 24, 39, .98) !important; border-color: rgba(255, 255, 255, .6); }
}
