/* Gigxie — seller profile page */

.seller-page { padding-block: 32px 96px; }

.seller-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
  margin-top: 20px;
}
.seller-main { display: grid; gap: 64px; min-width: 0; }

/* ---------- Profile header card ---------- */
.profile-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 32px;
  box-shadow: var(--shadow-card);
}
.profile-top { display: flex; gap: 24px; align-items: flex-start; }
.profile-avatar-wrap { position: relative; flex: none; }
.profile-id { min-width: 0; flex: 1; }
.profile-name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-name-row h1 { font-size: 32px; letter-spacing: -0.02em; }
.badge-pro {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 700;
  background: var(--ink);
  color: var(--accent);
  white-space: nowrap;
}
/* an author `display` beats the UA's [hidden] { display: none } — put it back */
.badge-pro[hidden] { display: none; }
.badge-pro svg { width: 12px; height: 12px; fill: currentColor; }
.profile-tagline { font-size: 17px; color: var(--body); margin-top: 8px; }
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}
.profile-meta li { display: inline-flex; align-items: center; gap: 8px; list-style: none; }
.profile-meta svg { width: 15px; height: 15px; stroke: var(--muted); flex: none; }
.profile-meta strong { color: var(--ink); font-weight: 600; }

/* Share / report */
.profile-actions { display: flex; gap: 8px; flex: none; margin-left: auto; }
.profile-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding-inline: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--body);
  transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.profile-action:hover { border-color: var(--brand); color: var(--brand); }
.profile-action:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.profile-action svg { width: 16px; height: 16px; stroke: currentColor; fill: none; flex: none; }

.profile-about { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.profile-about h2,
.profile-skills h2 { font-size: 18px; margin-bottom: 8px; }
.profile-about p { max-width: 72ch; }
.profile-skills { margin-top: 24px; }

/* Languages line under the skill chips */
.profile-langs {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.profile-langs[hidden] { display: none; }
.profile-langs strong { color: var(--ink); font-weight: 600; }

/* ---------- Stats band ----------
   The cell count varies with what the API can actually back, so the 1px grid gap
   paints the dividers instead of nth-child border maths. */
.stats-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--line);
  overflow: hidden;
}
.stats-band[hidden] { display: none; }
.stat-cell { padding: 24px; text-align: center; background: var(--bg-soft); }
.stat-cell .stat-num {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-cell .stat-num svg { width: 20px; height: 20px; fill: var(--star); }
.stat-cell .stat-label { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- Section titles inside the column ---------- */
.seller-main .section-head { margin-bottom: 24px; }
.seller-main .section-head h2 { font-size: 24px; }
.seller-main .section-head p { font-size: 16px; }
.seller-main .section-head-row { margin-bottom: 24px; }

/* Gig grid: 2-up inside the narrower column */
.seller-gigs .grid { grid-template-columns: repeat(2, 1fr); }

/* ---------- Reviews ---------- */
.review-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg-soft);
  margin-bottom: 24px;
}
.review-summary[hidden] { display: none; }
.review-summary-score { text-align: center; }
.review-summary-score .big {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.review-summary-score .star-row { margin-top: 8px; }
.review-summary-score .sub { font-size: 13px; color: var(--muted); margin-top: 8px; }
.rating-bars { display: grid; gap: 8px; min-width: 0; }
.rating-bar-row { display: grid; grid-template-columns: 56px 1fr 48px; align-items: center; gap: 12px; font-size: 13px; color: var(--body); }
.rating-bar-row .count { text-align: right; color: var(--muted); }
.rating-bar { height: 8px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.rating-bar span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--star); }

