/* Moved out of partials/seller-card.blade.php (22 Nov 2026) so it is cached
   instead of sent inline with every page that shows it. Edit it here. */
/* ── Profile sidebar ─────────────────────────────────────────────
   Built on the marketplace card language so the seller card and the
   listing / review cards read as one system: same 20px radius, same
   #e3e9f2 hairline, the same layered shadow, the same left-aligned
   identity row (avatar, name, flag, rating), amber stars, and money
   in the brand green.

   Order is the order a buyer decides in: who is this → what have
   they done → what do buyers say → one action. */
/* Container queries, not viewport ones: this same card sits in a ~320px
   profile column, a ~270px listing sidebar and a full-width phone card, so
   what matters is how wide THE CARD is, not the screen. */
.psb { container-type:inline-size; }
/* AccoSwap Clean UI (11 Nov 2026): 14px corners, one hairline, a quiet shadow,
   titles 600, labels 12px and up, no capital-letter labels. */
.psb-card { background:#fff; border:1px solid #e6ebf2; border-radius:14px; overflow:hidden;
            box-shadow:0 1px 2px rgba(15,23,42,.05);
            -webkit-font-smoothing:antialiased; }
/* The page is long (listings, reviews, escrow table). Keeping the seller
   and the contact button in view is the single biggest win here. */
@media(min-width:992px){ .psb--sticky { position:sticky; top:88px; } }

/* ── Identity: the marketplace card's own header row ── */
/* Wraps on purpose: the sidebar column is only ~220px wide between 768 and
   1200px, where the badge and the username cannot share a line - the name was
   truncating to "s..". Below that width the badge drops to its own line and
   margin-left:auto keeps it on the right, so it always reads as a corner tag. */
.psb-hero   { position:relative; display:flex; align-items:flex-start; flex-wrap:wrap; gap:12px; padding:16px 16px 15px; }
.psb-avwrap { position:relative; flex-shrink:0; }
/* One ring, not three: white edge, hairline, soft drop. The old avatar had a
   blue-to-green gradient ring around a white border around a dot. */
