/* ==========================================================================
   People: profile photos, freelancer profile, talent search, portfolio viewer,
   home "Work from our top talent" marquee, admin clients and freelancers.
   Uses the theme tokens from app.css (--card, --line, --ink, --muted, --wash, --primary).
   ========================================================================== */

/* ---------- Avatars (<x-avatar>) ---------- */
.avatar { overflow: hidden; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.avatar.has-photo { background: var(--wash); }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; font-size: 14px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.avatar-xl { width: 112px; height: 112px; font-size: 36px; box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--line); }
.avatar-edit { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.person-cell { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
a.person-cell:hover strong { color: var(--primary); }

/* ---------- Chips ---------- */
.chip-sm { font-size: 12.5px; padding: 5px 11px; }
.skill-chip { background: var(--wash); }
.skill-chips { margin-top: 10px; gap: 8px; }
.skill-chips:empty { display: none; }

/* ---------- Price tags ("Starting from $x – $y/hr") ---------- */
.price-tags { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; line-height: 1.35; }
.price-tag { white-space: nowrap; }

/* ---------- Freelancer profile ---------- */
.profile-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 28px; }
.profile-hero h1 { font-size: 28px; font-weight: 800; }
.profile-title { font-size: 16.5px; font-weight: 600; color: var(--body); margin-top: 4px; }
.profile-facts { gap: 8px 18px; }
.profile-facts > span { display: inline-flex; align-items: center; gap: 6px; }
.profile-facts svg { width: 15px; height: 15px; color: var(--muted); }
.profile-hero-side { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; min-width: 190px; }
.profile-rate { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.2; white-space: nowrap; }
.profile-rate span { font-size: 15px; font-weight: 600; color: var(--muted); }
.cat-path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cat-path-main { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
.cat-path-main svg { width: 18px; height: 18px; color: #4DAB4B; }
.cat-path-main:hover { color: var(--primary); }
.cat-path-sep { color: var(--muted); font-size: 20px; line-height: 1; }
.cat-path .chips { gap: 8px; }
@media (max-width: 760px) {
  .profile-hero { grid-template-columns: 1fr; text-align: left; padding: 22px; }
  .profile-hero-side { text-align: left; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 16px; }
}

/* ---------- Portfolio cards and file tiles ---------- */
.pf-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pf-card-media { display: block; }
.pf-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; }
.pf-card h3 a:hover { color: var(--primary); }
a.pf-card-link { color: inherit; }
a.pf-card-link:hover strong { color: var(--primary); }
.pf-thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 16 / 10; background: var(--wash); overflow: hidden; border-bottom: 1px solid var(--line); }
.pf-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-tile { flex-direction: column; gap: 8px; color: var(--muted); }
.pf-tile svg { width: 40px; height: 40px; }
.pf-tile-label { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pf-pdf { background: linear-gradient(135deg, rgba(229, 72, 77, .16), var(--wash)); color: #E5484D; }
.pf-csv { background: linear-gradient(135deg, rgba(77, 171, 75, .18), var(--wash)); color: #4DAB4B; }
.pf-html { background: linear-gradient(135deg, rgba(97, 118, 246, .18), var(--wash)); color: var(--primary); }
.pf-kind { position: absolute; top: 10px; left: 10px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }

/* ---------- Portfolio viewer ---------- */
.pf-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.pf-crumbs a { color: var(--muted); }
.pf-crumbs a:hover { color: var(--primary); }
.pf-viewer { padding: 16px; }
.pf-viewer-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 10px; }
.pf-frame { display: block; width: 100%; height: 72vh; min-height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pf-csv-table { max-height: 70vh; overflow: auto; }
.pf-csv-table table { font-size: 13px; }
.pf-csv-table th { position: sticky; top: 0; z-index: 1; }
.pf-csv-table td, .pf-csv-table th { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.pf-file-bar { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.pf-file-bar .btn { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Talent search (Hire Talents) ---------- */
.talent-search { margin-bottom: 24px; display: flex; flex-direction: column; gap: 16px; }
.talent-search-main { display: flex; gap: 10px; flex-wrap: wrap; }
.talent-search-input { position: relative; flex: 1; min-width: 240px; }
.talent-search-input svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.talent-search-input .input { padding-left: 40px; }
.talent-filters { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.talent-filters .field { margin: 0; }
.talent-filters label { font-size: 12.5px; color: var(--muted); }
.talent-filters .input { min-height: 40px; padding: 8px 10px; font-size: 14px; }
@media (max-width: 1024px) { .talent-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .talent-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Profile settings: rate ranges ---------- */
.rate-ranges { display: flex; flex-direction: column; gap: 10px; }
.rate-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.rate-range > span:first-child { min-width: 88px; }
.rate-input { width: 130px; min-height: 38px; padding: 7px 10px; }

/* ---------- Home: search bar + "Work from our top talent" ---------- */
.talent-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.talent-quick-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 0 6px; }
.talent-quick-label svg { width: 18px; height: 18px; color: #4DAB4B; }
.talent-quick input.input { flex: 2; min-width: 200px; }
.talent-quick select.input { flex: 1; min-width: 160px; width: auto; }

.tt-marquee { overflow: hidden; padding: 4px 0 8px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.tt-track { display: flex; width: max-content; animation: tt-scroll 70s linear infinite; }
.tt-marquee:hover .tt-track, .tt-marquee:focus-within .tt-track { animation-play-state: paused; }
.tt-group { display: flex; gap: 18px; padding: 0 18px 0 0; margin: 0; list-style: none; }
.tt-group > li { flex: none; }
.tt-card { display: flex; flex-direction: column; width: 280px; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--ink); transition: border-color .15s, transform .15s; }
.tt-card:hover, .tt-card:focus-visible { border-color: #4DAB4B; transform: translateY(-2px); color: var(--ink); }
.tt-card:focus-visible { outline: 2px solid #4DAB4B; outline-offset: 2px; }
.tt-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.tt-title { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tt-service { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-person { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; min-width: 0; }
.tt-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tt-person .talent-badge { flex: none; margin-left: auto; }
.tt-marquee.is-static { -webkit-mask-image: none; mask-image: none; overflow-x: auto; }
.tt-marquee.is-static .tt-track { animation: none; }
@keyframes tt-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .tt-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; scroll-snap-type: x mandatory; }
  .tt-track { animation: none; }
  .tt-group[aria-hidden="true"] { display: none; }
  .tt-group > li { scroll-snap-align: start; }
  .tt-card, .tt-card:hover { transition: none; transform: none; }
}
@media (max-width: 560px) { .tt-card { width: 240px; } }

/* ---------- Admin: clients ---------- */
.verify-ok { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--success, #2F9E5B); }
.verify-no { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--warn, #B54708); }
.admin-note { background: var(--wash); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }

/* ---------- Admin: freelancers ---------- */
.fl-search { margin-left: auto; gap: 8px; }
.fl-admin-head { gap: 16px; align-items: flex-start; }
.fl-admin-facts { gap: 8px 14px; margin-top: 10px; align-items: center; }
.fl-admin-hidden { background: var(--wash); border: 1px solid var(--line); color: var(--ink); font-weight: 500; }
.fl-admin-portfolio { display: flex; flex-direction: column; }
.fl-admin-pf { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.fl-admin-pf:first-child { border-top: 0; padding-top: 0; }
.fl-admin-pf-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); align-self: start; }
.fl-admin-pf-thumb .pf-thumb { border-bottom: 0; }
.fl-admin-pf-thumb .pf-tile svg { width: 28px; height: 28px; }
.fl-admin-pf-body { min-width: 0; }
.fl-admin-pf-body a:hover strong { color: var(--primary); }
@media (max-width: 560px) {
  .fl-search { margin-left: 0; width: 100%; }
  .fl-search .input[type="search"] { width: 100% !important; }
  .fl-admin-pf { grid-template-columns: 1fr; }
}
