.es-user-profile-card,
.es-user-profile-card * {
  box-sizing: border-box;
}

.es-user-profile-card {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
  color: #172b4d;
  font-family: "Barlow", sans-serif;
}

.es-user-profile-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.es-user-profile-photo {
  display: flex;
  width: 150px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.es-user-profile-card button.es-user-profile-avatar-button {
  appearance: none;
  position: relative;
  display: block;
  width: 136px;
  height: 136px;
  min-width: 136px;
  min-height: 136px;
  margin: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 3px solid #004080 !important;
  border-radius: 50% !important;
  background: #e9edf2 !important;
  box-shadow: none !important;
  color: #fff !important;
  cursor: pointer;
}

.es-user-profile-avatar {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover;
  object-position: center;
  transition: transform 180ms ease;
}

.es-user-profile-avatar-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 38 77 / 64%);
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.es-user-profile-avatar-overlay svg {
  width: 38px;
  height: 38px;
}

.es-user-profile-avatar-button:hover .es-user-profile-avatar-overlay,
.es-user-profile-avatar-button:focus-visible .es-user-profile-avatar-overlay {
  opacity: 1;
}

.es-user-profile-avatar-button:hover .es-user-profile-avatar,
.es-user-profile-avatar-button:focus-visible .es-user-profile-avatar {
  transform: scale(1.035);
}

.es-user-profile-card button.es-user-profile-avatar-button:focus-visible {
  outline: 3px solid #69a9e3 !important;
  outline-offset: 3px;
}

.es-user-profile-card button.es-user-profile-photo-button {
  appearance: none;
  width: auto !important;
  min-width: 0;
  margin: 0;
  padding: 8px 14px !important;
  border: 1px solid #c9d6e2 !important;
  border-radius: 8px !important;
  background: #f6f9fc !important;
  box-shadow: none !important;
  color: #17324d !important;
  font: inherit;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap;
  cursor: pointer;
}

.es-user-profile-card button.es-user-profile-photo-button:hover,
.es-user-profile-card button.es-user-profile-photo-button:focus-visible {
  border-color: #004080 !important;
  background: #edf5fc !important;
  color: #004080 !important;
}

.es-user-profile-photo small {
  max-width: 145px;
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.es-user-profile-fields,
.es-user-profile-pair > div {
  min-width: 0;
}

.es-user-profile-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.es-user-profile-fields label {
  display: block;
  margin: 0 0 6px;
  color: #344054;
  font-size: 14px;
  font-weight: 600;
}

.es-user-profile-fields .es-profile-required {
  color: #d92d20;
  font-weight: 700;
}

.es-user-profile-fields input {
  display: block;
  width: 100% !important;
  max-width: none !important;
  min-height: 46px;
  margin: 0 0 14px !important;
  padding: 10px 12px !important;
  border: 1px solid #cfd8e3 !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #172b4d !important;
  font: inherit;
}

.es-user-profile-fields input:focus {
  border-color: #0067a5 !important;
  outline: 3px solid rgb(0 103 165 / 14%);
}

.es-user-profile-fields input[readonly] {
  background: #f4f6f8 !important;
}

.es-user-profile-form-error,
.es-user-profile-success {
  min-height: 20px;
  margin: 12px 0 0;
  text-align: right;
}

.es-user-profile-form-error {
  color: #b42318;
}

.es-user-profile-success {
  color: #087443;
}

.es-user-profile-card button.es-user-profile-submit {
  display: block;
  width: auto !important;
  min-width: 130px;
  margin: 14px 0 0 auto !important;
  padding: 11px 22px !important;
  border: 1px solid #004080 !important;
  border-radius: 8px !important;
  background: #004080 !important;
  color: #fff !important;
  font: inherit;
  font-weight: 700 !important;
  cursor: pointer;
}

.es-user-profile-card button.es-user-profile-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 640px) {
  .es-user-profile-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .es-user-profile-photo {
    width: 100%;
  }

  .es-user-profile-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .es-user-profile-card button.es-user-profile-submit {
    width: 100% !important;
  }
}
