/*
 * Seller profile (Sunrise template, sunrise/profile/page.blade.php, behind config('redesign.profile')).
 *
 * Source: the handoff docs/redesign/009-profile/mockup-draft-v2-2026-11-11/ (profile.css and the
 * <style> block of approved-mockup.fragment.html: the .profile-page .profile and .profile-page
 * .gpn-design rules), reformatted one rule per line and adapted to the template's class names
 * (.profile is the page wrap; .gpn-design is not used). The seller badges (.badge, from
 * users/partials/seller-badges-sunrise) are restated from public/css/gpn-listing.css, which stays
 * scoped to .listing-page and is not loaded here.
 *
 * Every selector starts with .profile-page and every colour is a var(--sr-*) token that
 * resources/css/sunrise.css defines (tests/Feature/ProfileTemplateFlagTest checks both, and greps
 * for literal colours). Radii use the live radius tokens.
 *
 * Task 4 adds: the header's actions column and the owner's "Edit profile", buttons, the flash
 * banners, the Report / Block dialogs (fields, help text, error summary, invalid fields).
 *
 * Bump config('gpnow.profile.asset_version') whenever this file changes.
 */

/* Error tone (decision X1). Moves to sunrise.css when the shared --sr-danger token lands. */
.profile-page{--sr-danger:var(--sr-pill-text-pink)}

.profile-page{font:400 14px/1.6 var(--sr-font-body);color:var(--sr-body);background:var(--sr-ground);min-width:0}
.profile-page *{box-sizing:border-box}
.profile-page [hidden]{display:none!important}
.profile-page :is(h1,h2,h3,p,dl,dd,ul){margin:0}
.profile-page :is(h1,h2,h3){font-family:var(--sr-font-display);color:var(--sr-ink);font-weight:500;letter-spacing:-.035em;line-height:1.2}
.profile-page h1{font-size:40px}
.profile-page h2{font-size:24px}
.profile-page h3{font-size:18px}
.profile-page a{color:var(--sr-accent);text-underline-offset:4px}
.profile-page :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--sr-accent);outline-offset:4px}

/* Page wrap */
.profile-page .profile{max-width:1240px;margin:0 auto;padding:26px 24px 72px}

/* Header: avatar, identity, actions (T4) */
/* Two declared tracks; the actions column (or the owner's link) is placed on an implicit third track
   sized auto, so a header without one (a guest, a suspended seller) has no empty track and no gap. */
.profile-page .seller-header{display:grid;grid-template-columns:80px minmax(0,1fr);grid-auto-columns:auto;gap:24px;align-items:start;padding-bottom:32px;border-bottom:1px solid var(--sr-section-line)}
.profile-page .avatar{display:block;width:80px;height:80px;object-fit:cover;border-radius:var(--sr-radius-small);background:var(--sr-accent-wash);border:1px solid var(--sr-section-line)}
.profile-page .identity{min-width:0}
.profile-page .identity h1{margin:2px 0 7px;overflow-wrap:anywhere}
.profile-page .handle{display:block;margin-top:7px;font-family:var(--sr-font-body);font-size:14px;font-weight:400;letter-spacing:0;color:var(--sr-muted)}
.profile-page .avatar-initial{display:flex;align-items:center;justify-content:center;font:600 28px var(--sr-font-display);color:var(--sr-accent)}
.profile-page .exclusive{font-size:.6em;color:var(--sr-accent);vertical-align:middle;white-space:nowrap}
/* The marker is an inline SVG (header.blade.php): the web fonts carry no U+25C7, and the fallback-font search cost ~100 ms of first render. Sized in em so it tracks the h1 at every width. */
.profile-page .exclusive svg{display:inline-block;width:.75em;height:.75em;vertical-align:-.05em;overflow:visible}

/* Badges (users/partials/seller-badges-sunrise; restated from gpn-listing.css, whose radius is a literal
   4px that no token equals: --sr-radius-small (8px), as the handoff has it) */