/* Sort control */
.review-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.review-sort[hidden] { display: none; }
.review-sort select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  transition: border-color var(--ease);
}
.review-sort select:hover { border-color: #CFCFE0; }
.review-sort select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.review-list { display: grid; gap: 0; }
.review-empty { padding: 24px 0; border-top: 1px solid var(--line); color: var(--body); }
.review-item { display: flex; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.review-body { min-width: 0; flex: 1; }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-head .name { font-weight: 600; color: var(--ink); font-size: 15px; }
.review-head .country { font-size: 13px; color: var(--muted); }
.review-head .date { font-size: 13px; color: var(--muted); margin-left: auto; }
.review-body .star-row { margin-top: 4px; }
.review-text { margin-top: 8px; font-size: 15px; }
.review-gig { margin-top: 8px; font-size: 13px; color: var(--muted); }
.review-gig a { color: var(--body); text-decoration: underline; }
.review-gig a:hover { color: var(--brand); }
.review-more-row { display: flex; justify-content: center; margin-top: 24px; }
.review-more-row[hidden] { display: none; }

/* ---------- Contact card ---------- */
.seller-aside {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 16px;
}
.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.contact-seller { display: flex; align-items: center; gap: 12px; }
.contact-seller .who { min-width: 0; }
.contact-seller .who .name { font-weight: 700; color: var(--ink); font-size: 16px; }
.contact-status { display: inline-flex; align-items: center; font-size: 13px; color: var(--muted); margin-top: 2px; }
.contact-rows { display: grid; gap: 8px; margin: 16px 0; padding: 16px 0; border-block: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.contact-rows div { display: flex; justify-content: space-between; gap: 12px; }
/* a long value (a languages list) wraps under its own label instead of shoving it */
.contact-rows strong { color: var(--ink); font-weight: 600; text-align: right; min-width: 0; }
.contact-rows span { flex: none; }
.contact-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 12px; }

/* Trust module under the contact card — keeps the rail alive while the page scrolls */
.trust-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
}
/* a <p>, not a heading: 14px is far too small to sit at the same level as the
   24px section h2s in the a11y tree */
.trust-card .trust-title { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.trust-card ul { display: grid; gap: 12px; list-style: none; padding: 0; }
.trust-card li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.trust-card svg { width: 18px; height: 18px; stroke: var(--brand); fill: none; flex: none; margin-top: 2px; }
.trust-card strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }

/* ---------- Loading skeletons ----------
   Same shimmer as app.css so the whole product loads the same way. */
.sk {
  /* spans are inline by default — height/width would be dropped in the placeholders
     whose parent is a plain block (.stat-cell, .review-summary-score). */
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bg-soft) 25%, #EEEEF5 37%, var(--bg-soft) 63%);
  background-size: 400% 100%;
  animation: sk-shimmer 1.4s ease infinite;
}
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

.sk-line { height: 12px; }
h1 > .sk { display: block; height: 34px; width: 260px; max-width: 100%; }
.profile-tagline > .sk { display: block; height: 17px; width: 380px; max-width: 100%; }
.profile-meta .sk { height: 14px; width: 130px; }
.stats-band .sk { height: 28px; margin: 0 auto 8px; width: 72px; }
.stats-band .sk + .sk { height: 13px; width: 96px; margin-bottom: 0; }
.sk-gig {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
  overflow: hidden;
}
.sk-gig .sk-thumb { aspect-ratio: 16 / 10; border-radius: 0; }
.sk-gig .sk-gig-body { display: grid; gap: 10px; padding: 16px; }
.sk-gig .sk-gig-body .sk:nth-child(1) { width: 45%; height: 14px; }
.sk-gig .sk-gig-body .sk:nth-child(2) { width: 92%; }
.sk-gig .sk-gig-body .sk:nth-child(3) { width: 64%; }
.sk-review { display: flex; gap: 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.sk-review .sk-avatar { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.sk-review .sk-lines { flex: 1; display: grid; gap: 10px; }
.sk-review .sk-lines .sk:nth-child(1) { width: 30%; }
.sk-review .sk-lines .sk:nth-child(2) { width: 96%; }
.sk-review .sk-lines .sk:nth-child(3) { width: 78%; }
.review-summary .sk-score { height: 62px; width: 96px; margin: 0 auto; }
.review-summary .sk-bars { display: grid; gap: 12px; }
.review-summary .sk-bars .sk { height: 8px; }
.contact-seller .sk-name { display: block; height: 16px; width: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .seller-layout { grid-template-columns: 1fr; }
  .seller-aside { position: static; top: auto; }

  /* Primary CTA follows the reader instead of sitting 8,000px down the page */
  .contact-card {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 0;
    border-width: 1px 0 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(14, 14, 26, .12);
  }
  .contact-card .contact-rows,
  .contact-card .contact-note,
  .seller-aside .trust-card { display: none; }
  .contact-card .btn-block { width: auto; margin-left: auto; flex: none; }
  /* One line each, always: an API-created seller's long name or status text wraps
     otherwise and the bar grows past the space `body` reserves for it. */
  .contact-card .contact-seller { min-width: 0; }
  .contact-card .who { flex: 1; min-width: 0; }
  .contact-card .who .name,
  .contact-card .contact-status {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body { padding-bottom: 96px; }
}
@media (max-width: 720px) {
  .seller-page { padding-block: 20px 56px; }
  .seller-main { gap: 48px; }
  .profile-card { padding: 24px; }
  .profile-top { flex-direction: column; gap: 16px; }
  .profile-actions { margin-left: 0; }
  .profile-name-row h1 { font-size: 26px; }
  .seller-gigs .grid { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: 1fr; gap: 20px; }
  .review-head .date { margin-left: 0; width: 100%; }
  .seller-main .section-head-row { align-items: flex-start; gap: 12px; }
}
@media (max-width: 420px) {
  .stats-band { grid-template-columns: 1fr; }
  .contact-seller .who .name { font-size: 15px; }
  .contact-card .avatar-lg { width: 40px; height: 40px; font-size: 15px; }
}
