/* Contributor profile and waitlist application surfaces */

.cv-upload-grid {
  grid-template-columns: 1fr;
}

.cv-upload {
  min-height: 180px;
}

.cv-file-preview {
  width: 100%;
  padding: 22px;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  text-align: left;
}

.cv-document-icon {
  width: 52px;
  height: 62px;
  border: 1px solid rgba(140, 82, 255, 0.35);
  border-radius: 12px 12px 16px 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #c7aeff;
  background: rgba(140, 82, 255, 0.12);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.waitlist-centre {
  max-width: 460px;
  margin: auto;
}

.waitlist-centre > p:not(.panel-kicker) {
  max-width: 390px;
  margin: 0 auto 18px;
  color: #aaa4ad;
  font-size: 0.64rem;
  line-height: 1.7;
}

.waitlist-mark {
  width: 76px;
  height: 76px;
  margin: 8px auto 20px;
  border: 1px solid rgba(167, 211, 111, 0.34);
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(167, 211, 111, 0.22), rgba(167, 211, 111, 0.04));
  box-shadow: 0 0 44px rgba(167, 211, 111, 0.13);
}

.waitlist-mark span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0b0c09;
  background: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
}

.waitlist-note {
  max-width: 410px;
  margin: 0 auto 22px;
  padding: 14px;
  border: 1px solid rgba(140, 82, 255, 0.2);
  border-radius: 13px;
  display: flex;
  gap: 10px;
  color: #b99aff;
  background: rgba(140, 82, 255, 0.055);
  text-align: left;
}

.waitlist-note p {
  margin: 0;
  color: #99929e;
  font-size: 0.55rem;
  line-height: 1.55;
}

.profile-content {
  max-width: 1500px;
}