.profile-page .seller-badges{display:flex;flex-wrap:wrap;gap:6px;margin-top:18px}
/* The badges partial always emits whitespace, so :empty never matches: no .badge child, no box (no double gap under the h1). */
.profile-page .seller-badges:not(:has(.badge)){display:none}
.profile-page .badge{display:inline-flex;align-items:center;padding:3px 7px;font-size:10px;font-weight:700;line-height:1.5;text-transform:uppercase;letter-spacing:.04em;border-radius:var(--sr-radius-small);background:var(--sr-soft);color:var(--sr-muted);border:1px solid var(--sr-line)}
.profile-page .badge.top{background:var(--sr-action);color:var(--sr-on-action);border-color:var(--sr-action)}
.profile-page .badge.caution{color:var(--sr-amber);border-color:var(--sr-amber)}

/* Facts chips */
.profile-page .facts-chips{display:flex;gap:8px 18px;flex-wrap:wrap;align-items:center;margin-top:18px;font-size:12px;color:var(--sr-muted)}
.profile-page .facts-chips a{display:inline-flex;align-items:center;min-height:24px}
.profile-page .facts-chips .activity{color:var(--sr-protected)}
.profile-page .facts-chips .suspended{color:var(--sr-danger);font-weight:700}

/*
 * Buttons (the handoff's .btn). Primary: the action colour, at least 52px and 16px text, underlined
 * on hover (README). Quiet: no border, muted text (Block, Report). Danger: the error tone (the Block
 * dialog's submit). Every target is at least 44px.
 */
.profile-page .btn{display:inline-flex;min-height:44px;align-items:center;justify-content:center;gap:8px;border:1px solid var(--sr-line);border-radius:var(--sr-radius-button);padding:10px 17px;background:var(--sr-surface);color:var(--sr-ink);font-family:inherit;font-size:14px;font-weight:700;line-height:1.4;text-decoration:none;text-align:center;cursor:pointer}
.profile-page .btn:hover{background:var(--sr-soft)}
.profile-page .btn.primary{min-height:52px;font-size:16px;background:var(--sr-action);border-color:var(--sr-action);color:var(--sr-on-action)}
.profile-page .btn.primary:hover{background:var(--sr-action);text-decoration:underline;text-underline-offset:4px}
.profile-page .btn.danger{border-color:var(--sr-danger);color:var(--sr-danger)}
.profile-page .btn.quiet{border-color:var(--sr-surface);color:var(--sr-muted)}
.profile-page .btn.quiet:hover{color:var(--sr-ink)}
.profile-page .btn[aria-pressed=true]{background:var(--sr-accent-wash);border-color:var(--sr-section-line);color:var(--sr-accent)}
.profile-page .btn[aria-busy=true]{cursor:progress}
.profile-page .btn.icon-button{min-width:44px;padding:0;font-size:22px;font-weight:400;line-height:1}

/* Header actions (sunrise/profile/actions): Follow + Bulk Order as buttons, Block + Report quiet */
.profile-page .seller-header>.actions,.profile-page .seller-header>.edit-profile{grid-column:3;grid-row:1}
.profile-page .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:300px}
.profile-page .actions form{display:grid;margin:0}
.profile-page .actions .action-secondary{font-size:12px}

/* Banner (the suspension notice and the flash messages, sunrise/profile/flash) */
.profile-page .banner{--sr-banner-color:var(--sr-accent);display:flex;gap:12px;align-items:flex-start;border:1px solid var(--sr-line);border-left:3px solid var(--sr-banner-color);background:var(--sr-soft);border-radius:var(--sr-radius-small);padding:16px;margin:24px 0;color:var(--sr-body)}
.profile-page .banner.error{--sr-banner-color:var(--sr-danger)}
.profile-page .banner.success{--sr-banner-color:var(--sr-protected)}
.profile-page .banner.warning{--sr-banner-color:var(--sr-amber)}
.profile-page .banner strong,.profile-page .banner .banner-icon,.profile-page .banner a{color:var(--sr-banner-color)}
.profile-page .banner-icon{width:24px;height:24px;flex:0 0 24px;border:1px solid var(--sr-banner-color);border-radius:var(--sr-radius-pill);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px}
.profile-page .banner p+p{margin-top:4px}
.profile-page .profile>.banner:first-child{margin-top:0}

