/* ==========================================================================
   Flexable — Freelancer profile
   ========================================================================== */

.flxb-profile {
  min-height: calc(100vh - 160px);
}

/* ---------- Breadcrumb ---------- */

.flxb-profile-breadcrumb {
  padding: 26px 0 0;
  font-size: 11px;
  color: #94979a;
}

.flxb-profile-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.flxb-profile-breadcrumb a:hover {
  color: #333;
}

/* The trail is written across several lines, so the separator carries its own
   spacing rather than relying on whitespace in the markup. */
.flxb-profile-breadcrumb-sep {
  margin: 0 2px;
}

/* ---------- Hero ---------- */

.flxb-profile-hero {
  padding: 42px 0 36px;
  border-bottom: 1px solid var(--flxb-line);
}

/* Main column + the sticky rank card. */
.flxb-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
  align-items: start;
}

.flxb-profile-identity {
  display: flex;
  align-items: flex-start;
  gap: 19px;
}

.flxb-profile-portrait {
  width: 104px;
  height: 104px;
  border-radius: 27px;
  border: 1px solid #e7e9e8;
  background: #eef0ef;
  object-fit: cover;
  box-shadow: 0 8px 28px rgba(17, 17, 19, 0.06);
}

.flxb-profile-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 6px 9px;
  border: 1px solid #d1f0dc;
  border-radius: 99px;
  background: var(--flxb-active);
  font-size: 10px;
  font-weight: 780;
  color: #127241;
}

.flxb-home .flxb-profile-name {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  letter-spacing: -0.055em;
}

.flxb-profile-role {
  margin-top: 8px;
  font-size: 14px;
  color: #777b7d;
}

.flxb-profile-location {
  margin-top: 9px;
  font-size: 11px;
  color: #96999b;
}

/* ---------- Quick stats ---------- */

/* Built for four cells; the modifier below is the two-cell variant the current
   profile uses, until there are more verified stats to show. */
.flxb-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 760px;
  margin-top: 31px;
  border: 1px solid var(--flxb-line);
  border-radius: 18px;
  overflow: hidden;
}

.flxb-profile-stats.is-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 420px;
  margin-top: 34px;
}

.flxb-profile-stat {
  padding: 14px 15px;
  border-right: 1px solid var(--flxb-line);
  background: var(--flxb-panel);
}

.flxb-profile-stat:last-child,
.flxb-profile-stats.is-compact .flxb-profile-stat:nth-child(2) {
  border-right: 0;
}

.flxb-profile-stat small {
  display: block;
  margin-bottom: 5px;
  font-size: 8.5px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9b9ea0;
}

.flxb-profile-stat b {
  font-size: 13px;
}

/* ---------- Sticky rank card ---------- */

/* Clears the sticky nav; the admin-bar offset matches base.css's nav rule. */
.flxb-profile-aside {
  position: sticky;
  top: calc(var(--flxb-nav-h) + 28px);
  padding: 18px;
  border: 1px solid var(--flxb-line);
  border-radius: 21px;
  background: var(--flxb-panel);
  box-shadow: var(--flxb-shadow);
}

body.admin-bar .flxb-profile-aside {
  top: calc(var(--flxb-nav-h) + 60px);
}

.flxb-profile-aside-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9da0a2;
}

.flxb-profile-rank {
  margin: 7px 0 3px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.flxb-profile-rank-sub {
  font-size: 11px;
  line-height: 1.5;
  color: #7e8284;
}

.flxb-profile-availability {
  display: flex;
  justify-content: space-between;
  margin: 17px 0 12px;
  padding-top: 15px;
  border-top: 1px solid #eff0f0;
  font-size: 10px;
  color: #818587;
}

.flxb-profile-availability b {
  color: #147343;
}

.flxb-profile-check {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: var(--flxb-charcoal);
  font-size: 12px;
  font-weight: 760;
  color: #fff;
  cursor: pointer;
}

.flxb-profile-check:hover {
  background: #323138;
}

.flxb-profile-aside-note {
  margin-top: 9px;
  font-size: 9px;
  text-align: center;
  color: #a0a3a5;
}

/* ---------- Content ---------- */

.flxb-profile-content {
  padding: 42px 0 28px;
}

.flxb-profile-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 54px;
}

.flxb-profile-main {
  min-width: 0;
}

.flxb-profile-section {
  padding: 0 0 39px;
  margin-bottom: 39px;
  border-bottom: 1px solid var(--flxb-line);
}

.flxb-profile-section:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.flxb-profile-kicker {
  margin-bottom: 12px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9b9ea0;
}

.flxb-home .flxb-profile-section h2 {
  margin: 0 0 17px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.flxb-profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 720px;
}

.flxb-profile-skill {
  padding: 9px 11px;
  border: 1px solid var(--flxb-line);
  border-radius: 10px;
  background: var(--flxb-panel);
  font-size: 10.5px;
  color: #515557;
}

.flxb-profile-side-note {
  padding-top: 4px;
  font-size: 11px;
  line-height: 1.6;
  color: #777b7d;
}