.psb-av     { width:58px; height:58px; border-radius:50%; object-fit:cover; display:block;
              border:3px solid #fff; box-shadow:0 0 0 1px #e3e9f2, 0 4px 12px rgba(15,23,42,.12); }
.psb-dot    { position:absolute; bottom:1px; right:1px; width:14px; height:14px; border-radius:50%;
              border:3px solid #fff; box-shadow:0 0 0 1px rgba(15,23,42,.07); display:block; }
.psb-id     { flex:1 1 80px; min-width:0; padding-top:2px; }    /* 88px keeps the   /* 100px keeps the
               name beside the avatar even in the ~215px md column; only the
               badge wraps below it. */
/* Role badge, top right. It is a flex item, not an absolutely positioned
   chip - an absolute one rides over a long username sooner or later. */
.psb-role   { display:inline-flex; align-items:center; gap:5px; flex-shrink:0; align-self:flex-start;
              margin-top:2px; margin-left:auto; padding:4px 10px; border-radius:999px;
              font-size:11.5px; font-weight:500; letter-spacing:0; line-height:1.1; white-space:nowrap; }
.psb-role i { font-size:11px; }
.psb-role--seller { background:#f0fdf4; color:#15803d; border:1px solid #cdeadb; }
.psb-role--buyer  { background:#eff6ff; color:#1d4ed8; border:1px solid #cfe0fb; }
.psb-role--user   { background:#f4f6f9; color:#5b6b80; border:1px solid #e3e9f2; }
.psb-role--official { background:#1a1610; color:#fde047; border:1px solid #3a2f18; }
.psb-name   { font-size:16.5px; font-weight:600; color:#0f172a; letter-spacing:-.35px;
              line-height:1.25; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.psb-name a { color:inherit; text-decoration:none; transition:color .2s; }
.psb-name a:hover { color:#16a34a; text-decoration:none; }
.psb-prem   { margin-top:6px; }
/* The wrapper always prints but its component renders nothing when the seller
   holds no trust level, so the gap hangs off the chip - a margin on the wrapper
   would leave 6px of dead space under every badge-less name, and :empty cannot
   be trusted here (the wrapper still holds whitespace). */
.psb-badges .acco-badge { margin-top:6px; }
/* Same flag treatment as the homepage review cards - 21x15, rounded, ringed. */
.psb-loc    { display:flex; align-items:center; gap:6px; margin-top:6px; min-width:0;
              font-size:12.5px; font-weight:500; color:#64748b; }
.psb-flag   { width:21px; height:15px; object-fit:cover; border-radius:3px; flex-shrink:0;
              display:block; box-shadow:0 0 0 1px rgba(15,23,42,.12); }
.psb-loc span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.psb-status { margin-top:6px; font-size:11.5px; display:flex; align-items:center; gap:4px; }

/* ── Trust ── */
.psb-body  { padding:0 17px 15px; }
.psb-lbl   { display:flex; align-items:center; gap:6px; padding-top:13px; margin-bottom:12px;
             border-top:1px solid #eef1f6;
             font-size:12.5px; font-weight:500; letter-spacing:0; color:#64748b; }
.psb-lbl .psb-shield { color:#16a34a; font-size:11px; }
.psb-lbl .psb-info   { color:#c2ccd8; font-size:10.5px; cursor:help; }
.psb-stats { display:grid; grid-template-columns:repeat(3,1fr); text-align:center; }
.psb-stat + .psb-stat { border-left:1px solid #eef1f6; }
.psb-num   { font-size:18px; font-weight:600; color:#0f172a; letter-spacing:-.4px;
             line-height:1.15; font-variant-numeric:tabular-nums; }
/* Money is green everywhere else on the site; it is green here too. */
.psb-num--money { color:#16a34a; }
.psb-cap   { margin-top:4px; font-size:12px; font-weight:400; color:#64748b; }

/* ── Rating + sentiment ── */
/* Same story on the narrow column: the thumbs drop under the stars instead
   of colliding with them, and stay right-aligned when they do. */
.psb-rate  { display:flex; align-items:center; justify-content:space-between;
             flex-wrap:wrap; gap:9px 8px;
             margin-top:14px; padding-top:12px; border-top:1px solid #eef1f6; }
.psb-score { display:inline-flex; align-items:center; gap:6px; min-width:0; }
.psb-score b { font-size:14px; font-weight:600; color:#0f172a; letter-spacing:-.2px; }
.psb-stars   { display:inline-flex; gap:2px; }
.psb-stars i { font-size:11.5px; color:#f5a623; }
/* Thumbs stay - they are the buyer's own verdict, not a duplicate of the
   star average, and the review section below uses the same two icons. */
.psb-sent  { display:flex; align-items:center; gap:6px; flex-shrink:0; margin-left:auto; }
.psb-pill  { display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:999px;
             font-size:12px; font-weight:500; line-height:1.1; font-variant-numeric:tabular-nums; }
.psb-pill i { font-size:10.5px; }
.psb-pill--up   { background:#f0fdf4; color:#15803d; border:1px solid #cdeadb; }
.psb-pill--down { background:#fef2f2; color:#b91c1c; border:1px solid #f6d4d4; }
.psb-bar   { display:flex; height:5px; border-radius:999px; overflow:hidden;
             background:#eef1f6; margin-top:11px; }
.psb-bar i { display:block; height:100%; }
.psb-note  { margin-top:7px; font-size:12px; font-weight:400; color:#64748b; text-align:center; }
.psb-empty { margin-top:14px; padding-top:12px; border-top:1px solid #eef1f6;
             text-align:center; font-size:12.5px; color:#94a3b8; }

.psb-meta  { display:flex; align-items:center; justify-content:space-between; gap:10px;
             margin-top:13px; padding-top:12px; border-top:1px solid #eef1f6; font-size:12.5px; }
/* the label keeps one line ("Reply / Time" broke in two); a long value wraps on the right */
.psb-meta span { color:#64748b; font-weight:400; flex-shrink:0; white-space:nowrap; }
.psb-meta b    { color:#475569; font-weight:600; text-align:right; min-width:0; }

/* ── Bio ── same section label as Trust Score; plain light text under it.
   Cut by height with a fade instead of line-clamp, whose "…" lands alone
   on the empty line between two paragraphs. */
.psb-bio-ic    { color:#7c3aed; font-size:11px; }
.psb-bio-text  { margin:0; font-size:13px; font-weight:400; line-height:1.6; color:#475569;
                 white-space:pre-line; overflow-wrap:anywhere; }
.psb-bio-text.is-clamped { max-height:calc(1.6em * 4); overflow:hidden;
                 -webkit-mask-image:linear-gradient(180deg,#000 60%,transparent);
                         mask-image:linear-gradient(180deg,#000 60%,transparent); }
.psb-bio-text.is-short   { -webkit-mask-image:none; mask-image:none; }
.psb-more      { display:inline-block; margin:5px 0 0; padding:0; border:0; background:none; cursor:pointer;
                 font-size:12px; font-weight:500; color:#1d4ed8; }
.psb-more[hidden] { display:none; }   /* the display above would beat [hidden] */
.psb-more:hover { color:#1e40af; }
.psb-more:focus-visible { outline:2px solid #93c5fd; outline-offset:2px; border-radius:4px; }
.psb-bio-ask   { margin:0; font-size:12px; line-height:1.55; color:#8c98a8; }
.psb-bio-ask a { color:#ea580c; font-weight:500; text-decoration:none; white-space:nowrap; }
.psb-bio-ask a:hover { color:#c2410c; text-decoration:none; }
.psb-bio + .psb-lbl { margin-top:14px; }
/* Opened in full, a long bio can make the card taller than the screen;
   a sticky card that tall would hide its own bottom, so it stops sticking. */
.psb--sticky.is-bio-open { position:static; }

/* ── Action ── */
.psb-foot { padding:0 17px 16px; }
.psb-btn  { display:flex; align-items:center; justify-content:center; gap:7px; width:100%;
            padding:12px; border:0; cursor:pointer; border-radius:12px;
            background:#2563eb; color:#fff;
            font-size:13.5px; font-weight:600; letter-spacing:-.1px; text-decoration:none;
            box-shadow:none; transition:background .15s ease; }
.psb-btn:hover { color:#fff; text-decoration:none; background:#1d4ed8; }
/* Listing pages: Buy Now is the one solid button (sidebar on desktop, fixed bar on phones), so
   Contact / Chat With Seller in this card is the soft blue secondary at every width. */
.psb-btn.psb-btn--lp { background:#eff6ff; color:#1d4ed8; border:1px solid #cfe0fb; }
.psb-btn.psb-btn--lp:hover { background:#dbeafe; color:#1d4ed8; }
html.dark .psb-btn.psb-btn--lp { background:rgba(59,130,246,.14); color:#93c5fd; border-color:rgba(59,130,246,.35); }
@media (max-width:991.98px) {
    /* the profile link on the seller's name: a 32px+ tap target */
    .psb-name a { display:inline-block; padding:5px 0; margin:-5px 0; }
}
/* Upgrade is a flat soft amber secondary (premium colour, Clean UI: no gradient, no glow),
   never the same solid blue as the plain contact action. */
.psb-btn--soft { background:#fff; color:#334155; border:1px solid #e3e9f2; box-shadow:none; }
.psb-btn--soft:hover { color:#16a34a; border-color:#a3ddc0; background:#f8fdfa; }
.psb-btn--up { background:#fffbeb; color:#b45309; border:1px solid #fde68a; box-shadow:none; transform:none; }
.psb-btn--up:hover { background:#fef3c7; color:#92400e; border-color:#fcd34d; transform:none; }
/* Reporting is a last resort, so it is an outline button that only turns
   red on hover - it must never compete with Contact Seller. */
.psb-report { display:flex; align-items:center; justify-content:center; gap:6px; width:100%;
              margin-top:8px; padding:10px; border-radius:12px; cursor:pointer;
              background:#fff; color:#9aa6b5; border:1px solid #e3e9f2;
              font-size:13px; font-weight:500;
              transition:color .18s, border-color .18s, background .18s; }
.psb-report:hover { color:#ef4444; border-color:#fca5a5; background:#fef2f2; }
.psb-safe { display:flex; align-items:center; justify-content:center; gap:6px;
            margin:11px 0 0; font-size:12px; font-weight:400; color:#64748b; line-height:1.5; }
.psb-safe i { color:#16a34a; font-size:11px; }
/* Chat panel footer: a text link + the escrow note on one line. */
.psb-chatfoot { display:flex; align-items:center; justify-content:space-between; gap:10px;
                padding-top:12px; border-top:1px solid #eef1f6; }
.psb-link     { display:inline-flex; align-items:center; gap:4px; font-size:12.5px; font-weight:500;
                color:#1d4ed8; text-decoration:none; white-space:nowrap; transition:color .15s; }
.psb-link i   { font-size:10.5px; }
.psb-link:hover { color:#1e40af; text-decoration:none; }
.psb-link:focus-visible { outline:2px solid #93c5fd; outline-offset:2px; border-radius:4px; }
.psb-safe--inline { margin:0; white-space:nowrap; }

/* NOTE: this block must stay BELOW the base rules. A container query adds no
   specificity, so when it sat above them the base .psb-hero { align-items:
   flex-start } won and the avatar hung off to the left while the text under it
   was centred. */
/* Under ~300px of card there is no room for avatar + name + badge on one
   line: the country was truncating to "United S..." and the last-seen line
   was wrapping. The header goes centred instead, and the badge moves to the
   card's actual top-right corner - safe there because nothing else reaches
   it once the content is centred. */
@container (max-width:300px){
    .psb-hero   { flex-direction:column; align-items:center; text-align:center;
                  gap:10px; padding-top:15px; }
    .psb-id     { flex:0 1 auto; width:100%; padding-top:0; }
    .psb-loc,
    .psb-status { justify-content:center; }
    .psb-role   { position:absolute; top:12px; right:12px; margin:0; }
    .psb-prem   { display:flex; justify-content:center; }
    .psb-badges { display:flex; justify-content:center; }
    .psb-rate   { justify-content:center; }
    .psb-sent   { margin-left:0; }
    .psb-body,
    .psb-foot   { padding-left:15px; padding-right:15px; }
    .psb-num    { font-size:16.5px; }
    .psb-cap    { font-size:11.5px; }
}

/* Batch 6 (14 Nov 2026): on a phone the card spans the screen (the profile and listing pages
   set the bleed), so its sections line up at 16px like the page title. */
@media (max-width:640px){
    .psb-hero, .psb-body, .psb-foot { padding-left:16px; padding-right:16px; }
}

/* Dark mode. The profile pages dark-theme inline styles with [style*="…"]
   selectors; this card is class-based, so it states its own. */
html.dark .psb-card  { background:#1e293b; border-color:#334155;
                       box-shadow:none; }
html.dark .psb-lbl   { color:#94a3b8; }
html.dark .psb-cap,
html.dark .psb-note,
html.dark .psb-empty,
html.dark .psb-safe,
html.dark .psb-meta span { color:#8896aa; }
html.dark .psb-av    { border-color:#1e293b; box-shadow:0 0 0 1px #334155, 0 4px 12px rgba(0,0,0,.4); }
html.dark .psb-dot   { border-color:#1e293b; }
html.dark .psb-name,
html.dark .psb-num,
html.dark .psb-score b { color:#f1f5f9; }
html.dark .psb-num--money { color:#4ade80; }
html.dark .psb-loc   { color:#94a3b8; }
html.dark .psb-meta b { color:#cbd5e1; }
html.dark .psb-stat + .psb-stat { border-left-color:#334155; }
html.dark .psb-lbl,
html.dark .psb-rate,
html.dark .psb-meta,
html.dark .psb-empty { border-color:#334155; }
html.dark .psb-bar   { background:#334155; }
html.dark .psb-pill--up   { background:rgba(34,197,94,.14); color:#4ade80; border-color:rgba(34,197,94,.32); }
html.dark .psb-pill--down { background:rgba(239,68,68,.14); color:#f87171; border-color:rgba(239,68,68,.32); }
html.dark .psb-role--seller { background:rgba(34,197,94,.14); color:#4ade80; border-color:rgba(34,197,94,.32); }
html.dark .psb-role--buyer  { background:rgba(59,130,246,.15); color:#93c5fd; border-color:rgba(59,130,246,.34); }
html.dark .psb-role--user   { background:rgba(148,163,184,.14); color:#cbd5e1; border-color:#334155; }
html.dark .psb-role--official { background:#1a1610; color:#fde047; border-color:#3a2f18; }
/* Near-black on a slate card is invisible - lift it and give it an edge. */
html.dark .psb-btn   { background:#2563eb; border:1px solid #2563eb; }
html.dark .psb-btn:not(.psb-btn--lp):not(.psb-btn--up):not(.psb-btn--soft):hover { background:#1d4ed8; }
html.dark .psb-btn.psb-btn--lp:hover { background:rgba(59,130,246,.22); color:#bfdbfe; }
html.dark .psb-btn--up { background:rgba(245,158,11,.12); color:#fcd34d; border:1px solid rgba(245,158,11,.35); }
html.dark .psb-btn--up:hover { background:rgba(245,158,11,.2); color:#fde68a; border-color:rgba(245,158,11,.5); }
html.dark .psb-btn--soft { background:transparent; color:#cbd5e1; border-color:#334155; }
html.dark .psb-btn--soft:hover { color:#4ade80; border-color:rgba(34,197,94,.45); background:rgba(34,197,94,.10); }
html.dark .psb-report { background:transparent; color:#8896aa; border-color:#334155; }
html.dark .psb-report:hover { color:#f87171; border-color:rgba(239,68,68,.45); background:rgba(239,68,68,.10); }
html.dark .psb-name a:hover { color:#4ade80; }
html.dark .psb-chatfoot { border-top-color:#334155; }
html.dark .psb-link     { color:#93c5fd; }
html.dark .psb-link:hover { color:#bfdbfe; }
html.dark .psb-bio-ic   { color:#c4b5fd; }
html.dark .psb-bio-text { color:#cbd5e1; }
html.dark .psb-more     { color:#93c5fd; }
html.dark .psb-bio-ask  { color:#8896aa; }
html.dark .psb-bio-ask a { color:#fb923c; }