/*
 * Dialogs (sunrise/profile/dialogs): Report seller, Block seller. Errors read --sr-danger (X1): the
 * summary above the fields and an invalid field's border.
 */
.profile-page dialog{width:min(500px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain;padding:28px;border:1px solid var(--sr-line);border-radius:var(--sr-radius-modal);background:var(--sr-surface);color:var(--sr-body);box-shadow:var(--sr-shadow-modal)}
.profile-page dialog::backdrop{background:var(--sr-scrim)}
.profile-page dialog .dialog-title{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px}
.profile-page dialog .dialog-title h2{min-width:0;overflow-wrap:anywhere;padding-top:6px}
.profile-page dialog .dialog-intro{font-size:12px;color:var(--sr-muted)}
.profile-page dialog form{margin-top:22px}
.profile-page .field{display:grid;gap:7px;margin-bottom:18px}
.profile-page .field>label{font-weight:700;font-size:13px;color:var(--sr-ink)}
.profile-page .field :is(select,textarea){width:100%;min-width:0;min-height:48px;border:1px solid var(--sr-muted);border-radius:var(--sr-radius-small);padding:12px 14px;background:var(--sr-surface);color:var(--sr-ink);font:inherit;line-height:1.45}
.profile-page .field textarea{resize:vertical}
.profile-page .field textarea::placeholder{color:var(--sr-muted)}
.profile-page .field [aria-invalid=true]{border-color:var(--sr-danger);border-width:2px}
.profile-page .field-help{color:var(--sr-muted);font-size:12px}
.profile-page .form-errors{margin-top:16px;padding:12px 15px;border:1px solid var(--sr-line);border-left:3px solid var(--sr-danger);border-radius:var(--sr-radius-small);background:var(--sr-soft);font-size:12px;color:var(--sr-danger)}
.profile-page .form-errors p{font-weight:700;margin-bottom:6px}
.profile-page .form-errors ul{margin:0;padding-left:18px}
.profile-page .dialog-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:24px}

/*
 * Seller performance (sunrise/profile/performance, decision P2): the live
 * users/partials/seller-performance-inline with its identity row off. Restated from
 * public/css/gpn-listing.css (.listing-page .performance-* and the generic helpers the partial's
 * markup uses), first, then the handoff's frame; scoped to .performance-section so the generic
 * helpers (.small, .muted, summary, table, .sr-only) do not reach the rest of the page. Element by
 * element: the section frame and its h2; .performance-heading (h3, p.small.muted, the help link);
 * .performance-kpis (div, span.small.muted, strong, p); details.performance-more and its summary
 * (h3 inside, +/− marker); dl.performance-facts (div, dt, dd, dd.small.muted, small); the trend
 * table (caption, th, td); .performance-record (strong, p); .performance-bio; .performance-domains
 * (li, span.muted); a.published-post (span, span.muted, .sr-only); the members-only prompt
 * (p.small.muted with its links).
 */