.profile-hero {
  margin-bottom: 16px;
  padding: 28px;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background:
    radial-gradient(circle at 85% 0, rgba(140, 82, 255, 0.15), transparent 34%),
    linear-gradient(145deg, #121114, #0d0d0e);
  overflow: hidden;
}

.profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

.profile-avatar {
  width: 82px;
  height: 82px;
  border: 1px solid rgba(140, 82, 255, 0.34);
  border-radius: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #eee7ff;
  background: linear-gradient(145deg, rgba(140, 82, 255, 0.32), rgba(140, 82, 255, 0.09));
  font-size: 1.12rem;
  font-weight: 800;
  box-shadow: 0 16px 34px rgba(74, 36, 146, 0.2);
}

.profile-identity h1 {
  margin: 7px 0 7px;
  color: #f2eef4;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.profile-identity > div > p:last-child {
  margin: 0;
  color: #817b84;
  font-size: 0.62rem;
}

.profile-completion-card {
  max-width: 390px;
  padding: 14px 16px;
  border: 1px solid rgba(140, 82, 255, 0.19);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.profile-completion-ring {
  width: 68px;
  height: 68px;
  padding: 5px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: conic-gradient(var(--green) var(--completion), rgba(255, 255, 255, 0.08) 0);
}

.profile-completion-ring > span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #121114;
}

.profile-completion-ring strong,
.profile-completion-ring small {
  display: block;
}

.profile-completion-ring strong {
  color: #eff5e9;
  font-size: 0.75rem;
}

.profile-completion-ring small {
  color: #79727e;
  font-size: 0.4rem;
}

.profile-completion-card > div:last-child strong {
  display: block;
  margin-bottom: 5px;
  color: #ded9e2;
  font-size: 0.65rem;
}

.profile-completion-card > div:last-child p {
  margin: 0;
  color: #746e79;
  font-size: 0.5rem;
  line-height: 1.5;
}

.profile-layout {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 16px;
}

.profile-form-column,
.profile-side-column {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.profile-side-column {
  position: sticky;
  top: 92px;
}

.profile-section,
.profile-side-card,
.profile-save-card {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: #0d0d0e;
}

.profile-section {
  padding: 24px;
}

.profile-section-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-section-heading > span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #b99dff;
  background: rgba(140, 82, 255, 0.1);
  font-size: 0.52rem;
  font-weight: 800;
}

.profile-section-heading p,
.profile-section-heading h2 {
  margin: 0;
}

.profile-section-heading p,
.profile-side-heading p {
  margin-bottom: 4px;
  color: #766f7b;
  font-size: 0.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-section-heading h2,
.profile-side-heading h2 {
  color: #e4dfe7;
  font-size: 0.88rem;
  letter-spacing: -0.03em;
}

.profile-fields {
  display: grid;
  gap: 14px;
}

.profile-fields.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-fields .full {
  grid-column: 1 / -1;
}

.profile-fields label,
.profile-wide-field {
  min-width: 0;
  display: grid;
  gap: 8px;
  color: #aaa4ae;
  font-size: 0.53rem;
  font-weight: 650;
}

.profile-fields label > span b,
.profile-wide-field > span b {
  color: var(--green);
}

.profile-fields label > small {
  color: #625d65;
  font-size: 0.44rem;
  font-weight: 500;
}

.profile-fields input,
.profile-fields select,
.profile-wide-field textarea,
.profile-input-suffix {
  width: 100%;
  min-height: 46px;
  border: 1px solid #2c2930;
  border-radius: 11px;
  background: #141316;
  color: #e1dce5;
  font: inherit;
  font-size: 0.57rem;
  outline: 0;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.profile-fields input,
.profile-fields select {
  padding: 0 13px;
}

.profile-fields input:focus,
.profile-fields select:focus,
.profile-wide-field textarea:focus,
.profile-input-suffix:focus-within {
  border-color: rgba(140, 82, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(140, 82, 255, 0.08);
}

.profile-wide-field {
  margin-top: 16px;
}

.profile-wide-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-wide-field > span small {
  color: #69636d;
  font-size: 0.44rem;
}

.profile-wide-field textarea {
  min-height: 128px;
  padding: 13px;
  resize: vertical;
  line-height: 1.65;
}

.profile-input-suffix {
  padding-right: 12px;
  display: flex;
  align-items: center;
}

.profile-input-suffix input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-input-suffix i {
  color: #77717b;
  font-size: 0.48rem;
  font-style: normal;
}

.profile-tag-preview {
  min-height: 48px;
  margin-top: 14px;
  padding: 10px;
  border: 1px dashed #2b2830;
  border-radius: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-tag-preview span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #a896ce;
  background: rgba(140, 82, 255, 0.08);
  font-size: 0.46rem;
}

.profile-domain-options {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.profile-domain-options legend {
  margin-bottom: 10px;
  color: #aaa4ae;
  font-size: 0.53rem;
  font-weight: 650;
}

.profile-domain-options label {
  min-height: 42px;
  position: relative;
}

.profile-domain-options input {
  position: absolute;
  opacity: 0;
}

.profile-domain-options span {
  height: 100%;
  padding: 0 11px;
  border: 1px solid #2b2930;
  border-radius: 10px;
  display: flex;
  align-items: center;
  color: #847e88;
  background: #131215;
  font-size: 0.49rem;
  cursor: pointer;
}

.profile-domain-options input:checked + span {
  border-color: rgba(140, 82, 255, 0.45);
  color: #c3adf1;
  background: rgba(140, 82, 255, 0.1);
}

.profile-side-card {
  padding: 20px;
}

.profile-side-heading {
  margin-bottom: 17px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-side-heading p,
.profile-side-heading h2 {
  margin-top: 0;
}

.profile-side-heading > span,
.profile-live-status {
  padding: 5px 7px;
  border-radius: 999px;
  color: #9fbf81;
  background: rgba(167, 211, 111, 0.08);
  font-size: 0.43rem;
  font-weight: 750;
  white-space: nowrap;
}

.profile-live-status i {
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  display: inline-block;
  background: var(--green);
}

.profile-status-card ul,
.profile-guidance {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.profile-status-card li,
.profile-guidance li {
  padding: 11px;
  border: 1px solid #252329;
  border-radius: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.profile-status-card li > span,
.profile-guidance li > b {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #a7d36f;
  background: rgba(167, 211, 111, 0.08);
  font-size: 0.49rem;
}

.profile-status-card li strong,
.profile-status-card li small,
.profile-guidance li strong,
.profile-guidance li small {
  display: block;
}

.profile-status-card li strong,
.profile-guidance li strong {
  margin-bottom: 3px;
  color: #bbb5bf;
  font-size: 0.52rem;
}

.profile-status-card li small,
.profile-guidance li small {
  color: #69636d;
  font-size: 0.44rem;
  line-height: 1.4;
}

.profile-status-card li:not(.complete):last-child > span {
  color: #aa8be8;
  background: rgba(140, 82, 255, 0.08);
}

.profile-guidance li {
  align-items: flex-start;
}

.profile-guidance li > b {
  color: #ad91e7;
  background: rgba(140, 82, 255, 0.08);
}

.profile-save-card {
  padding: 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.profile-save-card > div {
  margin-bottom: 13px;
}

.profile-save-card strong,
.profile-save-card small {
  display: block;
}

.profile-save-card strong {
  margin-bottom: 4px;
  color: #c9c3cd;
  font-size: 0.54rem;
}

.profile-save-card small {
  color: #6e6872;
  font-size: 0.43rem;
  line-height: 1.45;
}

.profile-save-button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  color: #fff;
  background: linear-gradient(135deg, #8c52ff, #6532ca);
  font: inherit;
  font-size: 0.56rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(101, 50, 202, 0.24);
}

html[data-theme="light"] .waitlist-centre > p:not(.panel-kicker),
html[data-theme="light"] .waitlist-note p {
  color: #665d6b;
}

html[data-theme="light"] .profile-hero,
html[data-theme="light"] .profile-section,
html[data-theme="light"] .profile-side-card,
html[data-theme="light"] .profile-save-card {
  border-color: #d8d0dc;
  background: #fff;
  box-shadow: 0 13px 34px rgba(45, 31, 52, 0.075);
}

html[data-theme="light"] .profile-hero {
  background: radial-gradient(circle at 85% 0, rgba(116, 56, 230, 0.13), transparent 35%), linear-gradient(145deg, #fff, #f7f3f9);
}

html[data-theme="light"] .profile-identity h1,
html[data-theme="light"] .profile-section-heading h2,
html[data-theme="light"] .profile-side-heading h2,
html[data-theme="light"] .profile-fields label,
html[data-theme="light"] .profile-wide-field,
html[data-theme="light"] .profile-status-card li strong,
html[data-theme="light"] .profile-guidance li strong,
html[data-theme="light"] .profile-save-card strong {
  color: #2c2431;
}

html[data-theme="light"] .profile-identity > div > p:last-child,
html[data-theme="light"] .profile-section-heading p,
html[data-theme="light"] .profile-side-heading p,
html[data-theme="light"] .profile-status-card li small,
html[data-theme="light"] .profile-guidance li small,
html[data-theme="light"] .profile-save-card small {
  color: #675e6d;
}

html[data-theme="light"] .profile-completion-card,
html[data-theme="light"] .profile-fields input,
html[data-theme="light"] .profile-fields select,
html[data-theme="light"] .profile-wide-field textarea,
html[data-theme="light"] .profile-input-suffix,
html[data-theme="light"] .profile-domain-options span,
html[data-theme="light"] .profile-status-card li,
html[data-theme="light"] .profile-guidance li {
  border-color: #d8d0dc;
  background: #f7f4f8;
  color: #332b38;
}

html[data-theme="light"] .profile-completion-ring > span {
  background: #fff;
}

html[data-theme="light"] .profile-completion-ring strong,
html[data-theme="light"] .profile-completion-card > div:last-child strong {
  color: #2c2431;
}

@media (max-width: 1040px) {
  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-side-column {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-save-card {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: center;
    gap: 16px;
  }

  .profile-save-card > div {
    margin: 0;
  }
}

@media (max-width: 700px) {
  .profile-hero {
    padding: 21px;
    align-items: stretch;
    flex-direction: column;
  }

  .profile-completion-card {
    max-width: none;
  }

  .profile-section {
    padding: 19px;
  }

  .profile-fields.two-column,
  .profile-side-column {
    grid-template-columns: 1fr;
  }

  .profile-domain-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-save-card {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .profile-content {
    padding-inline: 12px;
  }

  .profile-hero {
    padding: 18px;
    border-radius: 20px;
  }

  .profile-identity {
    align-items: flex-start;
    gap: 13px;
  }

  .profile-avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    font-size: 0.8rem;
  }

  .profile-identity h1 {
    font-size: 1.6rem;
  }

  .profile-completion-card {
    padding: 12px;
  }

  .profile-completion-ring {
    width: 60px;
    height: 60px;
  }

  .profile-section,
  .profile-side-card,
  .profile-save-card {
    padding: 16px;
    border-radius: 17px;
  }

  .profile-domain-options {
    grid-template-columns: 1fr;
  }
}

/* First-login, privacy-preserving country availability check */
.location-onboarding {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 4, 7, 0.76);
  backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.location-onboarding.open { opacity: 1; visibility: visible; }

.location-onboarding-dialog {
  position: relative;
  width: min(620px, 100%);
  max-height: min(820px, calc(100dvh - 32px));
  overflow: auto;
  padding: clamp(28px, 5vw, 48px);
  color: #f7f4fb;
  background: radial-gradient(circle at 92% 6%, rgba(132, 81, 255, 0.2), transparent 35%), linear-gradient(155deg, #16131d 0%, #0d0c11 72%);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 30px;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.48);
  transform: translateY(18px) scale(0.985);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}

.location-onboarding.open .location-onboarding-dialog { transform: translateY(0) scale(1); }
.location-onboarding-view[hidden] { display: none; }
.location-onboarding-view { animation: locationViewIn 280ms ease both; }
.location-onboarding-view h2 { margin: 12px 0 14px; max-width: 500px; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 0.98; letter-spacing: -0.055em; }
.location-onboarding-view > p:not(.panel-kicker) { margin: 0; max-width: 510px; color: #aaa4b4; font-size: 0.98rem; line-height: 1.65; }
.location-onboarding-mark,
.location-result-flag {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(139, 86, 255, 0.26), rgba(139, 86, 255, 0.07));
  border: 1px solid rgba(177, 140, 255, 0.3);
  font-size: 2rem;
  box-shadow: 0 18px 44px rgba(89, 48, 183, 0.18);
}
.location-onboarding-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  color: #d8d2df;
  background: rgba(255,255,255,.05);
  font-size: 1.45rem;
  cursor: pointer;
}
.location-privacy-note { display: flex; gap: 13px; align-items: flex-start; margin-top: 25px; padding: 16px; border: 1px solid rgba(167, 211, 111, 0.17); border-radius: 17px; background: rgba(167, 211, 111, 0.055); }
.location-privacy-note > span { display: grid; place-items: center; flex: 0 0 26px; height: 26px; border-radius: 50%; color: #0b0c08; background: #bce783; font-weight: 900; }
.location-privacy-note strong,
.location-privacy-note small { display: block; }
.location-privacy-note strong { color: #f2f7ec; font-size: .86rem; }
.location-privacy-note small { margin-top: 4px; color: #92988c; line-height: 1.45; }
.location-onboarding-actions { display: flex; gap: 11px; margin-top: 28px; }
.location-detect-primary,
.location-detect-secondary { min-height: 52px; padding: 0 21px; border-radius: 15px; font: inherit; font-weight: 800; cursor: pointer; }
.location-detect-primary { flex: 1; border: 0; color: white; background: linear-gradient(135deg, #8c52ff, #6931df); box-shadow: 0 13px 30px rgba(116, 66, 225, .28); }
.location-detect-secondary { border: 1px solid rgba(255,255,255,.12); color: #d4cfdc; background: rgba(255,255,255,.045); }
.location-detecting-view { padding: 44px 0 28px; text-align: center; }
.location-detecting-view h2,
.location-detecting-view > p { margin-left: auto; margin-right: auto; }
.location-radar { position: relative; width: 112px; height: 112px; margin: 0 auto 32px; display: grid; place-items: center; }
.location-radar::before,
.location-radar::after,
.location-radar i { content: ""; position: absolute; inset: 0; border: 1px solid rgba(159, 112, 255, .42); border-radius: 50%; animation: locationPulse 1.8s ease-out infinite; }
.location-radar::after { animation-delay: .6s; }
.location-radar i:first-of-type { animation-delay: 1.2s; }
.location-radar i:last-of-type { inset: 20px; animation: none; background: rgba(139, 82, 255, .08); }
.location-radar span { z-index: 1; width: 19px; height: 19px; border: 5px solid #f5f0ff; border-radius: 50% 50% 50% 0; background: #8c52ff; transform: rotate(-45deg); box-shadow: 0 0 28px rgba(150, 99, 255, .8); }
.location-result-region { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; padding: 15px 17px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.045); }
.location-result-region span { color: #958f9e; font-size: .78rem; }
.location-result-region strong { font-size: .9rem; }
.location-access-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 11px; }
.location-access-options > span { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 12px; border-radius: 13px; color: #eee9f5; background: rgba(255,255,255,.035); }
.location-access-options b { font-size: .76rem; }
.location-access-options small { color: #bda4f9; font-weight: 800; }

html[data-theme="light"] .location-onboarding { background: rgba(37, 31, 46, 0.44); }
html[data-theme="light"] .location-onboarding-dialog { color: #211b29; background: radial-gradient(circle at 92% 6%, rgba(132,81,255,.15), transparent 35%), #fff; border-color: #d9d1e0; box-shadow: 0 34px 90px rgba(59,42,77,.23); }
html[data-theme="light"] .location-onboarding-view > p:not(.panel-kicker) { color: #635b6b; }
html[data-theme="light"] .location-onboarding-close { color: #4e4655; border-color: #ded7e4; background: #f7f3fa; }
html[data-theme="light"] .location-privacy-note { border-color: #cde6ae; background: #f4faed; }
html[data-theme="light"] .location-privacy-note strong { color: #2d3d1c; }
html[data-theme="light"] .location-privacy-note small { color: #637154; }
html[data-theme="light"] .location-detect-secondary { color: #453d4b; border-color: #d8d0df; background: #f7f4f8; }
html[data-theme="light"] .location-result-region { border-color: #ddd4e4; background: #f8f5fa; }
html[data-theme="light"] .location-result-region span { color: #746b7b; }
html[data-theme="light"] .location-access-options > span { color: #2e2734; background: #f5f0f8; }

@keyframes locationViewIn { from { opacity: 0; transform: translateY(8px); } }
@keyframes locationPulse { 0% { opacity: .8; transform: scale(.35); } 85%,100% { opacity: 0; transform: scale(1); } }

@media (max-width: 620px) {
  .location-onboarding { align-items: end; padding: 0; }
  .location-onboarding-dialog { width: 100%; max-height: 92dvh; padding: 31px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 27px 27px 0 0; }
  .location-onboarding-view h2 { padding-right: 20px; font-size: 2.2rem; }
  .location-onboarding-actions { flex-direction: column; }
  .location-detect-primary,
  .location-detect-secondary { width: 100%; }
  .location-access-options { grid-template-columns: 1fr; }
  .location-onboarding-mark,
  .location-result-flag { width: 62px; height: 62px; border-radius: 19px; }
}
