.bp-profile-edit-page {
  min-width: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem) 1rem 4rem;
  overflow-wrap: anywhere;
}

.bp-profile-edit-container {
  width: min(100%, 980px);
  margin: 0 auto;
}

.bp-profile-edit-heading {
  max-width: 700px;
  margin-bottom: 1.5rem;
}

.bp-profile-edit-heading h1,
.bp-profile-edit-card h2,
.bp-profile-edit-preview h2 {
  margin: 0;
  color: #20242b;
}

.bp-profile-edit-heading > p:last-child,
.bp-profile-edit-help,
.bp-profile-edit-public-note,
.bp-profile-edit-field-note {
  color: #626975;
  line-height: 1.7;
}

.bp-profile-edit-heading > p:last-child {
  margin: .6rem 0 0;
}

.bp-profile-edit-message {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border: 1px solid #b9dfc7;
  border-radius: 10px;
  color: #185c31;
  background: #f0fbf4;
}

.bp-profile-edit-layout {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.28fr);
  gap: 1.25rem;
  align-items: start;
}

.bp-profile-edit-preview,
.bp-profile-edit-card {
  min-width: 0;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid #e1e4e9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(33, 39, 50, .06);
}

.bp-profile-edit-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bp-profile-edit-preview-head {
  margin-bottom: 1rem;
}

.bp-profile-edit-preview-head .bp-kicker {
  margin-bottom: .25rem;
}

.bp-profile-edit-avatar {
  display: block;
  width: 132px;
  height: 132px;
  margin-bottom: 1rem;
  border-radius: 50%;
  object-fit: cover;
  background: #edf0f3;
}

.bp-profile-edit-avatar--fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.8rem;
  font-weight: 850;
  background: linear-gradient(145deg, #39414d, #8a94a1);
}

.bp-profile-edit-preview-name {
  max-width: 100%;
  color: #20242b;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

.bp-profile-edit-preview-handle {
  display: block;
  margin-top: .25rem;
  color: #68717d;
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.bp-profile-edit-preview-bio {
  width: 100%;
  margin: .75rem 0 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  line-height: 1.7;
}

.bp-profile-edit-public-note {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #edf0f3;
  font-size: .88rem;
}

.bp-profile-edit-card h2 {
  font-size: 1.35rem;
}

.bp-profile-edit-help {
  margin: .5rem 0 1.25rem;
  font-size: .9rem;
}

.bp-profile-edit-form {
  min-width: 0;
}

.bp-profile-edit-validation-summary {
  margin: 0 0 1rem;
  color: #a32626;
}

.bp-profile-edit-validation-summary:empty {
  display: none;
}

.bp-profile-edit-field {
  min-width: 0;
  margin-top: 1rem;
}

.bp-profile-edit-field:first-of-type {
  margin-top: 0;
}

.bp-profile-edit-field label {
  display: block;
  margin-bottom: .4rem;
  color: #282d35;
  font-weight: 750;
}

.bp-profile-edit-field label span {
  color: #b3261e;
}

.bp-profile-edit-field input,
.bp-profile-edit-field textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: .72rem .8rem;
  border: 1px solid #cfd5dc;
  border-radius: 8px;
  color: #20242b;
  background: #fff;
}

.bp-profile-edit-field textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.6;
}

.bp-profile-edit-field input:focus,
.bp-profile-edit-field textarea:focus {
  border-color: #263b55;
  outline: 3px solid rgba(38, 59, 85, .16);
}

.bp-profile-edit-input-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .55rem;
  align-items: center;
}

.bp-profile-edit-input-meta--stacked {
  display: block;
}

.bp-profile-edit-counter {
  min-width: 4.8rem;
  color: #69717d;
  font-size: .78rem;
  text-align: right;
  white-space: nowrap;
}

.bp-profile-edit-input-meta--stacked .bp-profile-edit-counter {
  display: block;
  margin-top: .3rem;
}

.bp-profile-edit-field-note {
  margin: .35rem 0 0;
  font-size: .8rem;
}

.bp-profile-edit-field-error {
  display: block;
  min-height: 1.25rem;
  margin-top: .25rem;
  color: #a32626;
  font-size: .85rem;
}

.bp-profile-edit-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: 1.25rem;
}

.bp-profile-edit-actions button,
.bp-profile-edit-secondary-link {
  min-height: 42px;
  padding: .65rem .9rem;
  border-radius: 8px;
  font-weight: 750;
}

.bp-profile-edit-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  color: #fff;
  background: #263b55;
  cursor: pointer;
}

.bp-profile-edit-actions button:disabled {
  cursor: wait;
  opacity: .65;
}

.bp-profile-edit-secondary-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd5dc;
  color: #263b55;
  background: #fff;
  text-decoration: none;
}