.profile-page .performance-section{margin-top:32px;padding:22px;border:1px solid var(--sr-line);border-radius:var(--sr-radius);background:var(--sr-surface);overflow-wrap:anywhere}
.profile-page .performance-section .muted{color:var(--sr-muted)}
.profile-page .performance-section .small{font-size:12px}
.profile-page .performance-section .sr-only{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.profile-page .performance-section summary{min-height:48px;display:flex;align-items:center;gap:10px;font-weight:700;color:var(--sr-ink);font-size:12px;list-style:none;cursor:pointer}
.profile-page .performance-section summary::-webkit-details-marker{display:none}
.profile-page .performance-section summary:after{content:'+';margin-left:auto;font-size:20px;color:var(--sr-accent)}
.profile-page .performance-section details[open]>summary:after{content:'−'}
.profile-page .performance-section table{border-collapse:collapse;width:100%;font-size:12px}
.profile-page .performance-section caption{text-align:left;font-weight:700;color:var(--sr-ink);padding:14px 0 8px}
.profile-page .performance-section :is(th,td){text-align:left;vertical-align:top;padding:11px 0;border-bottom:1px solid var(--sr-line);overflow-wrap:anywhere}
.profile-page .performance-section th{font-weight:500;color:var(--sr-muted);width:42%;padding-right:15px}
.profile-page .performance-section td{color:var(--sr-ink)}
.profile-page .performance-section .performance-heading{padding:14px 0 9px;border-bottom:1px solid var(--sr-line);margin:12px 0}
.profile-page .performance-section .performance-heading h3{font-size:18px;margin-bottom:5px}
.profile-page .performance-section .performance-heading a{display:inline-flex;min-height:44px;align-items:center}
.profile-page .performance-section .performance-kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.profile-page .performance-section .performance-kpis>div{padding:14px;border:1px solid var(--sr-line);background:var(--sr-soft);border-radius:var(--sr-radius);min-width:0;overflow-wrap:anywhere}
.profile-page .performance-section .performance-kpis>div>span:first-child{display:block}
.profile-page .performance-section .performance-kpis strong{display:block;font:500 22px var(--sr-font-display);color:var(--sr-ink);margin:6px 0}
.profile-page .performance-section .performance-kpis p{font-size:11px;color:var(--sr-muted);line-height:1.7;margin-top:8px}
.profile-page .performance-section .performance-more{border-top:1px solid var(--sr-line);margin-top:14px}
.profile-page .performance-section .performance-more>summary{min-height:56px}
.profile-page .performance-section .performance-more>summary h3{font-size:18px;margin:0}
.profile-page .performance-section .performance-more .performance-heading{margin-top:0;padding-top:0}
.profile-page .performance-section .performance-more .performance-heading:empty{display:none}
.profile-page .performance-section .performance-facts{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:15px 0}
.profile-page .performance-section .performance-facts>div{min-width:0;border-bottom:1px solid var(--sr-line);padding-bottom:12px;overflow-wrap:anywhere}
.profile-page .performance-section .performance-facts dt{font-size:12px;color:var(--sr-muted)}
.profile-page .performance-section .performance-facts dd{font-size:14px;color:var(--sr-ink);margin:5px 0}
.profile-page .performance-section .performance-facts dd+dd{font-size:11px;color:var(--sr-muted);line-height:1.6}
.profile-page .performance-section .performance-record{margin-top:20px;padding:15px;background:var(--sr-soft);font-size:12px;border-radius:var(--sr-radius)}
.profile-page .performance-section .performance-bio{white-space:pre-line}
.profile-page .performance-section .performance-domains{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px;margin:6px 0 0;font-size:12px}
.profile-page .performance-section .performance-domains li{padding:2px 9px;border:1px solid var(--sr-line);border-radius:var(--sr-radius-pill);background:var(--sr-soft)}
.profile-page .performance-section .published-post{display:flex;justify-content:space-between;min-height:44px;align-items:center;gap:12px;font-size:12px;border-bottom:1px solid var(--sr-line)}

/*
 * Websites section (sunrise/profile/websites, task 3). It always follows the performance section (and,
 * for a suspended seller, the notice), never the header directly: one rule line above it and the
 * same 32px rhythm as the performance section's own top margin.
 *
 * The list hosts the marketplace's x-gpn.mk-group / x-gpn.mk-offer unchanged: their Tailwind utilities
 * (sunrise.css, scope .sunrise, specificity 0,2,0) outrank this file's generic .profile-page a / h2 /
 * margin rules, so nothing here restyles a card. No container-query layer as on the listing page
 * (gpn-listing.css "Container-width layout"): there a group sits in a narrow main column, here it is
 * the page's full width (viewport minus the 16-24px gutters), so the components' own md (768px)
 * viewport switch already meets a column of 720px or more; and no svg rule reaches the Save icon.
 */
.profile-page .websites{border-top:1px solid var(--sr-section-line);margin-top:32px;padding-top:32px}
.profile-page .section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:20px}
.profile-page .section-head .count{font-size:12px;color:var(--sr-muted)}
/* "From this seller" above the websites h2 (the handoff's .eyebrow) */
.profile-page .eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--sr-accent);margin-bottom:10px}
.profile-page .website-list{display:grid;gap:14px;min-width:0}
/* Off-screen website rows skip rendering: showModal() makes the rest of the document inert and the browser restyles every node
   (48 rows, ~3,600 nodes: 120-152 ms per Report / Block dialog open or close at 4x CPU; 72 ms with this rule). The intrinsic sizes are
   the rows' natural heights (276px below the components' md step, 141px from 768px up); "auto" keeps the last rendered size once seen.
   Browsers without content-visibility ignore both properties and render every row as before. */
