/* Profile modal, name + affiliation prompt. */

.profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 24, 18, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.profile-modal {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow-md);
  padding: 28px 28px 22px;
  width: 100%;
  max-width: 440px;
  font-family: inherit;
}

.profile-modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.profile-modal-lede {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--dim, #6e6e6e);
  line-height: 1.5;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  font-size: 13px;
}

/* Inline checkbox variant, used for the AfriGuard opt-out toggle. */
.profile-field-checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--card-line);
  border-radius: 8px;
  background: var(--ground);
  margin-top: 4px;
}
.profile-field-checkbox input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.profile-field-checkbox span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg, #1a1a1a);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
}
.profile-field-checkbox span strong {
  font-weight: 600;
  display: block;
  margin-bottom: 3px;
}
.profile-field > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim, #6e6e6e);
}
/* Scoped to direct label children so the typeahead's inner
 * <input class="lang-chips-input"> doesn't pick up its own border
 * (which made the chip widget render as a doubly-bounded box). */
.profile-field > input,
.profile-field > textarea {
  padding: 9px 11px;
  font-size: 14.5px;
  font-family: inherit;
  border: 1px solid var(--card-line);
  border-radius: 7px;
  background: var(--card);
  color: var(--fg);
  transition: border-color 100ms ease, box-shadow 100ms ease;
  box-sizing: border-box;
  width: 100%;
}
.profile-field > input:focus,
.profile-field > textarea:focus {
  outline: none;
  border-color: var(--accent, #2f6f4f);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.profile-hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--dim, #6e6e6e);
  line-height: 1.45;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.profile-field .lang-chips-wrap {
  border: 1px solid var(--card-line);
  border-radius: 7px;
  background: var(--card);
  transition: border-color 100ms ease, box-shadow 100ms ease;
}
.profile-field .lang-chips-wrap.focused {
  border-color: var(--accent, #2f6f4f);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}
.profile-cancel,
.profile-save {
  appearance: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 100ms ease, border-color 100ms ease, color 100ms ease;
}
.profile-cancel {
  background: var(--card);
  color: var(--dim, #6e6e6e);
  border: 1px solid var(--card-line);
}
.profile-cancel:hover {
  border-color: var(--accent, #2f6f4f);
  color: var(--accent, #2f6f4f);
}
.profile-save {
  background: var(--accent, #2f6f4f);
  color: #fff;
  border: 1px solid var(--accent, #2f6f4f);
}
.profile-save:hover {
  filter: brightness(0.93);
}
.profile-save:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.profile-err {
  margin: 12px 0 0;
  color: #b04030;
  font-size: 13px;
  text-align: right;
}