.bp-profile-edit-spinner {
  display: none;
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, .38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bp-profile-edit-spin .7s linear infinite;
}

.bp-profile-edit-actions button[aria-busy="true"] .bp-profile-edit-spinner {
  display: inline-block;
}

@keyframes bp-profile-edit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bp-profile-edit-spinner {
    animation: none;
  }
}

@media (max-width: 700px) {
  .bp-profile-edit-layout {
    grid-template-columns: 1fr;
  }

  .bp-profile-edit-preview {
    align-items: center;
    text-align: center;
  }

  .bp-profile-edit-preview-bio,
  .bp-profile-edit-public-note {
    text-align: left;
  }
}

@media (max-width: 430px) {
  .bp-profile-edit-page {
    padding-inline: .75rem;
  }

  .bp-profile-edit-input-meta {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .bp-profile-edit-counter {
    text-align: left;
  }

  .bp-profile-edit-actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

.bp-profile-avatar-picker {
  display: flex;
  width: 100%;
  justify-content: flex-start;
}

.bp-profile-avatar-trigger {
  position: relative;
  display: block;
  width: 132px;
  height: 132px;
  cursor: pointer;
  border-radius: 50%;
}

.bp-profile-avatar-trigger:focus-visible {
  outline: 3px solid rgba(38, 59, 85, .45);
  outline-offset: 4px;
}

.bp-profile-avatar-trigger .bp-profile-edit-avatar {
  width: 100%;
  height: 100%;
  margin: 0;
}

.bp-profile-avatar-current[hidden],
.bp-profile-avatar-current-fallback[hidden] {
  display: none;
}

.bp-profile-avatar-camera {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: #263b55;
  font-size: .9rem;
  line-height: 1;
}

.bp-profile-avatar-change-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(20, 28, 38, .58);
  font-size: .86rem;
  font-weight: 750;
  opacity: 0;
  transition: opacity .15s ease;
}

.bp-profile-avatar-trigger:hover .bp-profile-avatar-change-text,
.bp-profile-avatar-trigger:focus-visible .bp-profile-avatar-change-text {
  opacity: 1;
}

.bp-profile-avatar-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bp-profile-avatar-file-input:focus-visible {
  outline: 3px solid rgba(38, 59, 85, .45);
  outline-offset: 4px;
}

.bp-profile-avatar-section {
  width: 100%;
  margin-top: 1rem;
}

.bp-profile-avatar-upload-form,
.bp-profile-avatar-reset-form {
  min-width: 0;
  margin: 0;
}

.bp-profile-avatar-upload-form {
  margin-top: .55rem;
}

.bp-profile-avatar-file-name {
  margin: .45rem 0 0;
  color: #4d5662;
  font-size: .86rem;
  overflow-wrap: anywhere;
}

.bp-profile-avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .75rem;
}

.bp-profile-avatar-actions button,
.bp-profile-avatar-reset {
  min-height: 42px;
  padding: .65rem .9rem;
  border-radius: 8px;
  font-weight: 750;
  cursor: pointer;
}

.bp-profile-avatar-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  color: #fff;
  background: #263b55;
}

.bp-profile-avatar-actions button[aria-busy="true"] {
  cursor: wait;
}

.bp-profile-avatar-actions button[aria-busy="true"] .bp-profile-edit-spinner {
  display: inline-block;
}

.bp-profile-avatar-reset-form {
  margin-top: .65rem;
}

.bp-profile-avatar-reset {
  border: 1px solid #cfd5dc;
  color: #263b55;
  background: #fff;
}

.bp-profile-avatar-actions button:disabled,
.bp-profile-avatar-reset:disabled {
  cursor: default;
  opacity: .65;
}

.bp-profile-avatar-client-message {
  margin: .65rem 0 0;
  color: #a32626;
  font-size: .86rem;
}

@media (max-width: 430px) {
  .bp-profile-avatar-picker {
    justify-content: center;
  }

  .bp-profile-avatar-trigger {
    width: 112px;
    height: 112px;
  }

  .bp-profile-avatar-actions,
  .bp-profile-avatar-upload-form,
  .bp-profile-avatar-reset-form {
    width: 100%;
  }

  .bp-profile-avatar-actions button,
  .bp-profile-avatar-reset {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .bp-profile-avatar-change-text {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .bp-profile-avatar-upload-form {
    width: 100%;
  }

  .bp-profile-avatar-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  .bp-profile-avatar-actions button {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
  }

  .bp-profile-avatar-reset-form {
    display: block;
    width: max-content;
    max-width: 100%;
    margin-top: 10px;
    margin-inline: 0;
    text-align: left;
  }

  .bp-profile-avatar-reset {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    margin-inline: 0;
    align-self: flex-start;
  }
}