.flxb-profile-side-note b {
  color: #2d3032;
}

.flxb-profile-ranking-link {
  font-weight: 700;
  color: #303335;
}

.flxb-profile-ranking-link:hover {
  color: var(--flxb-ink);
}

/* ---------- Requirement modal ---------- */

/* Collects the brief before the availability check. Sits above the page but
   below the auth panel (base.css puts .flxb-auth at 9999), because Continue
   hands off to that panel and the two are briefly on screen together. */
.flxb-req {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(17, 18, 20, 0.22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: 0.2s ease;
}

.flxb-req.is-open {
  opacity: 1;
  visibility: visible;
}

.flxb-req-modal {
  width: min(560px, 100%);
  padding: 26px;
  border: 1px solid var(--flxb-line);
  border-radius: 24px;
  background: var(--flxb-panel);
  box-shadow: 0 28px 80px rgba(17, 17, 19, 0.16), 0 3px 14px rgba(17, 17, 19, 0.06);
  transform: translateY(8px) scale(0.985);
  transition: 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.flxb-req.is-open .flxb-req-modal {
  transform: none;
}

.flxb-req-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.flxb-home .flxb-req-head h2 {
  margin: 0;
  font-size: 29px;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.flxb-req-close {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--flxb-line);
  border-radius: 11px;
  background: var(--flxb-panel);
  font-size: 18px;
  line-height: 1;
  color: #777;
  cursor: pointer;
}

.flxb-home .flxb-req-copy {
  max-width: 430px;
  margin: 10px 0 20px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #7c8082;
}

.flxb-req-person {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-size: 11px;
  font-weight: 680;
  color: #565a5c;
}

.flxb-req-person img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid #e5e7e7;
  object-fit: cover;
}

.flxb-req-box {
  width: 100%;
  min-height: 142px;
  padding: 14px 15px;
  border: 1px solid #dfe2e3;
  border-radius: 17px;
  background: var(--flxb-panel);
  outline: none;
  resize: vertical;
  font-size: 14px;
  line-height: 1.55;
  color: var(--flxb-ink);
  box-shadow: inset 0 1px 0 rgba(17, 17, 19, 0.015);
}

.flxb-req-box::placeholder {
  color: #a1a4a6;
}

.flxb-req-box:focus {
  border-color: rgba(5, 188, 91, 0.55);
  box-shadow: 0 0 0 4px rgba(5, 188, 91, 0.06);
}

.flxb-req-error {
  margin-top: 8px;
  font-size: 10px;
  color: #9a493f;
}

.flxb-req-error[hidden] {
  display: none;
}

.flxb-req-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
}

.flxb-req-note {
  font-size: 9.5px;
  line-height: 1.4;
  color: #9a9da0;
}

.flxb-req-continue {
  height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: var(--flxb-charcoal);
  font-size: 11.5px;
  font-weight: 760;
  color: #fff;
  white-space: nowrap;
  cursor: pointer;
}

.flxb-req-continue:hover {
  background: #323138;
}

.flxb-req-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .flxb-profile-grid,
  .flxb-profile-content-grid {
    grid-template-columns: 1fr;
  }

  .flxb-profile-aside {
    position: static;
  }

  /* The rank card above already carries this context on narrow screens. */
  .flxb-profile-content-grid > aside {
    display: none;
  }

  .flxb-profile-stats {
    grid-template-columns: 1fr 1fr;
  }

  .flxb-profile-stat:nth-child(2) {
    border-right: 0;
  }

  .flxb-profile-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--flxb-line);
  }

  .flxb-profile-stats.is-compact .flxb-profile-stat:nth-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  /* Bottom sheet — a centred card with a keyboard open leaves the textarea
     hidden behind it on phones. */
  .flxb-req {
    align-items: end;
    padding: 0;
  }

  .flxb-req-modal {
    border-radius: 24px 24px 0 0;
    padding: 22px 18px 20px;
  }

  .flxb-home .flxb-req-head h2 {
    font-size: 27px;
  }

  .flxb-req-actions {
    align-items: flex-end;
  }

  .flxb-req-note {
    max-width: 180px;
  }

  .flxb-profile-identity {
    flex-direction: column;
  }

  .flxb-profile-portrait {
    width: 88px;
    height: 88px;
  }

  .flxb-home .flxb-profile-name {
    font-size: 38px;
  }

  .flxb-profile-stats {
    grid-template-columns: 1fr;
  }

  .flxb-profile-stat {
    border-right: 0;
    border-bottom: 1px solid var(--flxb-line);
  }

  .flxb-profile-stat:last-child {
    border-bottom: 0;
  }

  /* Two-up survives at this width — the cells are short. */
  .flxb-profile-stats.is-compact {
    grid-template-columns: 1fr 1fr;
  }

  .flxb-profile-stats.is-compact .flxb-profile-stat:first-child {
    border-right: 1px solid var(--flxb-line);
    border-bottom: 0;
  }

  .flxb-profile-stats.is-compact .flxb-profile-stat:last-child {
    border-bottom: 0;
  }
}