.profile-page .website-list>*{content-visibility:auto;contain-intrinsic-size:auto 276px}
@media (min-width:768px){
.profile-page .website-list>*{contain-intrinsic-size:auto 141px}
}
.profile-page .empty{text-align:center;background:var(--sr-soft);padding:40px 24px;border-radius:var(--sr-radius-small);color:var(--sr-muted)}

/* Website page links (sunrise/profile/pagination): 44px targets, the current page in the accent wash. */
.profile-page .pagination{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center;margin:26px 0 0}
.profile-page .pagination a{display:inline-flex;min-width:44px;min-height:44px;justify-content:center;align-items:center;gap:6px;padding:8px;border-radius:var(--sr-radius-small);color:var(--sr-body);text-decoration:none;font-variant-numeric:tabular-nums}
.profile-page .pagination a:hover{background:var(--sr-soft);color:var(--sr-ink)}
.profile-page .pagination a[aria-current=page]{background:var(--sr-accent-wash);color:var(--sr-accent);font-weight:700}
.profile-page .pagination .step{padding-inline:12px}
.profile-page .pagination .gap{display:inline-flex;min-width:24px;min-height:44px;justify-content:center;align-items:center;color:var(--sr-muted)}

@media (max-width:900px){
.profile-page .seller-header{gap:16px;grid-template-columns:64px minmax(0,1fr)}
.profile-page .avatar{width:64px;height:64px}
.profile-page .avatar-initial{font-size:23px}
.profile-page .seller-header>.actions,.profile-page .seller-header>.edit-profile{grid-column:2;grid-row:auto;justify-self:start}
.profile-page .actions{max-width:none;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:auto}
}

/* Performance at phone widths (gpn-listing.css's 760px step): one column, a tighter frame. */
@media (max-width:760px){
.profile-page .performance-section{padding:18px}
.profile-page .performance-section :is(.performance-kpis,.performance-facts){grid-template-columns:1fr}
.profile-page .performance-section .performance-kpis strong{font-size:20px}
}

@media (max-width:600px){
.profile-page .profile{padding:18px 16px 48px}
.profile-page .seller-header{padding-bottom:24px}
.profile-page .identity h1{font-size:30px}
.profile-page h2{font-size:21px}
.profile-page .seller-header>.actions,.profile-page .seller-header>.edit-profile{grid-column:1/-1}
.profile-page .seller-header>.actions{justify-self:stretch}
.profile-page .actions{grid-template-columns:1fr 1fr;grid-auto-flow:row}
.profile-page dialog{padding:20px}
.profile-page .facts-chips{gap:8px 14px}
.profile-page .section-head{margin-bottom:16px}
.profile-page .websites{margin-top:24px;padding-top:24px}
.profile-page .website-list{gap:12px}
.profile-page .pagination{gap:4px;margin-top:20px}
.profile-page .banner{padding:14px;gap:10px}
}
